
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function winBRopen(theURL, Name, popW, popH, scroll) { // V 1.0
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable'
	Win = window.open(theURL, Name, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }	
}

function toggle(obj,imgName){
     var objId =  document.getElementById(obj);
     var img = document.images[imgName];
     var plusSrc = "images/collapse.gif";
     var minusSrc = "images/expand.gif";
          objId.style.display = (objId.style.display == "none")?"":"none"; // show or hide it
          img.src = (img.src == plusSrc)?minusSrc:plusSrc;  // Image src
}

function validate_core_settings()
{			
		var mail_topower = parseInt(document.getElementById('form_access_mail_topower').value);
		var mail_toownserver = parseInt(document.getElementById('form_access_mail_toownserver').value);
		var mail_todp = parseInt(document.getElementById('form_access_mail').value);
		var access_virus = parseInt(document.getElementById('form_access_virus').value);
		
		var test = mail_topower + mail_toownserver + mail_todp + 2;
		if(test > 1) { alert('Error:  You have more than one mail route selected' + test); return false; }
		else if((test == 0) && access_virus) { alert('Error:  Please unselect AV/AS if there\'s no mail routing'); return false;  }
		
		else { return true; }
}


// This function just changes what form elements are visible depending
// on what type of mail hosting they have and is called everytime they
// change the mail-type.
function change_mail(type)
{
	var type;
	if(type == 'dp') 
	{
			document.getElementById('mail_dp_select').style.display = 'block';
			//document.getElementById('mail_dp_select').selected = true;
			document.getElementById('mail_power_select').style.display = 'none';
			document.getElementById('mail_external_select').style.display = 'none';
			document.getElementById('mail_none_select').style.display = 'none';
			document.getElementById('mail_av_box').style.display = 'block';
	}
	
	if(type == 'power') 
	{ 
			document.getElementById('mail_dp_select').style.display = 'none';
			document.getElementById('mail_power_select').style.display = 'block';
			//document.getElementById('form_mail_select')[0].selected = true;
			document.getElementById('mail_external_select').style.display = 'none';
			document.getElementById('mail_none_select').style.display = 'none';
			document.getElementById('mail_av_box').style.display = 'block';
		
	}
	
	if(type == 'external') 
	{ 
			document.getElementById('mail_dp_select').style.display = 'none';
			document.getElementById('mail_power_select').style.display = 'none';
			document.getElementById('mail_external_select').style.display = 'block';
			//document.getElementById('form_mail_select')[1].selected = true;
			document.getElementById('mail_none_select').style.display = 'none';
			document.getElementById('mail_av_box').style.display = 'block';
	
	}
	
	if(type == 'none') 
	{ 
			document.getElementById('mail_dp_select').style.display = 'none';
			document.getElementById('mail_power_select').style.display = 'none';
			document.getElementById('mail_external_select').style.display = 'none';
			document.getElementById('mail_none_select').style.display = 'block';
			//document.getElementById('form_mail_select')[2].selected = true;
			document.getElementById('mail_av_box').style.display = 'none';
	}
	
}


