function HideContent() {
   var argv=HideContent.arguments;
   var argc=argv.length;
   var i;
   if(argc < 1) { return; }
   for(i=0;i< argc;i++)
   {
 
      if(document.getElementById(argv[i]) !== null && document.getElementById(argv[i]) != undefined )
   {
      document.getElementById(argv[i]).style.display = "none";
    }
   }

}
function ShowContent() {
   var argv=ShowContent.arguments;
   var argc=argv.length;
   if(argc < 1) { return; }
   for(i=0;i< argc;i++)
   {
     if(document.getElementById(argv[i]) !== null && document.getElementById(argv[i]) != undefined )
     {

       document.getElementById(argv[i]).style.display = "";
     }
   }
}


function newWindow(url)
{
window.open(url,"");
}
function sectionRefresh(a,b) {
if(a.length < 1 || b.length < 1) { return;}
  //document.getElementById(a).innerHTML = document.getElementById(b).innerHTML;
  document.getElementById(b).style.display = "none";
  document.getElementById(b).style.display = "";
}

function edit(page) {
   var action = document.forms['shippingAddress'].action;

   if (action.indexOf("?") != -1 && action.indexOf("edit") != -1) {
	action += "&edit="+page;
   } else {
	action += "?edit="+page;
   }
   document.forms['shippingAddress'].action = action;
   document.forms['shippingAddress'].submit();
}

function edit(page,kitDtl) {
    var action = document.forms['shippingAddress'].action;

    if (action.indexOf("?") != -1 && action.indexOf("edit") != -1) {
        action += "&edit="+page;
    } else {
        action += "?edit="+page;
    }
    document.forms['shippingAddress'].action = action+"&kitName="+kitDtl;

document.forms['shippingAddress'].submit();
}
// Function reDirect
//  Handles the action for the direct link (tool box links)


function reDirect(param) {

  var action = document.mainForm.action;
  if (action.indexOf("?") != -1) {
        action += "&" + param;
  } else {
        action += "?" + param;
  }

  document.mainForm.action = action;
  document.mainForm.submit();
}

function setCountryid(countryid){
    document.getElementById(countryid).value = "United States of America";
 }
function setCountry(countryid){
    document.getElementById(countryid).value = "US";
 }
function setCanada(countryid){
    document.getElementById(countryid).value = "Canada";
 }

function clearState(stateid)
{
   if(document.getElementById(stateid)!= null && document.getElementById(stateid)!= undefined)
    {
      document.getElementById(stateid).value = "";
    }
 }



//
// Function to open any content in a popup window
//

function popupWin(file,width,height) 
{
	if (navigator.appName == "Microsoft Internet Explorer") { width=width+20; height=height+20;}

	if (parseInt(navigator.appVersion) < 4)  
	{ 
		width=width+20; 
		height=height+20; 
	}

	newWindow = window.open(file,"PopupWindow","dependent=yes,toolbar=no,location=no,status=no,scrollbars=yes,resizable=no,width="+width+",height="+height);


	if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 3) 
window.open(windowLoc,"PopupWindow","status=no,scrollbars=yes,resizable=no,width="+width+",height="+height);


	if (parseInt(navigator.appVersion) >= 3 && navigator.appName == "Netscape")
	newWindow.focus();

}

//
// Function to open any content in a popup window
//

function popupWin2(file,width,height,left,top) 
{
	if (navigator.appName == "Microsoft Internet Explorer") { width=width+20; height=height+20;}

	if (parseInt(navigator.appVersion) < 4)  
	{ 
		width=width+20; 
		height=height+20; 
	}

	newWindow = window.open(file,"PopupWindow","dependent=yes,toolbar=no,location=no,status=no,scrollbars=yes,resizable=no,width="+width+",height="+height+",left="+left+",top="+top);


	if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 3) 
window.open(windowLoc,"PopupWindow","status=no,scrollbars=yes,resizable=no,width="+width+",height="+height+",left="+left+",top="+top);


	if (parseInt(navigator.appVersion) >= 3 && navigator.appName == "Netscape")
	newWindow.focus();

}

