<!--

var submitcount=0;

function checkClicks()
{
   if (submitcount == 0)
   {
      submitcount++;
      return true;
   } else {
      return false;
   }
}

function shipToChange()
{
   if (document.checkout.shipto.checked == true)
   {
      document.checkout.s_name.value      = document.checkout.b_name.value;
      document.checkout.s_address_1.value = document.checkout.b_address_1.value;
      document.checkout.s_address_2.value = document.checkout.b_address_2.value;
      document.checkout.s_city.value      = document.checkout.b_city.value;
      document.checkout.s_state.value     = document.checkout.b_state.value;
      document.checkout.s_zip.value       = document.checkout.b_zip.value;
      document.checkout.s_country.value   = document.checkout.b_country.value;
      document.checkout.s_phone.value     = document.checkout.b_phone.value;
   } else {
      document.checkout.s_name.value      = '';
      document.checkout.s_address_1.value = '';
      document.checkout.s_address_2.value = '';
      document.checkout.s_city.value      = '';
      document.checkout.s_state.value     = '';
      document.checkout.s_zip.value       = '';
      document.checkout.s_country.value   = '';
      document.checkout.s_phone.value     = '';
   }
}

//-->
// custom options update total from input
// Start Main
function start_tot() {
//Start sub
function report(element, event) {
    var elmtname = element.name;
// This is for select objects
    if ((element.type == "select-one") || (element.type == "select-multiple")){
        value = " ";
        for(var i = 0; i < element.options.length; i++)
            if (element.options[i].selected) 
                value += element.options[i].value + " ";
    }
// Slose sub
// This is for Text area's	
    else if (element.type == "textarea") value = "...";
// Everything else
    else value = element.value;
// Get QTY...
	var option_count = +document.forms['autoSumForm'].elements['option_count'].value;  
	
var runningTotal = 0;  
for(var i=1; i<=option_count; i++){  
runningTotal += +document.forms['autoSumForm'].elements['fld'+i].value;
}
	
    var msg = event + ": " + elmtname + ' (' + value + ')\n';
    var t = element.form.quantity;
    t.value = runningTotal;
    element.form.quantity.readOnly=true;
}

// This function adds a bunch of event handlers to every element in the form.
function addhandlers(f) {
    // Loop through all the elements in the form
    for(var i = 0; i < f.elements.length; i++) {
        var e = f.elements[i];
        e.onclick = function( ) {report(this, 'Blur')
		 }
        e.onblur = function( ) { report(this, 'Blur'); }
        e.onselect = function( ) { report(this, 'Select'); }
    }
}
// Finally, activate our form by adding all possible event handlers!
addhandlers(document.autoSumForm);
}

// end


// custom show hide
function HideContent(d) {
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
document.getElementById(d).style.display = "block";
}

function ReverseDisplay(d) {
if(document.getElementById(d).style.display == "none"){ 
document.getElementById(d).style.display = "block"; 
}
else { 
document.getElementById(d).style.display = "none"; 
}
}
// end
//Accordian

var iframeids=["myframe"]
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
// end
 // --------------------
// Hide focus Border
// --------------------

inc_hidefocbrdr_js =
'<!--\nfunction addEvent(obj, evType, fn){ \n if (obj.addEventL'
+ 'istener){ \n   obj.addEventListener(evType, fn, true); \n'
+ '\n   return true; \n } else if (obj.attachEvent){ \n   va'
+ 'r r = obj.attachEvent("on"+evType, fn); \n   return r; \n'
+ '\n } else { \n   return false; \n } \n}\n\n// Find all li'
+ 'nk elements and add an onfocus attribte and value\nfunct'
+ 'ion hideFocusBorders(){\nvar theahrefs = document.getEle'
+ 'mentsByTagName("a");\nif (!theahrefs){return;}\nfor(var '
+ 'x=0;x!=theahrefs.length;x++){\ntheahrefs[x].onfocus = fu'
+ 'nction stopLinkFocus(){this.hideFocus=true;};\n}\n}\n// -->\n';

// end_var_declaration
document.write(inc_hidefocbrdr_js); 


  