var browser, verStr = navigator.appVersion, app = navigator.appName, version = parseFloat(verStr);

function test_browser() {
  if ((app.indexOf('Netscape') != -1) && version >= 5) {
    browser = "netscape";
  }
  else if ((app.indexOf('Microsoft') != -1) && version >= 4) {
    browser = "ie";
  }
}

var body_content = new Array("bodycontent", "preloader");
test_browser();
function show_sub(show_which_sub, var_array, mode) {

  if (mode == "preloader") {
    for (i = 0; i < eval(var_array + ".length"); i++) {
      if (eval(var_array + "[i]") != show_which_sub) {
        hide_sub(eval(var_array + "[i]"), mode);
      }
    }
  }

  if (show_which_sub != "") {
    if (browser == "netscape") {
      if (document.getElementById(show_which_sub).style.display == 'block') {
        document.getElementById(show_which_sub).style.display = 'none';
      }
      else {
        document.getElementById(show_which_sub).style.display = 'block';
      }
    }
    else if (browser == "ie") {
      show_menu = eval(show_which_sub);
      if(show_menu.style.display == 'block'){
        show_menu.style.display = 'none';
      }
      else {
        show_menu.style.display = 'block';
      }
    }
  }

}

function hide_sub(which_sub, mode) {
  if (browser == "netscape") {
    document.getElementById(which_sub).style.display = 'none';
  }
  else if (browser == "ie") {
    sub_menu = eval(which_sub);
    sub_menu.style.display = 'none';
  }
}

