/*
window.onresize=alertSize; 
function alertSize() {
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth;
	    myHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth = document.documentElement.clientWidth;
	    myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myWidth = document.body.clientWidth;
	    myHeight = document.body.clientHeight;
	  }
	 document.getElementById("scrollArea").style.height = (myHeight-80);
	}
*/
		
var NS=document.all;
function centerWindow() { 
	if(!NS){self.moveTo((self.screen.width - self.outerWidth) / 2, (self.screen.height - self.outerHeight) / 2);}
	else{self.moveTo((self.screen.width-document.body.clientWidth) / 2, (self.screen.height-document.body.clientHeight) / 2);}
	self.focus()
}

function popup(pageURL,pageWidth,pageHeight) { 
	try{popfnwin.close()}
	catch(e){};
	popfnwin=window.open(pageURL, "popup", "resizable=1,status=1,WIDTH="+pageWidth+",HEIGHT="+pageHeight)
}

function reloadPage(queryString){
	thisURL = this.location.href
	if (thisURL.lastIndexOf("?")!=-1){
		thisURL = thisURL.substring(0, thisURL.lastIndexOf("?"))
	}
	if (thisURL.lastIndexOf("#")!=-1){
		thisURL = thisURL.substring(0, thisURL.lastIndexOf("#"))
	}
	if (queryString!=''){
		thisURL = thisURL + "?" + queryString
	}
	this.location.href=thisURL; 
}

		
function jump(queryName,queryValue){
	if(queryName != ""){
		if(queryValue != ""){
			document.location = ChangeQueryStringValue(queryName,queryValue);
		}else{
			DeleteQueryStringValue(queryName)
		}
	}
}


function UrlEncode(text){		
	text=ReplaceAll(text, "?", "%3F");
	text=ReplaceAll(text, "=", "%3D");
	text=ReplaceAll(text, "&", "%26");
	text=ReplaceAll(text, " ", "+");
	text=ReplaceAll(text, ",", "%2c");	
	return text;
}

function ReplaceAll(varb, replaceThis, replaceBy){	
	newvarbarray=varb.split(replaceThis);
	newvarb=newvarbarray.join(replaceBy);	
	return newvarb;
}