function change_web(type)
{
	var type;
	if(type == 'NONE') 
	{
			document.getElementById('form_access_webhosting_ssl').checked = false;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = false;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;			
			document.getElementById('form_diskquota').value = 0;
			document.getElementById('diskquota_text').innerHTML = "0";
			document.getElementById('form_access_webhosting_unix_auto').checked = false;
			document.getElementById('form_access_webhosting_unix_auto').disabled = true;
			document.getElementById('form_access_webhosting_testsub').checked = false;
			document.getElementById('form_access_webhosting_testsub').disabled = true;

			document.getElementById('form_access_mysql').checked = false;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = false;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = false;
			document.getElementById('form_access_msaccess').disabled = true;
			
			// Hide 'Plan Depreciated' message
			document.getElementById('plandepreciated').style.display = 'none';
	}

	if(type == 'ECONOMY') 
	{
			document.getElementById('form_access_webhosting_ssl').checked = false;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = false;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;
			document.getElementById('form_diskquota').value = 50;
			document.getElementById('diskquota_text').innerHTML = "50";
			document.getElementById('form_access_webhosting_unix_auto').checked = true;
			document.getElementById('form_access_webhosting_unix_auto').disabled = true;
			document.getElementById('form_access_webhosting_unix_manual').disabled = true;
			document.getElementById('form_access_webhosting_unix_manual').checked = false;
			document.getElementById('form_access_webhosting_testsub').checked = true;
			document.getElementById('form_access_webhosting_testsub').disabled = true;

			document.getElementById('form_access_mysql').checked = false;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = false;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = false;
			document.getElementById('form_access_msaccess').disabled = true;

			// Hide 'Plan Depreciated' message
			document.getElementById('plandepreciated').style.display = 'none';
	}

	if(type == 'PROFESSIONAL') 
	{
			document.getElementById('form_access_webhosting_ssl').checked = false;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = true;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;
			document.getElementById('form_diskquota').value = 250;
			document.getElementById('diskquota_text').innerHTML = "250";
			//document.getElementById('form_access_webhosting_unix').checked = false;
			document.getElementById('form_access_webhosting_unix_auto').disabled = false;
			document.getElementById('form_access_webhosting_unix_manual').disabled = false;
			document.getElementById('form_access_webhosting_testsub').checked = true;
			document.getElementById('form_access_webhosting_testsub').disabled = false;

			document.getElementById('form_access_mysql').checked = true;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = false;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = true;
			document.getElementById('form_access_msaccess').disabled = true;
			
			// Hide 'Plan Depreciated' message
			document.getElementById('plandepreciated').style.display = 'none';
	}

	if(type == 'BUSINESS') 
	{
			document.getElementById('form_access_webhosting_ssl').checked = true;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = true;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;
			document.getElementById('form_diskquota').value = 600;
			document.getElementById('diskquota_text').innerHTML = "600";
			//document.getElementById('form_access_webhosting_unix_auto').checked = false;
			document.getElementById('form_access_webhosting_unix_auto').disabled = false;
			document.getElementById('form_access_webhosting_unix_manual').disabled = false;
			//document.getElementById('form_access_webhosting_testsub').checked = true;
			document.getElementById('form_access_webhosting_testsub').disabled = false;

			document.getElementById('form_access_mysql').checked = true;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = true;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = true;
			document.getElementById('form_access_msaccess').disabled = true;
			
			// Hide 'Plan Depreciated' message
			document.getElementById('plandepreciated').style.display = 'none';
	}

	if(type == 'CORPORATE') 
	{
			document.getElementById('form_access_webhosting_ssl').checked = true;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = true;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;
			document.getElementById('form_diskquota').value = 2000;
			document.getElementById('diskquota_text').innerHTML = "2000";
			//document.getElementById('form_access_webhosting_unix_auto').checked = false;
			document.getElementById('form_access_webhosting_unix_auto').disabled = false;
			document.getElementById('form_access_webhosting_unix_manual').disabled = false;
			//document.getElementById('form_access_webhosting_testsub').checked = true;
			document.getElementById('form_access_webhosting_testsub').disabled = false;

			document.getElementById('form_access_mysql').checked = true;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = true;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = true;
			document.getElementById('form_access_msaccess').disabled = true;
			
			// Hide 'Plan Depreciated' message
			document.getElementById('plandepreciated').style.display = 'none';
	}
	
	// Show 'Plan Depreciated' message for old BROZNE and PLATINUM plans
	if(type == 'BRONZE' || type == 'PLATINUM') { document.getElementById('plandepreciated').style.display = ''; }
	
	//  Only show Apache Settings if apache-auto-conf is selected
	if(document.getElementById('form_access_webhosting_unix_auto').checked == true)
	{ document.getElementById('apacheoptions').style.display = 'block' }
	else { document.getElementById('apacheoptions').style.display = 'none'; }
	
	
}














