function blastWindow(theURL,winName,features) {
	var newWindow = window.open(theURL,winName,features);
	newWindow.focus();
}

function blastHelpWindow(anchorLink) {
	window.open('popups/incFormHelp.jsp#' + anchorLink,'package','status=no,scrollbars=yes,resizable=yes,width=490,height=400,location=no');
}

function blastSecurityCodeWindow(cardSelected) {
    
    var helpCodeUrl;
    if(cardSelected == 'AMEX')
    	helpCodeUrl = 'Security_Code_AMEX.html'
    else
    	helpCodeUrl = 'Security_Code.html'
   
	blastWindow(helpCodeUrl,'securityCode','status=no,scrollbars=yes,resizable=yes,width=270,height=200,location=no');
}

function popupWindow(theURL) {
	//if you use popupWindow, the window may resize if the page has a width or height 
	//attribute defined in Site Refresh
	blastWindow(theURL,"popupWindow","status=no,scrollbars=yes,resizable=yes,width=500,height=500,location=no");
}

function faq(faqNumber) {
	vid = window.open("faq/faq" + faqNumber + ".html","propWin","status=no,scrollbars=yes,toolbar=no,location=no,menu=no,width=425,height=351");
}

function help(pageNumber){
	contact = window.open("help/step"+pageNumber+".html","contact","width=550,height=480,scrollbars,resizable");
}

function TaxOnTime() {
        window.name = "top_parent";
        var url = "http://www.corporate.com/TaxOnTime.pdf";
        var hWnd = window.open(url,"TaxOnTime","width=500,height=320,resizable=yes,scrollbars=yes");
        if (hWnd != null) { if (hWnd.opener == null) { hWnd.opener = self; window.name = "home"; hWnd.location.href=url; } }
}

function textSwap(form, countryFormField, spanId, blankText, formatText) {

	var usFormats = {"CA":"CA","US":"US","":""}

    if(form[countryFormField].value in usFormats) {
          document.getElementById(spanId).innerHTML = formatText;
    } else {
          document.getElementById(spanId).innerHTML = blankText;
    }
}

//used on California_LLC.html window
function setCorp() {
	document.getElementById("setCorpForm").submit();
	window.close();
}