var showHideElementIsDebug = true; 

function showHideElement(elemName) {
	var elem = document.getElementById(elemName);
	if (elem == null) {
		//element with elemName not found
			if (showHideElementIsDebug) {
				alert("Error in showHideElement function (debug mode enabled)\r\n\r\nElement with name \"" + elemName + "\" not found");
			}
			return false;
	}

	var currentDisplayStyle = elem.style.display
	if (currentDisplayStyle == null) {
		//display style is not specified on this element.
			if (showHideElementIsDebug) {
				alert("Error in showHideElement function (debug mode enabled)\r\n\r\nElement with name \"" + elemName + "\" does not have the \"display\" style defined");
			}
			return false;
	}

	if (currentDisplayStyle == "none") {
			elem.style.display = "block";
	}
	else {
			elem.style.display = "none";
	}
	return true;

}//showHideElement

var ns, ns6, ie;

ns  = (document.layers) ? true : false;
ns6 = (document.getElementById) ? true : false;
ie  = (document.all) ? true : false; 

function changeVisibility(divName,boolShow){
  
		if(boolShow)
		{
          document.getElementById(divName).style.display = "";
        } 
        else 
        {
          document.getElementById(divName).style.display = "none";
        }

}

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

function StartPrint() {
  if(document.all){ print(); }
  else { window.print(); }
}
