
/*************** open print window */
var printWin;

function Print(x){
/* check value of x */
    var printURI;
    if (x == null){
    printURI = "";
    } else {
    printURI = x;
    }

/* execute open popup window */
	if (printWin == null || printWin.closed){
		printWin = window.open(printURI,"","toolbar=no,personal=no,menubar=no,status=yes,resizable=yes,width=600,height=400,location=no,scrollbars=yes");
printWin.print();
		}else{
		printWin.focus();
		printWin.location.replace(printURI);
		printWin.print();
		
	}
}

var winName;
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  //winName.focus();
}



//window.print = function(){
//	alert("test");
//}
window.mmHideMenuTimer = null;
window.mmDHFlag = null;
window.mmStart = null;
window.ActiveMenuItem = 0;

function KC_showMenu(thisSubMenu) { //v2.0
        ActiveMenuItem = 1;
         document.getElementById(thisSubMenu).className="subMenuLayerShow";
}

function KC_startTimeout(thisSubMenu){ //v2.0
        if( window.ActiveMenu ) {
		mmStart = new Date();
		mmDHFlag = true;
		mmHideMenuTimer = setTimeout("KCDoHide(thisSubMenu)", 500);
	}
         
         
}

function KC_clearTimeout() {
	if (mmHideMenuTimer) clearTimeout(mmHideMenuTimer);
	mmHideMenuTimer = null;
	mmDHFlag = false;
}

function KCDoHide(thisSubMenu) {
	if (!mmDHFlag || !window.ActiveMenu) return;
	var elapsed = new Date() - mmStart;
	var timeout = 500;
	if (elapsed < timeout) {
		mmHideMenuTimer = setTimeout("KCDoHide(thisSubMenu)", timeout+100-elapsed);
		return;
	}
	mmDHFlag = false;
	document.getElementById(thisSubMenu).className="subMenuLayerHide";
	window.ActiveMenuItem = 0;
}
