var state = 'none'; 

function showhideArea(layer_ref, imgname) { //for showing and hiding DIVs

	if (state == 'block') { 
	state = 'none'; 
	imgstate = 'i_expand.gif';
	} 
	else { 
	state = 'block'; 
	imgstate = 'i_collapse.gif';
	} 
	if (document.all) { //IS IE 4 or 5 (or 6 beta) 
	eval( "document.all." + layer_ref + ".style.display = state"); 
	} 
	if (document.layers) { //IS NETSCAPE 4 or below 
	document.layers[layer_ref].display = state; 
	} 
	if (document.getElementById &&!document.all) { 
	hza = document.getElementById(layer_ref); 
	hza.style.display = state; 
	} 

	//change image name
	if (document.getElementById(imgname) != ""){
		document.getElementById(imgname).src = "images/decor/" + imgstate;
	}
}


function isValidEmail(VarString) {
if (VarString.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
	return true;
else
	return false;
}


function addBookmark(title,url) { 
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	}
	else if( document.all ) { 
		window.external.AddFavorite( url, title); 
	}
	else if(window.opera && window.print ){ 
		return true; 
	} 
} 

function Openme(newin, height, width) {
	NewWindow=window.open(newin,"NewWindow","resizable=yes,status=no,scrollbars=yes,width=" + width + ",height=" + height + ",top=15,left=15")
	window.NewWindow.focus();
}

function OpenFullScreen(newin) {
	FullScreen=window.open(newin,"FullScreen","resizable=yes,status=no,scrollbars=yes,top=15,left=15,fullscreen=yes")
	window.FullScreen.focus();
}

