
// nav variables declared here so they are never undefined
var nav1 = '';
var nav2 = '';


// POPUP

function popup (url) {
	var newwindow;			
	newwindow = window.open(url,'emailgucci','height=450,width=265,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

function popupwide (url) {
	var newwindow2; 
	newwindow2 = window.open(url,'gucci','height=450,width=395,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no');
	if (window.focus) {newwindow2.focus()}
	return false;
}

function popupCCId (url) {
	var newwindow3;
	newwindow3 = window.open(url,'ccid','height=340,width=370,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
	if (window.focus) {newwindow3.focus()}
	return false;
}

function popupprint (url) {
	var newwindow4;
	newwindow4 = window.open(url,'printwindow','height=504,width=520,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
	if (window.focus) {newwindow4.focus()}
	return false;
}

// BEGIN IMAGE SWAP CODE

// image swap, on state
function imgOn(imgName) {
	myImage = eval('document.' + imgName);
	if(document.images)
		myImage.src = eval(imgName + '_on.src');
}

// image swap, off state
function imgOff(imgName) {
	myImage = eval('document.' + imgName);
	if(document.images)
		myImage.src = eval(imgName + '_off.src');
}

// SCENE 7
function logNoIndex(message)
{
		var cleanMessage = unescape(message);
		var messageArray = cleanMessage.split(",");
		if (messageArray[0]== "LOAD")
			setTimeout('swapZoomNoIndex()',1000);
}

function swapZoomNoIndex()
{
		var full = document.getElementById("rightcolfull");
		full.style.display = "none";
		var zoom = document.getElementById("rightcolzoom0");
		zoom.style.display = "block";
}

function log(message, index)
{
	if(document.availability.variation[index].checked == true ||
		(document.availability.variation.value==undefined && index=='0')) {
		var cleanMessage = unescape(message);
		var messageArray = cleanMessage.split(",");
		if (messageArray[0]== "LOAD")
			setTimeout('swapZoom('+index+')',1000);
	}
}

function swapZoom(index)
{
	if(document.availability.variation[index].checked == true ||
		(variationSelected==false && index=='0')) {
		var full = document.getElementById("rightcolfull");
		full.style.display = "none";
		var zoom = document.getElementById("rightcolzoom"+index);
		zoom.style.display = "block";
	}
}

function makevisible(name) {
	var statusItem = document.getElementById(name);
	statusItem.style.display = "block";
}

function getHttp() {
  var http;
  // needs the + " " for some reason
  http = document.location + " ";
  var i;
  i = http.indexOf(":");
  if(i<0) {
    http = "http";
  }
  else {
    http = http.substr(0,i);
  }
  return http;
}