// JavaScript Functions


function newWindow(theURL,winName,winWidth,winHeight,features) { //v2.0
	//winWidth = 460;
	//winHeight = 500;
	winName = 'popwindow';
	winOffX = (screen.width - winWidth - 22)/2;
	winOffY = (screen.height - winHeight)/2 - 50;
	features = "width=" + winWidth + ",height=" + winHeight + ",toolbar=0,menubar=0,scrollbars=1,resizable=0,location=0,directories=0,status=0,left=" + winOffX + ",top=" + winOffY;
	window.open(theURL,winName,features);
}

/*
am = "Sorry, This function is disabled!";
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;

*/


/***********************************************
* 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"
}

//***********************************************




function CloseW() {
	window.close();
}

//***********************************************



function confirm_action(messsage){
	input_box=confirm(messsage);
	return input_box;
}

//***********************************************



function alert_action(messsage){
	input_box=alert(messsage);
	return input_box;
}

//***********************************************



function kadabra(zap, newStyle){
	if(document.getElementById){
		var abra = document.getElementById(zap).style;
		if(abra.display == newStyle){
			abra.display = "none";
		}else{
			abra.display = newStyle;
		}
		return false;
	}else{
		return true;
	}
}

function kadabra2(zap, currentStyle, newStyle){
	if(document.getElementById){
		var abra = document.getElementById(zap).style;
		if(abra.display == newStyle){
			abra.display = currentStyle;
		}else{
			abra.display = newStyle;
		}
		return false;
	}else{
		return true;
	}
}

//***********************************************