function auto_hide() {
  show_sub("");
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function scroll_up() {
  current_pos = document.getElementById('scroll_clipper').scrollTop;
  document.getElementById('scroll_clipper').scrollTop = current_pos + 20;
}

function scroll_down() {
  current_pos = document.getElementById('scroll_clipper').scrollTop;
  document.getElementById('scroll_clipper').scrollTop = current_pos - 20;
}

function char_count(eid, maxlen, max_lines) {

  var inputstr;
  var strlen;
  var charleft;
  var numcr;
  var temp = new Array();

  if (document.getElementById(eid).value != "") {
    inputstr = document.getElementById(eid).value;
    strlen = inputstr.length;

    if (strlen > maxlen) {
      document.getElementById(eid).value = document.getElementById(eid).value.substring(0,maxlen);
      charleft = 0;
      alert("Exceeds maximum number of characters!");
    }
    else {
      charleft = maxlen - strlen;
    }

    document.getElementById('charleft' + eid).innerHTML = charleft + " / " + maxlen;

  }

  if (max_lines > 0) {

    var temp2 = document.getElementById(eid).value.split('\r\n');
    var temp_val = "";
    counter = 0;
    if (temp2.length > max_lines) {
      alert("Exceeds maximum number of lines!");
      for (i = 0; i < max_lines; i++) {
        temp_val = temp_val + temp2[i];
        if (i < (max_lines - 1)) {
          temp_val = temp_val + "\n";
        }
      }
      document.getElementById(eid).value = temp_val;
    }

  }

}

function row_over(row_id, row_color) {
  document.getElementById(row_id).style.backgroundColor = row_color;
}

function add_to_favorite(url, title) {
  if (window.sidebar) {
    window.sidebar.addPanel(title, url, "");
  }
  else if( window.external ) {
    window.external.AddFavorite(url, title);
  }
  else if (window.opera && window.print) {
    return true;
  }
}


var w_width = w_height = 0;

function get_window_size() {
  if (parseInt(navigator.appVersion)>3) {
    if (navigator.appName=="Netscape") {
      w_width = window.innerWidth;
      w_height = window.innerHeight;
    }
    if (navigator.appName.indexOf("Microsoft")!=-1) {
      w_width = document.body.offsetWidth;
      w_height = document.body.offsetHeight;
    }
  }
}

var pro = new Array();
//vertical banner slide on homepage
function banner_slide() {	
	var start = pro[pro.length - 1];	
	
  $('#tab_' + pro[2]).animate({top:'247'}, 200);
	$('#tab_' + pro[1]).animate({top:'165'}, 200);
	
	$('#tab_' + pro[0]).animate({top:'83'}, 200);
	
	$('#tab_' + pro[1]).removeClass("tab_bg_1");
	$('#tab_' + pro[1]).addClass("tab_bg_2");
	$('#tab_content_' + pro[1]).fadeIn(100);
	$('#tab_content_alt_' + pro[1]).hide();
	
	$('#tab_' + pro[0]).removeClass("tab_bg_0");
	$('#tab_' + pro[0]).addClass("tab_bg_1");	
	$('#tab_content_' + pro[0]).hide();
	$('#tab_content_alt_' + pro[0]).fadeIn(100);
	
	$('#pro_banner' + pro[1]).hide();
	$('#pro_banner' + pro[0]).fadeIn(200);	
	
	$('#tab_' + pro[pro.length - 1]).animate({top:'1'}, 200, function(){				
		$('#tab_' + pro[2]).css({top:'-82px'});
	 	for(i = pro.length - 1; i >= 0; i--){
			if(i == 0){
				pro[i] = start;
			}else{
				pro[i] = pro[i - 1];				
			}
		}
	});				
	
}

function auto_slide(){		
	var num_pros = parseInt(document.getElementById("num_pros").value);	
	for(i = 0; i < num_pros; i++){
		pro[i] = i;
	}
	setInterval("banner_slide()", 5000);
}

var active_tab = "pro_description";
function show_tab(which_tab){
	if (document.getElementById(active_tab)) {
    $('#' + active_tab).hide();
  }  
	$('#' + which_tab).fadeIn(200);	
	  
	document.getElementById(active_tab + "_link").className = "tab_bg";
	document.getElementById(which_tab + "_link").className = "tab_bg_1";

  active_tab = which_tab;
}

function youtube(youtube_code) {

  url = "youtube_viewer.php?youtube=" + youtube_code;
  window.open(url,'browser','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=445,height=375')

}

function CreateBookmarkLink(title) {
	title = title.replace("\\", "");
	var url = window.location;
  if (window.sidebar) { // Mozilla Firefox Bookmark
    window.sidebar.addPanel(title, url,"");
  }
  else if( window.external ) { // IE Favorite
    window.external.AddFavorite( url, title); 
	}
  else if(window.opera && window.print) { // Opera Hotlist
     return true;
  }else{
		if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPad/i))) {
			alert("Please press the Add Bookmark button on your iPad / iPhone to bookmark this page");
		}else{
			alert("Please press Command/Cmd + D to bookmark this page");	
		}
	}
    
}

var active_faq = "";

function show_faq (eid) {

  if (active_faq != "") {
    document.getElementById(active_faq).style.display = "none";
  }
  document.getElementById(eid).style.display = "block";
  active_faq = eid;

}

function refresh_calendar() {
  cyear  = document.getElementById('cyear').value;
  cmonth = document.getElementById('cmonth').value;
  window.location = "index.php?year=" + cyear + "&month=" + cmonth;
}

var active_answer = "";

function show_answer(eid) {

  if (active_answer != "") {
    document.getElementById(active_answer).style.display = "none";
  }
  document.getElementById(eid).style.display = "block";
  active_answer = eid;

}

