function DisplayContentWindow(imageLocation, windowName)
{	var windowOptions = "directories=no,location=no,menubar=no,resizable=yes,status=no,toolbar=yes,scrollbars=yes";
	window.open(imageLocation, windowName, windowOptions);
}

function DisplayContentWindow(imageLocation, width, height)
{	var windowOptions = "width=" + width + ", height=" + height + ", scrollbars=yes, status=no, menubar=no, location=no, directory=no, toolbar=no, resizable=yes";
	window.open(imageLocation, "_blank", windowOptions);
}

function popUp(URL) 
{	var day = new Date();
	var id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=320,height=457');");
}

function popUp2(URL) 
{	var day = new Date();
	var id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=420,height=600');");
}


function openMainWindow(sUrl)
{	var windowOptions = "toolbar=no,status=yes,scrollbars=yes,resizable=yes,menubar=no,location=no,directories=no,titlebar=no,"
							+ "width=" + screen.width + ",height=" + screen.height + ",top=0,left=0";
	window.open(sUrl, "_blank", windowOptions);
	self.opener = this;
	self.close();
}

function gotoAnchor(sDivObject, sAnchorObject)
{	var scrollObject = document.getElementById(sDivObject);
	var anchorObject = document.getElementById(sAnchorObject);
	
	var anchorOffset = anchorObject.offsetTop;
	var scrollHeight = scrollObject.style.pixelHeight;
	
	if(anchorOffset >= scrollHeight * (0.75) && (anchorOffset < scrollHeight))
	{	scrollObject.scrollTop = anchorOffset - scrollHeight / 4;
	}
	else if(anchorOffset > scrollHeight)
	{	scrollObject.scrollTop = anchorOffset - scrollHeight / 2;
	}
}