     isNS4 = (document.layers) ? true : false;
     isIE4 = (document.all && !document.getElementById) ? true : false;
     isIE5 = (document.all && document.getElementById) ? true : false;
     isNS6 = (!document.all && document.getElementById) ? true : false;
	 
	 
//###########################################################################
// slow openup of underlying DIV layer
//###########################################################################
var x = 720;
var f = 1;
var t;
var q = 0;
function changewidth(){
 	if(x>=720&&f==0){f=1;return;}
 	if(x<=0&&f==1){f=0;return;}
 	if(f)q=-60;if(!f)q=60;x=x+q;
 	if (x>720){x = 720;}
	if (x<=0){x = 0;}
 	e = document.getElementById("ProjectImages");
 	e.style.width = x + 'px';
  	t=setTimeout("changewidth();",0); 
}



//###########################################################################
// scroll within DIV layer
//###########################################################################
scrollStep=5
timerLeft=""
timerRight=""
function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}



//###########################################################################
// 2 function to get the clients height/width - then center the canvass
//###########################################################################
var ProjLeft;
var ProjTop;
function CentreCanvass() {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}

	ProjTop = ((myHeight - 590) / 2) + 112 + 80;
  	ProjLeft = ((myWidth - 980) / 2) + 260;
	PadTop = (myHeight - 590) / 2;
	if (PadTop < 0) {
		PadTop = 0;
	}
	PadLeft = (myWidth - 980) / 2;
	if (PadLeft < 0) {
		PadLeft = 0;
	}
	
	document.getElementById('Canvass').style.paddingTop = PadTop;
	document.getElementById('Canvass').style.paddingLeft = PadLeft;
	document.getElementById('Canvass').style.visibility = "visible";
	
	
	document.getElementById('ProjectImages').style.xpos = ((myWidth - 980) / 2) + 260;
//	document.getElementById('ProjectImages').style.ypos = y;
	document.getElementById('ProjectImages').style.left = ((myWidth - 980) / 2) + 260;
//	document.getElementById('ProjectImages').style.top = y;	
	document.getElementById('ProjectImages').style.visibility = "visible";
}

function MoveProj(){
	document.getElementById('ProjectHidden').style.left = ProjLeft;
	document.getElementById('ProjectImages').style.left = ProjLeft;
	document.getElementById('ProjectHidden').style.top = ProjTop;
	document.getElementById('ProjectImages').style.top = ProjTop;
}

function ToggleDiv(strDivName) {
	var strType;
	strType = strDivName.substr(0,1);
	strID = strDivName.substr(1);
	//identify the element based on browser type
	if (isNS4) {
		objElement = document.layers[strDivName];
	} else if (isIE4) {
		objElement = document.all[strDivName].style;
	} else if (isIE5 || isNS6) {
		objElement = document.getElementById(strDivName).style;
	}

	if(isNS4){
		if(objElement.display == "hidden"){
			objElement.visibility = "visible";
		} else {
			objElement.visibility = "hidden";	
		}	
	} else if(isIE4){
		if(objElement.display == "hidden"){
			objElement.visibility = "visible";
		} else {
			objElement.visibility = "hidden";	
		}	
	} else if (isIE5 || isNS6) {
		if(objElement.display == "none"){
			objElement.display = "";
		} else {
			objElement.display = "none";
		}
	}
}

function CallPrint(strid){
	var prtContent = document.getElementById(strid);
	var WinPrint = window.open('','','left=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0');
	WinPrint.document.write(prtContent.innerHTML);
	WinPrint.document.close();
	WinPrint.focus();
	WinPrint.print();
	WinPrint.close();
//	prtContent.innerHTML=strOldOne;
}