	function setDivStyle(fl,loading)
//fl is show/hide flag
{
    var el=document.getElementById(loading);
	if(null!=el)
	{
		el.style.visibility = (fl==1)?'visible':'hidden';
		el.style.display = (fl==1)?'block':'none';
		el.style.left = 100;
		el.style.top = 150;
	}
}

//edit by BBQ http://www.happyend.org/
//2004-12-08 
function loadBar(fl,loading)
//fl is show/hide flag
{
	if (typeof(loading) == "undefined") loading = 'loading';
  	var documentWidth,documentHeight;
  	if (self.innerHeight)
  	{// all except Explorer
    	documentWidth = self.innerWidth;
    	documentHeight = self.innerHeight;
 	}
  	else if (document.documentElement && document.documentElement.clientHeight)
  	{// Explorer 6 Strict Mode
   		documentWidth = document.documentElement.clientWidth;
  		documentHeight = document.documentElement.clientHeight;
  	}
  	else if (document.body)
  	{// other Explorers
  		documentWidth = document.body.clientWidth;
  		documentHeight = document.body.clientHeight;
  	}

   	var el = document.getElementById(loading);
	if(null!=el)
	{
		var top = ((documentHeight-el.clientHeight) / 2) + document.body.scrollTop;
		//var top = documentHeight+document.body.scrollTop;
		var left = (documentWidth / 2) - 200;
		if( left<=0 ) left = 10;
		el.style.visibility = (fl==1)?'visible':'hidden';
		el.style.display = (fl==1)?'block':'none';
		el.style.left = left + "px"
		el.style.top = top + "px";
		//el.style.zIndex = 2;
	}
}

function openNewWindow (WINwidth, WINheight, Url,VarStr) {
	showx=0; showy=0;
	if ((parseInt(navigator.appVersion) >= 4 ))
	{
		showx = (screen.width - WINwidth) / 2;
		showy = (screen.height - WINheight) / 2;
	}
        newWINwidth = WINwidth + 4 + 18;
//	window.open(Url,'manageKs','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width=newWINwidth+"px",height=WINheight+"px",left=showx+"px",top=showy+"px"'); 
if(WINwidth>screen.width) WINwidth=screen.width;
if(WINheight>screen.height) WINheight=screen.height;
        var features ='toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+WINwidth+',height='+WINheight+',left='+showx+',top='+showy;

        var endtarget = Url;

//      window.open(endtarget, '', '');
         window.open(endtarget,"newWindow", features);

}

function hiddenSelect(){
	if(typeof(document.searchForm.searchBy) == "undefined" || typeof(document.searchForm) == "undefined"){
		
	}else{
		document.searchForm.searchBy.style.visibility="hidden";	
	}
}
function showSelect(){
	if(typeof(document.searchForm.searchBy) == "undefined" || typeof(document.searchForm) == "undefined"){
		
	}else{
		document.searchForm.searchBy.style.visibility="visible";	
	}
}
