<!--

userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function findElement(n,ly) {
	if (browserVers < 4)		return document[n];
	var curDoc = ly ? ly.document : document;
	var elem = curDoc[n];
	if (!elem) {
		for (var i=0;i<curDoc.layers.length;i++) {
			elem = findElement(n,curDoc.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (document.layers) {
				img = findElement(changeImages.arguments[i],0);
			}
			else {
				img = document.images[changeImages.arguments[i]];
			}
			if (img) {
				img.src = changeImages.arguments[i+1];
			}
		}
	}
}

var preloadFlag = false;

function preloadImages() {
	if (document.images) {
		
		// Nav Images to preload
		//about_cdpac_over = newImage("/images/but_about_cdpac_over.gif");
		
		preloadFlag = true;
	}
}

function setTopEndWidth() {
	//alert(window.innerWidth);
	
}

if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){
	return false;
}
function HM_f_PopDown(){
	return false;
}
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;


HM_PG_MenuWidth = 150;
HM_PG_FontFamily = "verdana,geneva,arial,sans serif";
HM_PG_FontSize = 8;
HM_PG_FontBold = 0;
HM_PG_FontItalic = 0;
HM_PG_FontColor = "#104963";		//"#003366";
HM_PG_FontColorOver = "#104963";	//"#ffffff";
HM_PG_BGColor = "#f7f3ff";			//"#e5e5e5";
HM_PG_BGColorOver = "#adc3d6";		//"#336699";
HM_PG_ItemPadding = 3;

HM_PG_BorderWidth = 1;
HM_PG_BorderColor = "#6386a5"; 		//"#cccccc";
HM_PG_BorderStyle = "solid";
HM_PG_SeparatorSize = 1;
HM_PG_SeparatorColor = "#6386a5";	//"#cccccc";
HM_PG_ImageSrc = "/images/arrow_blue.gif";
HM_PG_ImageSrcLeft = "/images/arrow_r.gif";

HM_PG_ImageSize = 11;
HM_PG_ImageHorizSpace = 0;
HM_PG_ImageVertSpace = 2;

HM_PG_KeepHilite = true;
HM_PG_ClickStart = 0;
HM_PG_ClickKill = 0;
HM_PG_ChildOverlap = 1;
HM_PG_ChildOffset = -1;
HM_PG_ChildPerCentOver = null;
HM_PG_TopSecondsVisible = 0;
HM_PG_StatusDisplayBuild =0;
HM_PG_StatusDisplayLink = 1;
HM_PG_UponDisplay = null;
HM_PG_UponHide = null;
HM_PG_RightToLeft = false;

HM_PG_CreateTopOnly = 1;
HM_PG_ShowLinkCursor = 1;
HM_PG_NSFontOver = true;

//HM_a_TreesToBuild = [1,2];

// For Drop down menu when resizing

var IE4 = (document.all) ? true : false;
var NS4 = (document.layers) ? true : false;
var NS6 = (document.getElementById) ? true : false;

function getWindowWidth() {
	if (NS4) {
		var windowWidth = window.innerWidth;
	} else if (IE4) {
		var windowWidth = document.body.clientWidth;
	} else if (NS6) {
	
	}
	return windowWidth;
	//alert(leftMargin);
}

function getTopPosition() {
	return 16;	
}

function getLeftPosition() {
	//alert("Test");
	if (NS4) {
	
	} else if (IE4) {
		var minWidth = 260;  // when left position does not change
		if (getWindowWidth() < (minWidth) + 1) {
			var leftMargin = 20;
		} else {
			var leftMargin = ((getWindowWidth()/2) - 223);
		}
	}
	return leftMargin;
}

function getTarget(e) {
	if (NS4) {
		var mX = e.pageX; 
		var mY = e.pageY;
	} else if (IE4) {
		var mX = event.clientX; 
		var mY = event.clientY;
	}
	
	//var rightMargin = leftMargin + 780;
	
	//if ((mY > 340) || (mY < 180) || (mX < leftMargin) || (mX > rightMargin)) {
		//alert(leftMargin);
	//}
}

function getResize(e) {
	location.reload();
}

// For Netscape 4 captures the event of mouse movement
if (NS4) {
	document.captureEvents(Event.MOUSEMOVE)
}
// mouse move event handler for N4 and IE4
document.onmousemove = getTarget;
window.onresize = getResize;

// End of code when resizing


// -->