function date_gui(day_name, month_name, year_name, day_val, month_val, year_val, mode, eid, css, start_year, end_year) {

  var months_1 = new Array("", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
  var months_2 = new Array("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
  
  document.write("<select name=\"" + day_name + "\" id=\"" + day_name + "\"  class=\"" + css + "\">");
  if (mode == "full") { 
    document.write("<option value=\"\"> Day </option> ");
  }
  else { 
    document.write("<option value=\"\">dd</option> ");
  }
  for (i = 1; i <= 31; i++) {
    dsp = "";
    if (i == day_val) { 
      dsp = "selected";
    }
    document.write("<option value=\"" + i + "\" " + dsp + ">" + i + "</option>");
  }
  document.write("</select> ");
  
  document.write("<select name=\"" + month_name + "\" id=\"" + month_name + "\" class=\"" + css + "\">");
  if (mode == "full") { 
    document.write("<option value=\"\"> Month </option> ");
  }
  else { 
    document.write("<option value=\"\">mm</option> ");
  }
  for (i = 1; i < months_1.length; i++) {
    dsp = "";
    if (i == month_val) { 
      dsp = "selected";
    }
    month = months_1[i];
    if (mode == "full") { 
      month = months_2[i];
    }
    document.write("<option value=\"" + i + "\" " + dsp + ">" + month + "</option>");
  }
  document.write("</select> ");
  
  document.write("<select name=\"" + year_name + "\" id=\"" + year_name + "\" class=\"" + css + "\">");
  if (mode == "full") { 
    document.write("<option value=\"\"> Year </option> ");
  }
  else { 
    document.write("<option value=\"\">yy</option> ");
  }
  for (i = start_year; i <= end_year; i++) {
    dsp = "";
    if (i == year_val) { 
      dsp = "selected";
    }
    year = i;
    year = String(year);
    year = year.substring(2, 4);
    if (mode == "full") { 
      year = i;
    }
    document.write("<option value=\"" + i + "\" " + dsp + ">" + year + "</option>");
  }
  document.write("</select> ");

}

function addEvent(obj, evType, fn){
 if (obj.addEventListener){
    obj.addEventListener(evType, fn, false);
    return true;
 } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
 } else {
    return false;
 }
}
function removeEvent(obj, evType, fn, useCapture){
  if (obj.removeEventListener){
    obj.removeEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.detachEvent){
    var r = obj.detachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be removed");
  }
}

/**
 * Code below taken from - http://www.evolt.org/article/document_body_doctype_switching_and_more/17/30655/
 *
 * Modified 4/22/04 to work with Opera/Moz (by webmaster at subimage dot com)
 *
 * Gets the full width/height because it's different for most browsers.
 */
function getViewportHeight() {
  if (window.innerHeight!=window.undefined) return window.innerHeight;
  if (document.compatMode=='CSS1Compat') return document.documentElement.clientHeight;
  if (document.body) return document.body.clientHeight; 

  return window.undefined; 
}
function getViewportWidth() {
  var offset = 16;
  var width = null;
  if (window.innerWidth!=window.undefined) return window.innerWidth + offset; 
  if (document.compatMode=='CSS1Compat') return document.documentElement.clientWidth + offset; 
  if (document.body) return document.body.clientWidth + offset; 
}

/**
 * Gets the real scroll top
 */
function getScrollTop() {
  if (self.pageYOffset) // all except Explorer
  {
    return self.pageYOffset;
  }
  else if (document.documentElement && document.documentElement.scrollTop)
    // Explorer 6 Strict
  {
    return document.documentElement.scrollTop;
  }
  else if (document.body) // all other Explorers
  {
    return document.body.scrollTop;
  }
}
function getScrollLeft() {
  if (self.pageXOffset) // all except Explorer
  {
    return self.pageXOffset;
  }
  else if (document.documentElement && document.documentElement.scrollLeft)
    // Explorer 6 Strict
  {
    return document.documentElement.scrollLeft;
  }
  else if (document.body) // all other Explorers
  {
    return document.body.scrollLeft;
  }
}

function show_sub_menus(menu_number){
	for(i = 0; i < 4; i++){
		if(document.getElementById("sub_" + i))	{
			if(i == menu_number){
				document.getElementById("sub_" + i).style.display = 'block';
			}else{
				document.getElementById("sub_" + i).style.display = 'none';
			}
		}
	}	
}
function is_child_of(parent, child) {
	if( child != null ) {			
		while( child.parentNode ) {
			if( (child = child.parentNode) == parent ) {
				return true;
			}
		}
	}
	return false;
}
function fixOnMouseOut(element, event, JavaScript_code) {
	var current_mouse_target = null;
	if( event.toElement ) {				
		current_mouse_target 			 = event.toElement;
	} else if( event.relatedTarget ) {				
		current_mouse_target 			 = event.relatedTarget;
	}
	if( !is_child_of(element, current_mouse_target) && element != current_mouse_target ) {
		eval(JavaScript_code);
	}
}
function hide_all_subs(){
	for(i = 0; i < 4; i++){
		if(document.getElementById("sub_" + i))	{
			document.getElementById("sub_" + i).style.display = 'none';
		}
	}	
}
function change_class(el_id, cl_name_1, cl_name_2){
	document.getElementById("menu_" + el_id).className = cl_name_1;
	document.getElementById("arrow_" + el_id).className = cl_name_2;
}
function check_source() {
  document.getElementById('other_source').style.display = "none";
  if (document.getElementById('source').value == "Other") {
    document.getElementById('other_source').style.display = "block";
  }
}
function fill_text(el, el_text){
	val = el.value
	if(val == ""){
		el.value = el_text;
	}
}
function change_bg(el_id, class_name){
	val = document.getElementById(el_id).value
	if(val == ""){
		document.getElementById(el_id).className = class_name;
	}
	
	if(el_id == 'side_username'){
		if(document.getElementById('side_password').value != ""){
			document.getElementById('side_password').className = 'login_field';
		}
	}
	
}

var min = 8;
var max = 20;
var el_arr = ["body", "h3", "span", "h2", "p", "a"];
function font_up() {
	for(x = 0; x < el_arr.length; x++){
	
		var p = document.getElementsByTagName(el_arr[x]);
		for(i=0;i<p.length;i++) {
			if(p[i].style.fontSize) {
				 var s = parseInt(p[i].style.fontSize.replace("px",""));
			}else if(el_arr[x] == "h2"){
				 var s = 20;	
			 
			}else {
				 var s = 12;
			}
			if(s!=max) {
				 s += 1;
			}
			p[i].style.fontSize = s+"px"
		}
	
	}
	
}

function font_down() {
	for(x = 0; x < el_arr.length; x++){
		var p = document.getElementsByTagName(el_arr[x]);
		for(i=0;i<p.length;i++) {
			if(p[i].style.fontSize) {
				 var s = parseInt(p[i].style.fontSize.replace("px",""));
			}else if(el_arr[x] == "h2"){
				 var s = 20;	
			 
			} else {
				 var s = 10;
			}
			if(s!=min) {
				 s -= 1;
			}
			p[i].style.fontSize = s+"px"
		}
		
	}

}

function showmap(address, company_name, map_div, x, y) {				
	var myLatlng = new google.maps.LatLng(x, y);
	var myOptions = {
		zoom: 15,
		center: myLatlng,
		mapTypeId: google.maps.MapTypeId.ROADMAP
	}

	var map = new google.maps.Map(document.getElementById(map_div), myOptions);
	var marker = new google.maps.Marker({
			map: map, 
			position: myLatlng,
			title:company_name
	});
	
	var infowindow = new google.maps.InfoWindow({																				
		content: "<p class='body_text_normal'><strong>" + company_name + "</strong><br />" + address + "</p>"
	});
	
	google.maps.event.addListener(marker, 'click', function() {
		infowindow.open(map,marker);
	});						
	
}

var active_menu   = "";
var active_level  = 1;
var active_top		= "";

function show_category_menu(which_menu, menu_level, top_menu) {
  
  if (menu_level == active_level && document.getElementById(active_menu)) {
    document.getElementById(active_menu).style.display = "none";
		var tmp = document.getElementById(active_menu + "_li").className.split(" ");
		if(tmp.length > 1){
			document.getElementById(active_menu + "_li").className = tmp[0];
		}else{
			document.getElementById(active_menu + "_li").className = "";
		}
		
		document.getElementById(active_menu + "_link").className = "cat_link";
  }
	if (menu_level < active_level) {
		if(document.getElementById(active_top)){
			document.getElementById(active_top).style.display = "none";
		}
	}
	
  if (document.getElementById(which_menu).style.display != "block") {
    document.getElementById(which_menu).style.display = "block";
		if(document.getElementById(which_menu + "_li").className != ""){
			document.getElementById(which_menu + "_li").className += " cat_li_selected";
		}else{
			document.getElementById(which_menu + "_li").className = "cat_li_selected";	
		}
		document.getElementById(which_menu + "_link").className = "cat_link_selected";
    active_menu = which_menu;
    active_level = menu_level;
		active_top = top_menu;
  }
  
}

var active_dropdown_menu   = "";
var active_dropdown_level  = "";
var active_dropdown_top		 = "";

function show_dropdown_menu(which_menu, menu_level, top_menu) {
	
	if (menu_level == active_dropdown_level && which_menu != active_dropdown_menu) {
		$("#" + active_dropdown_menu).hide();
		
	}
	else if (menu_level < active_dropdown_level && which_menu != active_dropdown_top) {		
		if(document.getElementById(active_dropdown_top)){
			hide_all_dropdown(active_dropdown_top);
			$("#" + active_dropdown_top).hide();			
		}
	}
	
	if(document.getElementById(which_menu)){				
		
		if (document.getElementById(which_menu).style.display != "block") {
			document.getElementById(which_menu).style.left = document.getElementById(top_menu).offsetWidth + "px";
			$("#" + which_menu).fadeIn('fast');			
			active_dropdown_menu = which_menu;
			active_dropdown_level = menu_level;
			active_dropdown_top = top_menu;
		}	
		
		if(document.getElementById(which_menu).offsetHeight < document.getElementById(top_menu).offsetHeight){
			document.getElementById(which_menu).style.height = (document.getElementById(top_menu).offsetHeight - 39) + "px";
		}else{
			document.getElementById(top_menu).style.height = (document.getElementById(which_menu).offsetHeight - 39) + "px";
		}
	
	}
	
}

function hide_all_dropdown(top_container_id){
	top_container = document.getElementById(top_container_id);
	for(i = 0; i < top_container.childNodes.length; i++){
		if(top_container.childNodes[i].className == "dropdown_content_1"){
			top_container.childNodes[i].style.display = "none";	
		}
	}	
}


//slide object
function slide(){
	this.scrolled = 0; 
	var diff;
	
	this.slide_div = function(eid, dir, scroll_length, btn_id){		
		diff = $("#" + eid).attr("scrollWidth") - $("#" + eid).width();
		var btn_distance;		
		if(this.scrolled > diff){this.scrolled = diff;}
		if(dir == "right"){			
			if(this.scrolled < diff){				
															
				this.scrolled += scroll_length;
				$('#' + eid).animate({scrollLeft: "+=" + scroll_length});	
				btn_distance = (this.scrolled / diff) * 646;
				if(btn_distance > 646){
					btn_distance = 646;
				}
				
				$('#' + btn_id).animate({left: btn_distance});
			}else{
				this.scrolled = diff;
			}
		
		}else if(dir == "left"){
			if(this.scrolled > 0){
				if(scroll_length >= this.scrolled){
					scroll_length = this.scrolled;					
				}
				this.scrolled -= scroll_length;
				$('#' + eid).animate({scrollLeft: "-=" + scroll_length});	
				btn_distance = this.scrolled / diff * 646;				
				if(this.scrolled <= 0){
					btn_distance = 0;
				}
				
				$('#' + btn_id).animate({left: btn_distance});	
				
			}
		}	
		
	};
	
}

String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
}

