
// JavaScript Document

var MASSignupURL = ''

function getMASSignupURL () {

	if (!MASSignupURL) {

		try {

			var objLocator = new ActiveXObject("QuickBooks.CoLocator");

			var obj = objLocator.Create("QBPrefs.Preferences");

			MASSignupURL = obj.MASSignUpUrl;

		} catch (e) { 

		}

	}

	if (!MASSignupURL) MASSignupURL = "https://merchantaccount.quickbooks.com/";

	return MASSignupURL

}

function go2Signup () {

	go(getMASSignupURL() + "j/mas/signup" + getSrcParam());

}



function go2Update () {

	go(getMASSignupURL() + "j/mas/update" + getSrcParam());

}

function go2UpdateTerminal () {

	go("http://www.quickbooksms.com/terminal/download/index.php" + getSrcParam());

}

function go2Features () {

	go("http://www.quickbooksmerchantservice.com/services/merchant_service/features.php" + getSrcParam());

}



function go2Pricing () {

	go("http://www.quickbooksmerchantservice.com/services/pricing.php" + getSrcParam());

}



function go2Apply () {

	go("http://www.quickbooksmerchantservice.com/services/apply.php" + getSrcParam());

}



function go2Support () {

	go("http://www.quickbooksmerchantservice.com/services/support.php" + getSrcParam());

}



function go2Examples () {

	go("http://www.quickbooksmerchantservice.com/services/examples_at_work/index.php" + getSrcParam());

}



function go2Services () {

	go("http://www.quickbooksmerchantservice.com/services/services.php" + getSrcParam());

}



function go2MAS () {

	go("http://www.quickbooksmerchantservice.com/services/merchant_service/index.php" + getSrcParam());

}



function go2MASSupport () {

	go("http://www.quickbooksmerchantservice.com/services/merchant_service/support/index.php" + getSrcParam());

}



function go2POS () {

	go("http://www.quickbooksmerchantservice.com/services/POS_merchant_account_services/index.php" + getSrcParam());

}



function go2POSSupport () {

	go("http://www.quickbooksmerchantservice.com/services/POS_merchant_account_services/support/index.php" + getSrcParam());

}



function go2Terminal () {

	go("http://www.quickbooksmerchantservice.com/services/merchant_service_terminal/index.php" + getSrcParam());

}



function go2TerminalSupport () {

	go("http://www.quickbooksmerchantservice.com/services/merchant_service_terminal/user_guide.php" + getSrcParam());

}



function go2Demo () {

	go("http://www.quickbooksmerchantservice.com/services/demos.php" + getSrcParam());

}



function go2Home () {

	go("http://www.quickbooksmerchantservice.com/");

}



function go2Sitemap () {

	go("http://www.quickbooksmerchantservice.com/services/site_map.php");

}



function go2Sitehelp () {

	go("http://www.quickbooksmerchantservice.com/services/site_help.php");

}



function go2Quickbooks () {

	go("http://quickbooks.intuit.com/");

}



function go2Privacy () {

	go("http://www.quickbooksmerchantservice.com/privacy/");

}



function go2Legal () {

	go("http://quickbooks.intuit.com/commerce/catalog/fragments/quickbooks/common/legal.jhtml");

}



function go2ContactUs () {

	go("http://www.quickbooks.com/support/service/");

}



function getSrcParam () {

	var match = location.search.match(/(\?|&|%26)src=([-\w]+)/);

	return (match && match.length >= 3 && match[2]) ? '?p_prioritycode=' + match[2] : '';

}



function go (url) {

		window.location = url;

}

function getCCPKSrcParam () { 
  var param = getSrcParam() 
 if (!param) param = '?p_prioritycode=CCPK' 
 return param 
}

function go2CCPKSignup () { 
 go(getMASSignupURL() + "j/mas/ccpksignup" + getCCPKSrcParam()); 
}

function getQBBSSignupURL() {
 var signupURL = "";
 try {
  var objLocator = new ActiveXObject("QuickBooks.CoLocator");
  var objUrl = objLocator.Create("QBPrefs.Preferences");
  signupURL = objUrl.IPPSignUpUrl;
 } catch (e) {
  signupURL = "https://billpay.quickbooks.com/j/ippsignup";
 }
 signupURL += "/qbob/ready";
 var signupParams = "?src=wcp1";
 if (location.search) {
  signupParams = location.search;
 }
 signupURL += signupParams;
 return signupURL;
}

function go2QBBSSignup () { 
 go(getQBBSSignupURL()); 
}
