function Back()
{
	history.back();
}

function openPDF(PDFFile, PDFWidth, PDFHeight)
{
    var PDFWin;
	var windowTop = ((screen.height/2) - (PDFHeight/2));
	var windowLeft = ((screen.width/2) - (PDFWidth/2));
	var windowProps = "width="+PDFWidth+",height="+PDFHeight+",scrollbars=0,top="+windowTop+",left="+windowLeft;
    PDFWin = window.open(PDFFile, "ViewPDF", windowProps);
}

function PopVideo(url, WinWidth, WinHeight)
{
	var width  = WinWidth;
	var height = WinHeight;
	var left   = (screen.width  - width)/2;
	var top    = (screen.height - height)/2;
	var params = 'width='+width+', height='+height;
	params += ', top='+top+', left='+left;
	params += ', directories=no';
	params += ', location=no';
	params += ', menubar=no';
	params += ', resizable=no';
	params += ', scrollbars=no';
	params += ', status=no';
	params += ', toolbar=no';
	newwin=window.open(url,'windowname5', params);
}

function ZoomPicture(ImgName, ImgTitle, ImgWidth, ImgHeight)
{
	var popUp; 
	var windowProps = "width=1,height=1,scrollbars=0";
	popUp = window.open('', "Picture", windowProps);
	popUp.resizeTo(ImgWidth, ImgHeight);
	var thisWindow = popUp.document;
	var NS = (navigator.appName=="Netscape")?true:false;

	thisWindow.write('<html><head><title>Zoom Image - ')
	thisWindow.write(ImgTitle);
	thisWindow.write('</Title></head>');
	thisWindow.write('<body onBlur="self.focus()"><center><img src=');
	thisWindow.write(ImgName);
	thisWindow.write(' border=0></center>');
	thisWindow.write('<div align=right><img src="Images/LogoSmall.jpg" border=0></div>');
	thisWindow.write('<center><a href="javascript:self.close()">Close</a></center>');
	thisWindow.write('</body></html>');
	thisWindow.close();
}

function PopImage(ImgName,Title,Wi,He)
{
	var popUp; 
	var windowProps = "width=400,height=400,scrollbars=0";
	popUp = window.open('', "Picture", windowProps);
	popUp.resizeTo(Wi,He);
	var thisWindow = popUp.document;
	thisWindow.write('<html><head><title>');
	thisWindow.write(Title);
	thisWindow.write('</title>');
	thisWindow.write('<link rel="stylesheet" href="js.css">');
	thisWindow.write('</head><body><p><img src=');
	thisWindow.write(ImgName);
	thisWindow.write(' border=0></p>');
	thisWindow.write('</head><body><center><p><a href="javascript:self.close()">Close</a></p></center>');
	thisWindow.write('</body></html>');
	thisWindow.close();
}

function DisplayPicture(ImgName,Wi,He)
{
	var popUp; 
	var windowProps = "width=313,height=335,scrollbars=0";
	popUp = window.open('', "Picture", windowProps);
	popUp.resizeTo(Wi,He);
	var thisWindow = popUp.document;
	thisWindow.write('<html><head></head>');
	thisWindow.write('<body onBlur="self.focus()"><img src=');
	thisWindow.write(ImgName);
	thisWindow.write(' border=0>');
	thisWindow.write('<center><a href="javascript:self.close()">Close</a></center>');
	thisWindow.write('</body></html>');
	thisWindow.close();
}

function OldDisplayPicture(ImgName)
{
	var popUp; 
	var windowProps = "width=600,height=600,scrollbars=0,titlebar=0";
	popUp = window.open(ImgName, "Picture", windowProps);
}

function PopCVV2()
{
	var popUp;
	var windowProps = "width=620,height=600,scrollbars=1,resizable=1";
	popUp = window.open("WhatIsCVV.aspx", "WhatIsCVV", windowProps);
}

function PopWindow(Url)
{
	var popUp; 
	var windowProps = "width=600,height=450,scrollbars=1,resizable,top=300,left=300";
	popUp = window.open(Url, "PopWindow", windowProps);
}

function PopWindowSized(Url)
{
	var popUp; 
	var windowProps = "width=797,height=450,scrollbars=1,resizable,top=300,left=300";
	popUp = window.open(Url, "PopWindow", windowProps);
}

function PopWindowVideo(Url)
{
	var popUp; 
	var windowProps = "width=320,height=256,scrollbars=0,resizable,top=300,left=300";
	popUp = window.open(Url, "PopWindow", windowProps);

}

function CloseWindow()
{
	self.close();
}
			
function PrintWindow()
{
	if (window.print) 
	{
		window.print();
	}
}

function AddFavorite()
{  
    var title="title"
    var url="http://www.domain.com"

    if (window.sidebar) window.sidebar.addPanel(title, url,"");

    else if( window.opera && window.print )
    {
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',url);
    mbm.setAttribute('title',title);
    mbm.click();
    }

    else if( document.all ) window.external.AddFavorite( url, title);
}