function change_web2(type)
{
	var type;

	if(type == 'NONE') 
	{		
			document.getElementById('form_access_webhosting_ssl').checked = false;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = false;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;			
			document.getElementById('form_diskquota').value = 0;
			document.getElementById('diskquota_text').innerHTML = "0";
			document.getElementById('websitebandwidth').innerHTML = "none";
			document.getElementById('webstatsupdates').innerHTML = "none";
			document.getElementById('form_access_webhosting_unix_auto').checked = false;
			document.getElementById('form_access_webhosting_unix_auto').disabled = true;
			document.getElementById('form_access_webhosting_unix_manual').disabled = true;
			document.getElementById('form_access_webhosting_unix_manual').checked = false;			
			document.getElementById('form_access_webhosting_testsub').checked = false;
			document.getElementById('form_access_webhosting_testsub').disabled = true;

			document.getElementById('form_access_mysql').checked = false;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = false;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = false;
			document.getElementById('form_access_msaccess').disabled = true;

			// Show or Hide hosting subsections
			document.getElementById('hosting_general_options').style.display = 'none';
			document.getElementById('hosting_apache_options').style.display = 'none';
			document.getElementById('hosting_nt_options').style.display = 'none';
			document.getElementById('apacheoptions').style.display = 'none';
			
	}

	else if(type == 'ECONOMY') 
	{		
			// Force Start Plan to use Apache
			document.getElementById('webhosting_platform_apache').disabled = true;
			document.getElementById('webhosting_platform_nt').disabled = true;
			document.getElementById('webhosting_platform_nt').checked = false;
			document.getElementById('webhosting_platform_apache').checked = true;
			
			document.getElementById('form_access_webhosting_ssl').checked = false;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = false;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;
			document.getElementById('form_diskquota').value = 50;
			document.getElementById('diskquota_text').innerHTML = "50";
			document.getElementById('websitebandwidth').innerHTML = "10 Mbit";
			document.getElementById('webstatsupdates').innerHTML = "Daily updates";
			document.getElementById('form_access_webhosting_unix_auto').checked = true;
			document.getElementById('form_access_webhosting_unix_auto').disabled = true;
			document.getElementById('form_access_webhosting_unix_manual').disabled = true;
			document.getElementById('form_access_webhosting_unix_manual').checked = false;
			
			document.getElementById('form_access_webhosting_testsub').checked = true;
			document.getElementById('form_access_webhosting_testsub').disabled = true;

			document.getElementById('form_access_mysql').checked = false;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = false;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = false;
			document.getElementById('form_access_msaccess').disabled = true;

			
			// Show or Hide hosting subsections
			document.getElementById('hosting_general_options').style.display = 'block';
			if(document.getElementById('webhosting_platform_apache').checked == true)
			{
				document.getElementById('hosting_apache_options').style.display = 'block';
				document.getElementById('hosting_nt_options').style.display = 'none';
				//  Only show Apache Settings if apache-auto-conf is selected
				if(document.getElementById('form_access_webhosting_unix_auto').checked == true)
				{ document.getElementById('apacheoptions').style.display = 'block' }
				else { document.getElementById('apacheoptions').style.display = 'none'; }
			}
			else if(document.getElementById('webhosting_platform_nt').checked == true)	
			{
				document.getElementById('hosting_apache_options').style.display = 'none';
				document.getElementById('hosting_nt_options').style.display = 'block';
				document.getElementById('apacheoptions').style.display = 'none'; 
			}
	}

	else if(type == 'PROFESSIONAL') 
	{			
			document.getElementById('webhosting_platform_nt').disabled = false;
			document.getElementById('webhosting_platform_apache').disabled = false;
			document.getElementById('form_access_webhosting_ssl').checked = false;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = true;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;
			document.getElementById('form_diskquota').value = 250;
			document.getElementById('diskquota_text').innerHTML = "250";
			document.getElementById('websitebandwidth').innerHTML = "100 Mbit";
			document.getElementById('webstatsupdates').innerHTML = "Daily updates";
			//document.getElementById('form_access_webhosting_unix').checked = false;
			document.getElementById('form_access_webhosting_unix_auto').disabled = false;
			document.getElementById('form_access_webhosting_unix_manual').disabled = false;
			document.getElementById('form_access_webhosting_testsub').checked = true;
			document.getElementById('form_access_webhosting_testsub').disabled = false;
			

			document.getElementById('form_access_mysql').checked = true;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = false;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = true;
			document.getElementById('form_access_msaccess').disabled = true;
			
			
			// Show or Hide hosting subsections
			document.getElementById('hosting_general_options').style.display = 'block';
			if(document.getElementById('webhosting_platform_apache').checked == true)
			{
				document.getElementById('hosting_apache_options').style.display = 'block';
				document.getElementById('hosting_nt_options').style.display = 'none';
				//  Only show Apache Settings if apache-auto-conf is selected
				if(document.getElementById('form_access_webhosting_unix_auto').checked == true)
				{ document.getElementById('apacheoptions').style.display = 'block' }
				else { document.getElementById('apacheoptions').style.display = 'none'; }
			}
			else if(document.getElementById('webhosting_platform_nt').checked == true)	
			{
				document.getElementById('hosting_apache_options').style.display = 'none';
				document.getElementById('hosting_nt_options').style.display = 'block';
				document.getElementById('apacheoptions').style.display = 'none'; 
			}
	}

	else if(type == 'BUSINESS') 
	{		
			document.getElementById('webhosting_platform_nt').disabled = false;
			document.getElementById('webhosting_platform_apache').disabled = false;		
			document.getElementById('form_access_webhosting_ssl').checked = true;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = true;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;
			document.getElementById('form_diskquota').value = 600;
			document.getElementById('diskquota_text').innerHTML = "600";
			document.getElementById('websitebandwidth').innerHTML = "100 Mbit redundant";
			document.getElementById('webstatsupdates').innerHTML = "15-Minute updates";
			//document.getElementById('form_access_webhosting_unix_auto').checked = false;
			document.getElementById('form_access_webhosting_unix_auto').disabled = false;
			document.getElementById('form_access_webhosting_unix_manual').disabled = false;
			//document.getElementById('form_access_webhosting_testsub').checked = true;
			document.getElementById('form_access_webhosting_testsub').disabled = false;
			

			document.getElementById('form_access_mysql').checked = true;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = true;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = true;
			document.getElementById('form_access_msaccess').disabled = true;
			
			// Show or Hide hosting subsections
			document.getElementById('hosting_general_options').style.display = 'block';
			if(document.getElementById('webhosting_platform_apache').checked == true)
			{
				document.getElementById('hosting_apache_options').style.display = 'block';
				document.getElementById('hosting_nt_options').style.display = 'none';
				//  Only show Apache Settings if apache-auto-conf is selected
				if(document.getElementById('form_access_webhosting_unix_auto').checked == true)
				{ document.getElementById('apacheoptions').style.display = 'block' }
				else { document.getElementById('apacheoptions').style.display = 'none'; }
			}
			else if(document.getElementById('webhosting_platform_nt').checked == true)	
			{
				document.getElementById('hosting_apache_options').style.display = 'none';
				document.getElementById('hosting_nt_options').style.display = 'block';
				document.getElementById('apacheoptions').style.display = 'none'; 
			}	

	}

	else if(type == 'CORPORATE') 
	{	
			document.getElementById('webhosting_platform_nt').disabled = false;
			document.getElementById('webhosting_platform_apache').disabled = false;		
			document.getElementById('form_access_webhosting_ssl').checked = true;
			document.getElementById('form_access_webhosting_ssl').disabled = true;
			document.getElementById('form_access_webhosting_sharedssl').checked = true;
			document.getElementById('form_access_webhosting_sharedssl').disabled = true;
			document.getElementById('form_diskquota').value = 2000;
			document.getElementById('diskquota_text').innerHTML = "2000";
			document.getElementById('websitebandwidth').innerHTML = "1 Gbit redundant";
			document.getElementById('webstatsupdates').innerHTML = "15-Minute updates";
			//document.getElementById('form_access_webhosting_unix_auto').checked = false;
			document.getElementById('form_access_webhosting_unix_auto').disabled = false;
			document.getElementById('form_access_webhosting_unix_manual').disabled = false;
			//document.getElementById('form_access_webhosting_testsub').checked = true;
			document.getElementById('form_access_webhosting_testsub').disabled = false;

			document.getElementById('form_access_mysql').checked = true;
			document.getElementById('form_access_mysql').disabled = true;
			document.getElementById('form_access_mssql').checked = true;
			document.getElementById('form_access_mssql').disabled = true;
			document.getElementById('form_access_msaccess').checked = true;
			document.getElementById('form_access_msaccess').disabled = true;
			
			// Show or Hide hosting subsections
			document.getElementById('hosting_general_options').style.display = 'block';
			if(document.getElementById('webhosting_platform_apache').checked == true)
			{
				document.getElementById('hosting_apache_options').style.display = 'block';
				document.getElementById('hosting_nt_options').style.display = 'none';
				//  Only show Apache Settings if apache-auto-conf is selected
				if(document.getElementById('form_access_webhosting_unix_auto').checked == true)
				{ document.getElementById('apacheoptions').style.display = 'block'; }
				else { document.getElementById('apacheoptions').style.display = 'none'; }
			}
			else if(document.getElementById('webhosting_platform_nt').checked == true)	
			{
				document.getElementById('hosting_apache_options').style.display = 'none';
				document.getElementById('hosting_nt_options').style.display = 'block';
				document.getElementById('apacheoptions').style.display = 'none'; 
			}
	}
	
}



