//This is for rollover on the 1st page + product pages
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		buyitnow_over = newImage("40images/buyitnow-over.gif");
		preloadFlag = true;
	}
}


function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

// used in custom section for swfs
function launchit(theURL,winName,features) { //v1.2
		trywindow=window.open(theURL,winName,features);
		trywindow.focus();
		}

function openPopUp(swfURL)
			{   // use these to set the height and width of the window
				if (openPopUp.arguments[1]) popWidth=openPopUp.arguments[1];
					else popWidth  = 680;
				if (openPopUp.arguments[2]) popHeight=openPopUp.arguments[2];
					else popHeight = 385;
				if (openPopUp.arguments[3]) popName=openPopUp.arguments[3];
					else popName = "myPopUp";
			
			     // see if we've got a mac
			    if (navigator.userAgent.indexOf("Mac") >= 0 ||
			        navigator.userAgent.indexOf("PPC") >= 0)
			    {   menuVar = 'yes';
			    }
			    else
			    {   menuVar = 'no';
			    }
			
			     // set up the parameters
			    theParameters  = "outerwidth=" + popWidth + ",outerheight=" + popHeight;
			    theParameters += ",width=" + popWidth + ",height=" + popHeight;
			    theParameters += ",toolbar=no,location=no,directories=no,status=no";
			    theParameters += ",menubar=" + menuVar + ",scrollbars=yes,resizable=no";
			
			     // make the call to create the new window
			    myNewPopUp = open(swfURL,popName,theParameters);
				myNewPopUp.focus();
			    if (myNewPopUp.opener == null) myNewPopUp.opener = window;
			    myNewPopUp.opener.name = "origPopUp";
				
			    return false;
			}

function storePop(theURL)
	{
	if (document.cookie.indexOf("storePoppedToday=1")==-1)
		{
		document.cookie="storePoppedToday=1";
		return openPopUp(theURL);
		}
	else
		return false;
	}