var display = "hide";
function expand_content(){

	if(display == "show"){			
		$('#content').slideToggle('normal', function(){					
			display = "hide";
			//document.getElementById("read_more").innerHTML = "read more";
		});
		
	}else{		
		$('#content').slideToggle('normal');
		scroll_to_content();
		display = "show";
		//document.getElementById("read_more").innerHTML = "close";
	}
}
function scroll_to_content(){
	var destination = $("#content").offset().top;
	
	$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, 1000);
	
}

function validate_search(frm){
	if(frm.key_words.value == "" || frm.key_words.value == "search"){
		alert("Please enter a keyword to search.");
		return false;
	}
	return true;
}

function open_youtube(youtube_code) {
	var str = '<embed src="http://player.exa.com.au/player/player.swf?id=video1&amp;file=http%3A//www.youtube.com/watch%3Fv%3D'+ youtube_code +'&amp;backcolor=%23ef7f53&amp;frontcolor=%23FFFFFF&amp;menu=false&amp;autostart=true&amp;wmode=transparent&amp;controlbar.position=over&amp;controlbar.idlehide=true" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed>';
	
	Shadowbox.open({
    player:     "html",    
    content:    str,
		width: 640,
		height: 385		
  });
}

function fbs_click(title, url) {	
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(url)+'&t='+encodeURIComponent(title),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}
function hide_buttons(){	
	document.getElementById('submit_buttons').style.display='none';	
	document.getElementById('process_msg').style.display='block';			
}
function check_billing_address() {
  var fields = new Array("name","address_1", "address_2", "suburb", "state", "postcode", "country");
  if (document.getElementById('inv_address').value == "same") {
    for (i = 0; i < fields.length; i++) {
      document.getElementById('inv_' + fields[i]).value = document.getElementById('del_' + fields[i]).value;
    }		
  }
}
function add_to_cart(pid, qty_id, url){
	var qty;
	if(document.getElementById(qty_id)){
		qty = document.getElementById(qty_id).value;
	}else{
		qty = 1;	
	}	
	window.location=url + "?cmd=add_to_cart&pid=" + pid + "&qty=" + qty;
}
var active_image = "large_pic_0";
function show_image(img_id) {
  hide_image();  
  document.getElementById(img_id).style.display = "block";
  active_image = img_id;
}