//  Sets the 'disabled' attribute on all form elemtents  (either true or false)
//  Usage:  window.onload= function() { DisableForm(document.Form1,true);}           
function DisableForm(xForm,xHow)
{
  objElems = xForm.elements;
  for(i=0;i<objElems.length;i++){
    objElems[i].disabled = xHow;
  }
}







function resizeFrame() {
  var myFrame = parent.document.getElementById("iframe_main");
  
  myFrame.style.height=(document.body.scrollHeight+50);
  myFrame.style.height=(document.body.offsetHeight+50);

  // RESIZE TO SIZE OF MENU IF CONTENT IS SMALLER
  var minHeight = (parent.document.getElementById("menu").offsetHeight - 35);
  if (myFrame.offsetHeight < minHeight) {
    myFrame.style.height=minHeight;
  }

  // SET MIN
  if (document.body.scrollWidth < 600)
    myFrame.style.width='600px';
  else
    myFrame.style.width=(document.body.scrollWidth);
  
  //myFrame.style.width=(document.body.offsetWidth);
  
  
  // jump back to top
  parent.window.scrollTo(0, 0)
}





function hide(div_id)
{   
  // HIDE DIV
  document.getElementById(div_id).style.display = 'none';
  
  // SET COOKIE
  var date = new Date();
  date.setTime(date.getTime()+(24*60*60*1000*90)); // LAST VALUE IS DAYS
  document.cookie = div_id+"=false; expires="+date.toGMTString();
}

