function OpenCertDetails()
	{
	thewindow = window.open('https://www.GoDaddy.com/cgi/server/certdetails.exe?code=USHUBC2-2', 'anew', config='height=475,width=513,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=yes');
}



function popWin(url,width,height,posx,posy) {
var myWindow = window.open(url, "mainWin", 'resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width='+width+',height='+height+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
myWindow.focus()
}




//Date
var d_obj=new Date();
var d_day=d_obj.getDay();var d_month=d_obj.getMonth();var d_date=d_obj.getDate();var d_year=d_obj.getYear();
var dday=new Array();
dday[0]="Sunday";dday[1]="Monday";dday[2]="Tuesday";dday[3]="Wednesday";
dday[4]="Thursday";dday[5]="Friday";dday[6]="Saturday";
var dmonth=new Array();dmonth[0]="Jan.";dmonth[1]="Feb.";dmonth[2]="Mar.";dmonth[3]="Apr.";
dmonth[4]="May";dmonth[5]="Jun.";dmonth[6]="Jul.";dmonth[7]="Aug.";dmonth[8]="Sep.";
dmonth[9]="Oct.";dmonth[10]="Nov.";dmonth[11]="Dec.";
if(d_year<200){d_year+1900};
var date_full = dday[d_day] + ', ' + dmonth[d_month] + ' ' + d_date + ', ' + d_year;


// Bookmark
function team_bookmark(){/*Copyright www.team-orange.net*/var u='http://www.team-orange.net';var w=window;var l=(u=='http://www.team-orange.net')?w.location:u;var e=w.external;(l!=''||e==null)?e.AddFavorite(l):e=null;}


//rollovers
bname = navigator.appName;
bversion = parseFloat(navigator.appVersion);

var base_dir = "images/";
var imgs = new Array('butt-inc-over.gif','butt-llc-over.gif','butt-nonprofit-over.gif','butt_cert_authority-over.gif','butt-kits-over.gif','butt-agent1-over.gif','butt-notary-over.gif','butt-corp-over.gif','butt-printing-over.gif','butt-custom-over.gif','butt-irs-over.gif','butt-contact-over.gif','question-mark.gif','click-over.jpg');
       for (var i=0; i < imgs.length; i++) {
       var img = new Image();
       img.src = base_dir + imgs[i];
       }
function rollover(name1,img1){
	if (bname == "Netscape") {
		if (bversion < 5) {
			return false;
			}
		}
	if (bname == "Netscape") {
		if (bversion >= 5) {
			document.images[name1].src = base_dir + img1;
			}
		}
		else{
             document.images[name1].src = base_dir + img1;
             }
	}



//Validation
var goahead;

function validate() {
	for(var i=0;i < document.forms[0].elements.length;i++){
		var ele=document.forms[0].elements[i];
		if(ele.name=="your_name" && ele.value==""){alert('Please enter your name');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="your_address" && ele.value==""){alert('Please enter your address');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="your_city" && ele.value==""){alert('Please enter your city');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="your_state" && ele.value==""){alert('Please enter your state');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="your_zip" && ele.value==""){alert('Please enter your zip code');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="your_phone_day" && ele.value==""){alert('Please enter your day phone number'); 	
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="your_email_address" && ele.value==""){alert('Please enter your email address');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="entity_name" && ele.value==""){alert('Please enter the name of your corporation / LLC');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="entity_address" && ele.value==""){alert('Please enter the address of your corporation / LLC');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="entity_city" && ele.value==""){alert('Please enter the city of your corporation / LLC');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="entity_state" && ele.value==""){alert('Please enter the state of your corporation / LLC');
			ele.focus(); goahead == "no"; return goahead;}
		if(ele.name=="entity_zip" && ele.value==""){alert('Please enter the zip code of your corporation / LLC');
			ele.focus(); goahead == "no"; return goahead;}
		if(document.order.agree[0].checked == false){alert('Please choose Yes, I agree, before submitting your order');
			document.forms[0].agree[0].focus(); goahead == "no"; return goahead;}
	}

	goahead = "yes";
}


/*function validate1() {
var numBoxesSelected = 0;

for (var i=0; i < document.forms[0].ra_state.length; i++) {
       if (document.forms[0].ra_state[i].checked == true) {
      	numBoxesSelected == 1;
      }
}

for (var i=0; i < document.forms[0].llc_state.length; i++) {
       if (document.forms[0].llc_state[i].checked == true) {
      	numBoxesSelected == 1;
      }
}  
if (numBoxesSelected != 1) {
	alert("Please choose at least 1 state.");
	document.forms[0].ra_state[0].focus(); goahead = "no"; return goahead;
}*/


/*	for ((var i=0; document.forms[0].ra_state[i]; i++) || (var i=0; document.forms[0].llc_state[i]; i++))
	{
		if ((document.forms[0].ra_state[i].checked) || (document.forms[0].llc_state[i].checked)) {
		numBoxesSelected++;
		}
	}
	if (numBoxesSelected < 1) {
			alert("Please choose at least 1 state.");
	document.forms[0].ra_state[0].focus(); goahead == "no"; return goahead;
	}

	goahead = "yes";
}*/
	
	
function doit() {
	validate();
	//validate1();
	if (goahead == "yes") {
		document.forms[0].submit();
	}
}



/////// Functions Added On 2/18/03 By Alex Flores
/////// Affected Page(s): cert_authority.html, hubco1.js


// BEGIN VARS
var numStatesChosen = 0;
var filingFeeTotal = 0;
var totalForeignQualifyFee = 0;
var totalGoodStandingFee = 0;
var totalRegAgeServFee = 0;
var totalRushDelivery = 0;
var hubcoForeignQualify = 99.95;
var goodStandingFee = 125;
var registeredAgentServiceFee = 125;
var rushDeliveryFee = 44;
var shippingFlatFee = 7;
var priceOfEachState = new Array();

function calcNumStates(fieldIndexNum, statePrice) {
	if (document.order.ra_state[fieldIndexNum].checked == false) {
		numStatesChosen--;
		start = statePrice.indexOf("_") + 1;
		end = statePrice.length;
		priceOfState = statePrice.substring(start, end);
		for (i = 0; i < priceOfEachState.length; i++) {
			if(priceOfEachState[i] == priceOfState) {
				priceOfEachState[i] = 0;
				break;
			}
		}
	}
	else {
		numStatesChosen++;
		start = statePrice.indexOf("_") + 1;
		end = statePrice.length;
		priceOfState = statePrice.substring(start, end);
		priceOfEachState.push(priceOfState);
	}
	document.order.numStateQualify.value = numStatesChosen;
	calcStateFees();
	document.order.totalStateFilingFee.value = filingFeeTotal + ".00";
	calcForeignQualify();
	document.order.foreignQualify.value = totalForeignQualifyFee;
	calcGoodStanding();
	document.order.goodStanding.value = totalGoodStandingFee + ".00";
	calcRegAgeServ();
	document.order.regAgent.value = totalRegAgeServFee + ".00";
	if (document.order.processing[0].checked == true) {
		calcRushDelivery();
		document.order.rush.value = totalRushDelivery + ".00";
	}
	else {
		document.order.rush.value = "N/A";
	}
	runTotal();
}


function calcNumStates1(fieldIndexNum, statePrice) {
	if (document.order.llc_state[fieldIndexNum].checked == false) {
		numStatesChosen--;
		start = statePrice.indexOf("_") + 1;
		end = statePrice.length;
		priceOfState = statePrice.substring(start, end);
		for (i = 0; i < priceOfEachState.length; i++) {
			if(priceOfEachState[i] == priceOfState) {
				priceOfEachState[i] = 0;
				break;
			}
		}
	}
	else {
		numStatesChosen++;
		start = statePrice.indexOf("_") + 1;
		end = statePrice.length;
		priceOfState = statePrice.substring(start, end);
		priceOfEachState.push(priceOfState);
	}
	document.order.numStateQualify.value = numStatesChosen;
	calcStateFees();
	document.order.totalStateFilingFee.value = filingFeeTotal + ".00";
	calcForeignQualify();
	document.order.foreignQualify.value = totalForeignQualifyFee;
	calcGoodStanding();
	document.order.goodStanding.value = totalGoodStandingFee + ".00";
	calcRegAgeServ();
	document.order.regAgent.value = totalRegAgeServFee + ".00";
	if (document.order.processing[0].checked == true) {
		calcRushDelivery();
		document.order.rush.value = totalRushDelivery + ".00";
	}
	else {
		document.order.rush.value = "N/A";
	}
	runTotal();
}


function calcStateFees() {
	var totalStateFee = 0;
	for (i = 0; i < priceOfEachState.length; i++) {
		totalStateFee += parseInt(priceOfEachState[i]);
	}
	filingFeeTotal = totalStateFee;
	return filingFeeTotal;
}

function calcForeignQualify() {
	var totalFQfee = (hubcoForeignQualify * numStatesChosen);
	totalForeignQualifyFee = totalFQfee;
	return totalForeignQualifyFee;
}

/*function calcGoodStanding() {
	var totalGSfee = (goodStandingFee * numStatesChosen);
	totalGoodStandingFee = totalGSfee;
	return totalGoodStandingFee;
}*/

function calcGoodStanding() {
	if (document.order.GSradio[0].checked == true) {
		var totalGSfee = (goodStandingFee * numStatesChosen);
		totalGoodStandingFee = totalGSfee;
		return totalGoodStandingFee;
	}
	else {
		totalGoodStandingFee = 0;
		return totalGoodStandingFee;
	}
}

/*function calcRegAgeServ() {
	var totalRegAgefee = (registeredAgentServiceFee * numStatesChosen);
	totalRegAgeServFee = totalRegAgefee;
	return totalRegAgeServFee;
}*/

function calcRegAgeServ() {
	if (document.order.RASradio[0].checked == true) {
	var totalRegAgefee = (registeredAgentServiceFee * numStatesChosen);
	totalRegAgeServFee = totalRegAgefee;
	return totalRegAgeServFee;
	}
	else {
		totalRegAgeServFee = 0;
		return totalRegAgeServFee;
	}
}

function calcRushDelivery() {
	var totalRushDev = (rushDeliveryFee * numStatesChosen);
	totalRushDelivery = totalRushDev;
	return totalRushDelivery;
}

function reCalcShipping() {
	document.order.numStateQualify.value = numStatesChosen;
	calcStateFees();
	document.order.totalStateFilingFee.value = filingFeeTotal + ".00";
	calcForeignQualify();
	document.order.foreignQualify.value = totalForeignQualifyFee;
	calcGoodStanding();
	document.order.goodStanding.value = totalGoodStandingFee + ".00";
	calcRegAgeServ();
	document.order.regAgent.value = totalRegAgeServFee + ".00";
	if (document.order.processing[0].checked == true) {
		calcRushDelivery();
		document.order.rush.value = totalRushDelivery + ".00";
		document.order.total.value = parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee + totalRushDelivery + shippingFlatFee);
		document.order.totalOnCheck.value = parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee + totalRushDelivery + shippingFlatFee);
	}
	else {
		document.order.rush.value = "N/A";
		/*document.order.total.value = (parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee + shippingFlatFee));
		document.order.totalOnCheck.value = (parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee + shippingFlatFee));
	}
}*/
		document.order.total.value = (parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee));
		document.order.totalOnCheck.value = (parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee));
	}
	if (numStatesChosen == "0") {
		document.order.total.value = "0.00";
		document.order.totalOnCheck.value = "0.00";
	}
}

function runTotal() {
	if (document.order.total.value = parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee + totalRushDelivery + shippingFlatFee) == 7) {
		document.order.total.value = "0.00";
		document.order.totalOnCheck.value = "0.00";
	}
	else {
		document.order.total.value = parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee + totalRushDelivery + shippingFlatFee);
		document.order.totalOnCheck.value = parseFloat(filingFeeTotal + totalForeignQualifyFee + totalGoodStandingFee + totalRegAgeServFee + totalRushDelivery + shippingFlatFee);
	}
}