/*
if(window.opener)
{
	window.resizeTo(intWinWidth,intWinHeight);
}
*/

function winBRopen(theURL, Name, popW, popH) {
	var winHorz = (screen.width-popW)/2;
	var winVert = (screen.height-popH)/2;
	winProp = 'width='+popW+',height='+popH+',left='+winHorz+',top='+winVert+',scrollbars=yes,resizable=yes';
	var Win = window.open(theURL, Name, winProp);
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}

function closeupwindow(){
	window.close();
}

function popupWindow(filename){
	if(filename.length > 0 && strPopUpDirURL.length > 0) {
		puwURL = strPopUpDirURL + filename;
		winBRopen(puwURL,'popupWin1',640,480);
	}
}

function popupWindowNV(){
	if(strPopUpFileURL.length > 0) winBRopen(strPopUpFileURL,'popupWin2',640,480);
}

function closeAndMove(){
	if(strBuyNowURL.length > 0) window.open(strBuyNowURL);
}

function trackFlash(fAction, pfAction, dupClick, diffTime) {
	var tPage = flashTrackPage;
	tPage +='\&fAction=' + escape(fAction) + '\&pfAction=' + escape(pfAction) + '\&dupClick=' + dupClick + '\&diffTime=' + diffTime;
	var xmlHttp = XmlHttp.create();
	var async = true;
	xmlHttp.open("GET", tPage, async);
	xmlHttp.send(null);
}

function setVars(){
	var url = setVars.arguments[0];
	var varStr = '?';

	for(var x=1; x<setVars.arguments.length; x++) {
		varStr += escape(setVars.arguments[x]) + '=' + escape(eval(setVars.arguments[x]));
		if(x < setVars.arguments.length-1) varStr += '&';
	}

	theURL = url + varStr;
	winBRopen(theURL,'EmailFriend',425,425);
} 

function SendInfo(urlPage,referString){
 	myString = referString;
	setVars(urlPage,'myString');
}

function LILWindow(url)
{
	var intHeight = screen.height;
	var intWidth = screen.width;

	var winName = "_blank";
	var intXPos = 10;
	var intYpos = 10;

	var bTool = 'no';
	var	bLoc = 'no';
	var bStatus = 'no';
	var bMenu = 'no';
	var bScroll = 'yes';
	var bResize = 'yes';
	var bHist = 'no';

	var NS4Plus = (document.layers) ? 1 : 0;
	var IE4Plus = (document.all) ? 1 : 0;

	if (intWidth <= 800) {
		intWidth = 750;
		intHeight = 500;
	} else {
		if(IE4Plus) {
			intWidth = 955;
			intHeight = 668;
		} else {
			intWidth = 1000;
			intHeight = 668;
		}
	}

	strProp = '';
	strProp	= strProp + "toolbar=" + bTool + ",location=" + bLoc + ",status=" + bStatus + ",menubar=" + bMenu + ","
	strProp	= strProp + "scrollbars=" + bScroll + ",resizable=" + bResize + ",copyhistory=" + bHist + ",";
	strProp	= strProp + "width=" + intWidth + ",height=" + intHeight + ",left=" + intXPos + ",top=" + intYpos + "";

	window.open(url, winName, strProp);
}