function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  windowOpener(theURL,winName,features);
}

function MM_openFullBrWindow(theURL,winName) { //v1.0
  windowOpener(theURL,winName,'width=760,height=420,resizable=1,scrollbars=1,status=1,toolbar=1,location=1,menubar=1');
}

function MM_openFullSizeBrWindow(theURL,winName) { //v1.0
  windowOpener(theURL,winName,'resizable=1,scrollbars=1,status=1,toolbar=1,location=1,menubar=1');
}

// the following code opens new window if
// it does not already exist
// If it is already opened, the window will 
// be brought into focus 

popupWins = new Array();

function windowOpener(url, name, args) {
	
	/******************************* 
	the popupWins array stores an object reference for
	each separate window that is called, based upon
	the name attribute that is supplied as an argument
	*******************************/
	
	if ( typeof( popupWins[name] ) != "object" ){
		popupWins[name] = window.open(url,name,args);
	} else {
		if (!popupWins[name].closed){
			// popupWins[name].location.href = url; // comment out to avoid refresh of flash player on host chat
		} else {
			popupWins[name] = window.open(url, name,args);
		}
	}
	
	popupWins[name].focus();
}

function confirm_delete(){ 
	var del;
	del = confirm('Are you sure you want to delete?');

	if(del){
		return true;
	} else{ 
		return false;
	} 
}

// restrict page to open from main window
// if anyone tries to open this page from iframe, force browser to make this the parent

function checkIframe() {
	if (top.frames.length != 0) {
		if (window.location.href.replace) { top.location.replace(self.location.href); }
		else { top.location.href=self.document.href; }
	}
}

/***********************************************
* Drop Down/ Overlapping Content- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)
subobj.style.display=(subobj.style.display!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) 
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
subobj.style.left=xpos+"px"
subobj.style.top=ypos+"px"
return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}