function updateContact(){
	try{
		if(document.getElementById('contact_same').checked){
			document.getElementById('user_shipping_street').value = document.getElementById('user_street').value;
			document.getElementById('user_shipping_street').disabled = true;
			document.getElementById('user_shipping_city').value = document.getElementById('user_city').value;
			document.getElementById('user_shipping_city').disabled = true;
			document.getElementById('user_shipping_zip').value = document.getElementById('user_zip').value;
			document.getElementById('user_shipping_zip').disabled = true;
		}else{
			document.getElementById('user_shipping_street').disabled = false;
			document.getElementById('user_shipping_city').disabled = false;
			document.getElementById('user_shipping_zip').disabled = false;
		}
	}catch (Ex){}
}

function resetContact(){
	document.getElementById('contact_same').checked=false; 
	updateContact();
}




function opendetailwindow() { 
  window.open('','detailwindow','toolbar=no,scrollbars=yes,resizable=no,width=680,height=480');
}
  
  function openpopup(open_url, width, height) { 
  	//var w = 680;
  	//var h = 540;
  	var winl = (screen.width - width) / 2;
    var wint = (screen.height - height) / 2;
    popup = window.open(open_url,'Info','toolbar=no,scrollbars=yes,resizable=yes,top='+wint+',left='+winl+',width='+width+',height='+height);
    popup.focus();
  }
  
var activeSub=0;
var SubNum=0;

function reDo(){ 
  window.location.reload() 
}

window.onresize = reDo;

//Define global variables
var timerID = null;
var timerOn = false;
var timecount = 1000;
var what = null;
var newbrowser = true;
var check = false;

    	function init(){
    	  //alert ("Running Init");
          if (document.layers) {
                      //  alert ("Running Netscape 4");
                        layerRef="document.layers";
                        styleSwitch="";
                        visibleVar="inline";
			screenSize = window.innerWidth;
			what ="ns4";


          }else if(document.all){
                      //  alert ("Running IE");
                        layerRef="document.all";
                        styleSwitch=".style";
                        visibleVar="none";
			screenSize = document.body.clientWidth + 18;
			what ="ie";

		  }else if(document.getElementById){
                      //  alert ("Running Netscape 6");
                        layerRef="document.getElementByID";
                        styleSwitch=".style";
                        visibleVar="inline";
			what="moz";
		  
		  }else{
		  	//alert("Older than 4.0 browser.");
			what="none";
			newbrowser = false;
		  }
				
		check = true;
  	 	}

	// Turns the layers on and off
    function showLayer(layerName, buttonName){
    	if(check){
        	if (what =="none"){
        		return;
        	}else if (what == "moz"){
        		document.getElementById(layerName).style.display="inline";
        	}else{
             	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="inline"');
            }
            over(buttonName);
		 }else {
        	return;
        }
	}

        function hideLayer(layerName, buttonName){
        	if(check){
        		if (what =="none"){
        			return;
        			}
        		else if (what == "moz"){
        			document.getElementById(layerName).style.display="none";
        			}
        		else{
                  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.display="none"');
				}
        		out(buttonName);
        	}
        	else {// alert ("Please wait for the page to finish loading.");
        		return;}
        }


		function hideAll(){
				//alert("hide all");
				hideLayer('layer_about', 'nav_button_about');
				}


		function startTime() {
	        if (timerOn == false) {
                timerID=setTimeout( "hideAll()" , timecount);
                timerOn = true;

	        }

		}


		function stopTime() {
	        if (timerOn) {
    	        clearTimeout(timerID);
                timerID = null;
                timerOn = false;
	        }
		}

		function onLoad(){
			init();
		}