function gogetit(url) {
        if (url != "") {
                self.location = url
        }
}
function reloadPage(init) { 
	if (init==true) with (navigator) {
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.pgW=innerWidth; 
			document.pgH=innerHeight; 
			onresize=reloadPage; 
		}
	} else {
		if (innerWidth!=document.pgW || innerHeight!=document.pgH) {
			location.reload();
		}
	}
}
reloadPage(true);

function openCenterWindow(theURL,winName,features, myWidth, myHeight, isCenter) {
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function CatalogURL(Page)
{
	document.frmSQLModel.page.value = Page;
	document.frmSQLModel.CatalogRedirect.value = 0;
	document.frmSQLModel.submit();
	return false;
}
	
function ProductURL(sLink)
{
	window.location = sLink;
	return false;
}


function DisplayMissing(FName)
{
	alert("We're sorry!\n\nYour Choice of Oakley prescription sunglasses " + FName + " cannot be made for your entered prescription.\n\nHowever, we find a list of prescirption sunglasses that will fit your prescription.\n\nAlternatively, you can call 1-800-248-9427 for additional help.  Thank you!");
}

function func_nav(ipages, iid)
{
  for(var i=0; i<(ipages+5); ++i)
  {
    var objTabPopupLinks = document.getElementById("tabPopup_links_" + i);
    if(objTabPopupLinks)
    {
      objTabPopupLinks.style.display = "none";
    }
  }
  var spanPopup = document.getElementById("spanPopup_1");
  var tabPopup = document.getElementById("tabPopup_1");
  objTabPopupLinks = document.getElementById("tabPopup_links_" + iid);
  if(objTabPopupLinks)
  {
    objTabPopupLinks.style.display = isIE ? "block" : "table";
    if(window.opera)
    {
      objTabPopupLinks.style.display = "table";
    }
    if(spanPopup && tabPopup)
    {
      var iCurrentHeightC = isNaN(tabPopup.style.height) ? parseInt(tabPopup.style.height) : 0;
      var iCurrentWidthC = isNaN(tabPopup.style.width) ? parseInt(tabPopup.style.width) : 0;
      iCurrentHeightC = (tabPopup.scrollHeight > iCurrentHeightC) ? tabPopup.scrollHeight : iCurrentHeightC;
      iCurrentWidthC = (tabPopup.scrollWidth > iCurrentWidthC) ? tabPopup.scrollWidth : iCurrentWidthC;
      iCurrentHeightC = (isIE && !window.opera) ? tabPopup.scrollHeight+2 : tabPopup.scrollHeight;
      iCurrentWidthC = (isIE && !window.opera) ? tabPopup.scrollWidth+2 : tabPopup.scrollWidth;
      spanPopup.style.height = iCurrentHeightC;
      spanPopup.style.width = iCurrentWidthC;
      tabPopup.style.height = iCurrentHeightC;
      tabPopup.style.width = iCurrentWidthC;
      if(window.opera)
      {
        spanPopup.style.border = "none";
        spanPopup.scrollWidth = 700;
      }
    }
  }
}

function func_close()
{
  var objSpanPopup = document.getElementById("spanPopup_1");
  var objTabPopup = document.getElementById("tabPopup_1");
  if(objSpanPopup && objTabPopup)
  {
    objSpanPopup.style.visibility = "hidden";
    objTabPopup.style.visibility = "hidden";
    func_mouseout();
    hidePopup();
  }
}