
// Right Click Disable
var message="Images on this site are property of Sports Imports and are copyright protected.";
function clickIE4(){
	if (event.button==2){if(location.host=='216.205.146.139'){return}; alert(message);return false;}
}
function clickNS4(e){
	if(location.host=='216.205.146.139'){return};
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){alert(message);return false;}
	}
}
if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}
else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}
if(location.host!='216.205.146.139'){document.oncontextmenu=new Function("alert(message);return false")}

function clearValue(field)
{
if (field.defaultValue == field.value)
field.value = "";
}
function popup_ver(url)
{
    //fix this and facility planner page
//	options = "top=250,left=300,width=" + width + ",height=" + height + options;
	//window.open(url, "Product Specifications", options);
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=325,height=325');");
	
}
function popup_prodspec325(url)
{
    //fix this and facility planner page
//	options = "top=250,left=300,width=" + width + ",height=" + height + options;
	//window.open(url, "Product Specifications", options);
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=325,height=325');");
	
}
function popup_prodspec200(url)
{
    //fix this and facility planner page
//	options = "top=250,left=300,width=" + width + ",height=" + height + options;
	//window.open(url, "Product Specifications", options);
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=200,height=200');");
	
}
function popup_printinvoice(url)
{
    //var newoptions = "top=150,left=200,width=" + width + ",height=" + height + options;
    //window.open(url,"Printable Invoice",options);
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=600,height=500');");
}
function popup_forgotpass(url)
{
    //options = "top=150,left=200,width=" + width + ",height=" + height + options;
    //window.open(url,"Send Forgotten Password",options);
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=400,height=200');");
}
function popup_quoteinfo(url)
{
    //options = "top=350,left=400,width=" + width + ",height=" + height + options;
    //window.open(url,"Quote Information",options);
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=430,height=200');");
}
//facility planner dropdown/product specification popup
function updateSpecIcon(id)
{
   sImgSpec = eval("document.packageopts." + id + ".options[document.packageopts." + id + ".selectedIndex].value")
   aImgSpec = sImgSpec.split("_")
   if (aImgSpec[0] == null || aImgSpec[0] == "") alert("You must select an item from the left pulldown menu")
   else popup_prodspec325("./pspec.php?pid=" + aImgSpec[0])
               
}
//facility planner dropdown/product image popup
function updateImgIcon(id)
{
   sImgSpec = eval("document.packageopts." + id + ".options[document.packageopts." + id + ".selectedIndex].value")
   aImgSpec = sImgSpec.split("_")
       if (aImgSpec[0] == null || aImgSpec[0] == "") alert("You must select an item from the left pulldown menu")
       else popup_prodspec200("./ppic.php?pid=" + aImgSpec[0])
}

function checkDropDowns(page)
{
//alert("in drop down check");

var control = document.getElementsByTagName('select');//page.form[1].elements;     //getElementsByTagName('select');
    //alert("first element " + control[0].options[control[0].selectedIndex].value);
    for(var i=0;i<control.length;i++)
    {
        if(control[i].options[control[i].selectedIndex].value == null || control[i].options[control[i].selectedIndex].value == "")
        {
            alert("You must select an item for all pull down menus.");
            return false;
        }
    }
    return true;
}
//pop up function for fac planner carbon/byo definitions
function popUp_packagedescript(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=150');");
}
//product thumbs title rollover
function titleSwap(txt)
{
    elem = document.getElementById("ptitleroll");
    elem.innerHTML = txt;
}
function titleClear()
{
    elem = document.getElementById("ptitleroll");
    elem.innerHTML = "";
}
// Rollover Images

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
	MM_swapImgRestore();
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showColorInfo (name,number) {
		document.getElementById('ColorName').innerHTML = name;
		document.getElementById('ColorNumber').innerHTML = number;
}
function clearColorInfo () {
	document.getElementById('ColorName').innerHTML = "";
	document.getElementById('ColorNumber').innerHTML = "";
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

