﻿// JScript File


//var message="Function Disabled!";

/////////////////////////////////////
//function clickIE4(){
//if (event.button==2){
//alert(message);
//return false;
//}
//}

//function clickNS4(e){
//if (document.layers||document.getElementById&&!document.all){
//if (e.which==2||e.which==3){
//alert(message);
//return false;
//}
//}
//}

//if (document.layers){
//document.captureEvents(Event.MOUSEDOWN);
//document.onmousedown=clickNS4;
//}
//else if (document.all&&!document.getElementById){
//document.onmousedown=clickIE4;
//}

//document.oncontextmenu=new Function("alert(message);return false")



 function SwitchMenu(obj){
    //alert(obj);
		if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("masterdiv").getElementsByTagName("span");
			if(el.style.display != "block"){
				for (var i=0; i<ar.length; i++){
				    ar[i].style.display = "none";		
				}
				el.style.display = "block";
				createCookie('menuitem',obj,0);
			}else{
				el.style.display = "none";
			}
		}
	}
	 function SwitchMenu2(obj){
	  //alert(obj);
		if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("masterdiv").getElementsByTagName("cite");
			if(el.style.display != "block"){
				for (var i=0; i<ar.length; i++){
				    ar[i].style.display = "none";		
				}
				el.style.display = "block";
				createCookie('menuitem2',obj,0);
			}else{
				el.style.display = "none";
			}
		}
	}
	function openMenu(){
	if (readCookie()!=null){
        var cookie_string = document.cookie;    
          if (cookie_string.length != 0) {          
        var cookie_value = cookie_string.match (
                        '(^|;)[\s]*' +
                        'menuitem' +
                        '=([^;]*)' ); 
        var ar = document.getElementById(readCookie());
					ar.style.display = "block";
     }
        var cookie_string = document.cookie;    
          if (cookie_string.length != 0) {          
        var cookie_value = cookie_string.match (
                        '(^|;)[\s]*' +
                        'menuitem2' +
                        '=([^;]*)' ); 
        var ar = document.getElementById(readCookie2());
					ar.style.display = "block";
     }
      }
      }
      function readCookie() {
	var nameEQ = "menuitem" + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
function readCookie2() {
	var nameEQ = "menuitem2" + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
    function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function print() 
{
var printContent = document.getElementById("PrintMe"); 
var windowUrl = 'about:blank';
var num; 
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();var printWindow = window.open(num, windowName, 'left=10,top=10,width=500,height=500'); 
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