function show(div_id)
{
  // SHOW DIV
  document.getElementById(div_id).style.display = 'block';
  
  // SET COOKIE
  var date = new Date();
  date.setTime(date.getTime()+(24*60*60*1000*90)); // LAST VALUE IS DAYS
  document.cookie = div_id+"=true; expires="+date.toGMTString();
}


function toggle(div_id)
{
  if (document.getElementById(div_id).style.display == 'none')
    show(div_id);
  else
    hide(div_id);
}



// THIS FUNCTION FROM WAS TAKEN FROM
// http://www.quirksmode.org/js/cookies.html
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}


function updateMenuDisplay()
{
	var userbase   = readCookie('userbase');
	var reseller   = readCookie('reseller');
	var mail       = readCookie('mail');
	var account    = readCookie('account');
	var web        = readCookie('web');
	var web_access = readCookie('web_access');
	
	if (userbase == "false")   hide('userbase');
	if (reseller == "false")   hide('reseller');
	if (mail == "false")       hide('mail');
	if (account == "false")    hide('account');
	if (web == "false")        hide('web');
    if (web_access == "false") hide('web_access');
}



function search_field_focus(id) {
  if (document.form_search.form_search.value == 'Enter keyword') {
    document.form_search.form_search.value = ''; 
  }
  var obj = document.getElementById('form_search');
  obj.style.color = '#333333';
  id.className = 'small_textbox_focus';
}
function search_field_blur(id) {
  if (document.form_search.form_search.value == '') {
    document.form_search.form_search.value = 'Enter keyword'; 
    var obj = document.getElementById('form_search');
    obj.style.color = '#A2A2A2';
  }
  id.className = 'small_textbox';
}
function search_field_init(id) {
    if (document.form_search.form_search.value == 'Enter keyword') {
	  var obj = document.getElementById('form_search');
      obj.style.color = '#A2A2A2';
	}
}