function hide_image() {
  if (document.getElementById(active_image)) {
    document.getElementById(active_image).style.display = "none";
  }

}

//image scroll functions
var startx, startleft, sc, diff, scrleft, eid, btn_id;
function select_el(e){
	e         = e ? e : window.event;	
	diff      = $('#' + this.scroll_div_id).attr("scrollWidth") - $('#' + this.scroll_div_id).width();
	startx    = e.clientX;
	startleft = $("#" + this.id).position().left;
	scrleft   = $('#' + this.scroll_div_id).scrollLeft();
	eid       = this.scroll_div_id;
	btn_id    = this.id;
	document.sc_obj = this.sc_obj;
	document.onmousemove = movemouse;
	return false;
}

function movemouse(e){
	e = e ? e : window.event;
	dis = e.clientX - startx;
	var scroll_length;
	if(startleft + dis >= 0 && startleft + dis <= 646){
		$("#" + btn_id).css({left:startleft + dis});
		if(dis > 0){
			scroll_length = (dis/646) * diff + scrleft;			
		}else if(dis < 0){
			dis = dis * -1;
			scroll_length = scrleft - (dis/646) * diff;	
		}		
		scroll_length = parseInt(scroll_length);
		this.sc_obj.scrolled = scroll_length;
		$("#" + eid).scrollLeft(scroll_length);
	}
	return false;	
}

function show_search_form(){	
	$.blockUI({
		message:$('#advanced_search_div'),
		css:{
			width:'420px',
			height:'170px',
			padding:	10,
			backgroundColor: '#ffffff',		
			border: '0',
			cursor:		'default',
			top:($(window).height() - 170) / 2 + 'px',
			left:($(window).width() - 420) / 2 + 'px'							
		}					
	});
}
