/* Remove the tld from the domain entered when the user submits
 * The domain search form
 */
function stripDomain(){
	var jb=document.domainForm.domain.value.split(".")[0];
	document.domainForm.domain.value = jb;
	//alert(jb);
}

/* jQuery Stuff */
$(document).ready(function(){

	/* Fix for browsers with javascript disabled */
	if($('#hidden1').length > 0){
		document.getElementById("hidden1").style.height="154px";
	}
						   
	$("#advertBarContainer").cycle({
		fx:       'fade', 
		speed:    1500,
		timeout:  10000 
	});

	// General error
	function generalMessage(actionClass,displayElement){ // actionClass is the class of the element you want to call the displayElement. displayElement is your error.
		var showing = 0;
	    $(actionClass).click(function() {
			if(showing == 0){
				showing = 1;
	    		$(displayElement).slideDown() // Show message
				.animate({opacity: 1.0}, 5000) // Hold it there for 5 seconds
				.animate({opacity: 0.0}, 2000) // Fade it out
				.slideUp().animate({opacity: 1.0}, 1, function(){showing = 0;}); // Hide it
			}
	    });
	}
		
});

function remframes()
{
  if (top.location != location) {
    top.location.href = document.location.href;
  }

}

function maximizeWin() {
  if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
    window.moveTo(0, 0);
    window.resizeTo(aw, ah);
  }
}

function toggle_visibility(id) {
   var e = document.getElementById(id);
   if(e.style.display == 'block')
      e.style.display = 'none';
    else
      e.style.display = 'block';
}