function my_focus(id) {
	id.className = id.className + '_focus';
	//alert(id.className);
}
function my_blur(id) {
	var str = id.className;
	id.className = str.substring(0, (str.length-6));
	//alert(id.className);
}


function pricing_popup(id)
{
  if (id.checked == true) {
    alert('Enabling this feature may incur extras charges.\n\nPlease refer to http://www.connexus.net.au/busines/ for pricing.');
  }
}

/*
function show_pricing_popup(id)
{
  var do_not_show_again = readCookie('do_not_show_again');

  if ((id == undefined || id.checked == true) && (do_not_show_again != "true")) {
    document.getElementById('pricing_popup').style.display = 'block';

  }
}

function hide_pricing_popup()
{
  document.getElementById('pricing_popup').style.display = 'none';
}
*/


function hide_forever()
{

  document.getElementById('webcontrol_promo').style.display = 'none';

  // SET COOKIE
  var date = new Date();
  date.setTime(date.getTime()+(24*60*60*1000*90)); // LAST VALUE IS DAYS
  document.cookie = "hide_forever=true; expires="+date.toGMTString();

}

function check_hide()
{
  var hide_forever = readCookie('hide_forever');
  
  if (hide_forever == "true") {
     document.getElementById('webcontrol_promo').style.display = 'none';
  }
}






function hideMe(){
	
	
	 
 // if (isIE||isNN) whichDog.style.visibility="hidden";
 // else if (isN4) document.theLayer.visibility="hide";
  	
  document.getElementById('theLayer').style.display = 'none';
  

  if (document.getElementById('do_not_show_again').checked) 
  {
	// SET COOKIE
    var date = new Date();
	date.setTime(date.getTime()+(24*60*60*1000*90)); // LAST VALUE IS DAYS
	document.cookie = "do_not_show_again=true; expires="+date.toGMTString();
  }
}



function showMe(){
	
   var do_not_show_again = readCookie('do_not_show_again');


   //if ((id == undefined || id.checked == true) && (do_not_show_again != "true")) { 
   
   
   //alert(do_not_show_again);
   
   if (do_not_show_again != "true") {
  
     //if (isIE||isNN) whichDog.style.visibility="visible";
    // else if (isN4) document.theLayer.visibility="show";
     	
     document.getElementById('theLayer').style.display = 'block';
  	
  }
}




// http://www.codelifter.com/main/javascript/dragablelayer.html



// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

/*
function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}
*/

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");