function getCountryAsCode(countryName) {
var countryList = new Array();
countryList["Afghanistan"]="AF";
countryList["Albania"]="AL";
countryList["Algeria"]="DZ";
countryList["American Samoa"]="AS";
countryList["Andorra"]="AD";
countryList["Anguilla"]="AI";
countryList["Antarctica"]="AQ";
countryList["Antigua and Barbuda"]="AG";
countryList["Argentina"]="AR";
countryList["Armenia"]="AM";
countryList["Aruba"]="AW";
countryList["Australia"]="AU";
countryList["Austria"]="AT";
countryList["Azerbaijan"]="AZ";
countryList["Bahamas,The"]="BS";
countryList["Bahrain"]="BH";
countryList["Bangladesh"]="BD";
countryList["Barbados"]="BB";
countryList["Belarus"]="BY";
countryList["Belgium"]="BE";
countryList["Belize"]="BZ";
countryList["Benin"]="BJ";
countryList["Bermuda"]="BM";
countryList["Bhutan"]="BT";
countryList["Bolivia"]="BO";
countryList["Bouvet Island"]="BV";
countryList["Brazil"]="BR";
countryList["British Indian Ocean Territory"]="IO";
countryList["British Virgin Islands"]="VI";
countryList["Brunei"]="BN";
countryList["Burundi"]="BI";
countryList["Bulgaria"]="BG";
countryList["Cambodia"]="KH";
countryList["Cameroon"]="CM";
countryList["Canada"]="CA";
countryList["Cape Verde"]="CV";
countryList["Cayman Islands"]="KY";
countryList["Central African Republic"]="CF";
countryList["Chad"]="TD";
countryList["Chile"]="CL";
countryList["China"]="CN";
countryList["Congo(Kinshasa)"]="CG";
countryList["Conga(Brazzaville)"]="CG";
countryList["Colombia"]="CO";
countryList["Comoros"]="KM";
countryList["Costa Rica"]="CR";
countryList["Cote d Ivoire"]="CI";
countryList["Croatia"]="HR";
countryList["Cyprus"]="CY";
countryList["Czech Republic"]="CZ";
countryList["Denmark"]="DK";
countryList["Djibouti"]="DJ";
countryList["Dominica"]="DM";
countryList["Dominican Republic"]="DO";
countryList["Ecuador"]="EC";
countryList["Egypt"]="EG";
countryList["El Salvador"]="SV";
countryList["Equatorial Guinea"]="GQ";
countryList["Eritrea"]="ER";
countryList["Estonia"]="EE";
countryList["Ethiopia"]="ET";
countryList["Falkland Islands"]="FK";
countryList["Faroe Islands"]="FO";
countryList["Fiji"]="FJ";
countryList["Finland"]="FI";
countryList["France"]="FR";
countryList["French Guiana"]="GF";
countryList["French Polynesia"]="PF";
countryList["Gabon"]="GA";
countryList["Georgia"]="GE";
countryList["Germany"]="DE";
countryList["Ghana"]="GH";
countryList["Gibraltar"]="GI";
countryList["Greece"]="GR";
countryList["Greenland"]="GL";
countryList["Grenada"]="GD";
countryList["Guadeloupe"]="GP";
countryList["Guam"]="GU";
countryList["Guatemala"]="GT";
countryList["Guinea"]="GN";
countryList["Guinea-Bissau"]="GW";
countryList["Guyana"]="GY";
countryList["Haiti"]="HT";
countryList["Honduras"]="HN";
countryList["Hong Kong"]="HK";
countryList["Hungary"]="HU";
countryList["Iceland"]="IS";
countryList["India"]="IN";
countryList["Indonesia"]="ID";
countryList["Ireland"]="IE";
countryList["Israel"]="IL";
countryList["Italy"]="IT";
countryList["Jamaica"]="JM";
countryList["Japan"]="JP";
countryList["Jordan"]="JO";
countryList["Kazakhstan"]="KZ";
countryList["Kenya"]="KE";
countryList["Kiribati"]="KI";
countryList["Kuwait"]="KW";
countryList["Kyrgyzstan"]="KG";
countryList["Laos"]="LA";
countryList["Latvia"]="LV";
countryList["Lebanon"]="LB";
countryList["Lesotho"]="LS";
countryList["Liberia"]="LR";
countryList["Liechtenstein"]="LI";
countryList["Lithuania"]="LT";
countryList["Luxembourg"]="LU";
countryList["Macau"]="MO";
countryList["Madagascar"]="MG";
countryList["Malawi"]="MW";
countryList["Malaysia"]="MY";
countryList["Maldives"]="MV";
countryList["Mali"]="ML";
countryList["Malta"]="MT";
countryList["Marshall Islands"]="MH";
countryList["Martinique"]="MQ";
countryList["Mauritania"]="MR";
countryList["Mayotte"]="YT";
countryList["Mexico"]="MX";
countryList["Moldova"]="MD";
countryList["Mongolia"]="MN";
countryList["Morocco"]="MA";
countryList["Mozambique"]="MZ";
countryList["Namibia"]="NA";
countryList["Nauru"]="NR";
countryList["Nepal"]="NP";
countryList["Netherlands"]="NL";
countryList["Netherlands Antilles"]="AN";
countryList["New Caledonia"]="NC";
countryList["New Zealand"]="NZ";
countryList["Nicaragua"]="NI";
countryList["Niger"]="NE";
countryList["Nigeria"]="NG";
countryList["Northern Mariana Islands"]="MP";
countryList["Norway"]="NO";
countryList["Oman"]="OM";
countryList["Pakistan"]="PK";
countryList["Palau"]="PW";
countryList["Panama"]="PA";
countryList["Papuanewguinea"]="PG";
countryList["Paraguay"]="PY";
countryList["Peru"]="PE";
countryList["Philippines"]="PH";
countryList["Pitcairn"]="PN";
countryList["Poland"]="PL";
countryList["Portugal"]="PT";
countryList["Puerto Rico"]="PR";
countryList["Qatar"]="QA";
countryList["Korea, North"]="KR";
countryList["Korea, South"]="KR";
countryList["Reunion"]="RE";
countryList["Romania"]="RO";
countryList["Russia"]="RU";
countryList["Sao Tome and Principe"]="ST";
countryList["Saudi Arabia"]="SA";
countryList["Senegal"]="SN";
countryList["Seychelles"]="SC";
countryList["Sierra Leone"]="SL";
countryList["Singapore"]="SG";
countryList["Slovakia"]="SK";
countryList["Slovenia"]="SI";
countryList["Solomon Islands"]="SB";
countryList["Somalia"]="SO";
countryList["South Africa"]="ZA";
countryList["Spain"]="ES";
countryList["Sri Lanka"]="LK";
countryList["St Helena"]="SH";
countryList["St. Kitts and Nevis"]="KN";
countryList["St. Lucia"]="LC";
countryList["St. Vincent and the Grenadines"]="VC";
countryList["Sudan"]="SD";
countryList["Suriname"]="SR";
countryList["Svalbard"]="SJ";
countryList["Swaziland"]="SZ";
countryList["Sweden"]="SE";
countryList["Switzerland"]="CH";
countryList["Syria"]="SY";
countryList["Taiwan"]="TW";
countryList["Tajikistan"]="TJ";
countryList["Tanzania"]="TZ";
countryList["Thailand"]="TH";
countryList["Togo"]="TG";
countryList["Tonga"]="TO";
countryList["Trinidad and Tobago"]="TT";
countryList["Turkey"]="TR";
countryList["Turkmenistan"]="TM";
countryList["Turks and Caicos Islands"]="TC";
countryList["Tuvalu"]="TV";
countryList["Uganda"]="UG";
countryList["Ukraine"]="UA";
countryList["United Arab Emirates"]="AE";
countryList["United Kingdom"]="GB";
countryList["Uruguay"]="UY";
countryList["United States of America"]="US";
countryList["Uzbekistan"]="UZ";
countryList["Vanuatu"]="VU";
countryList["Venezuela"]="VE";
countryList["Vietnam"]="VN";
countryList["Western Sahara"]="EH";
countryList["Yemen"]="YE";
countryList["Zambia"]="ZR";
countryList["Zimbabwe"]="ZW";
countryList["Micronesia"]="FM";
return(countryList[countryName]);
}

//
// Status bar functions
//

    function showStatus (str) {
    window.status = str;
    return true;
    }

    function switchStatus () {
    return showStatus("");
    }


