function doSource(){



	var srcCookie = GetCookie('source')

	

	if(srcCookie != null){

	document.Form1.source.value = srcCookie;

	}

}



function QueryString(key)

{

	var value = null;

	for (var i=0;i<QueryString.keys.length;i++)

	{

		if (QueryString.keys[i]==key)

		{

			value = QueryString.values[i];

			break;

		}

	}

	return value;

}

QueryString.keys = new Array();

QueryString.values = new Array();



function QueryString_Parse()

{

	var query = window.location.search.substring(1);

	var pairs = query.split("&");

	

	for (var i=0;i<pairs.length;i++)

	{

		var pos = pairs[i].indexOf('=');

		if (pos >= 0)

		{

			var argname = pairs[i].substring(0,pos);

			var value = pairs[i].substring(pos+1);

			QueryString.keys[QueryString.keys.length] = argname;

			QueryString.values[QueryString.values.length] = value;		

		}

	}



}



QueryString_Parse();



//Do not use 0's with the times 0 * anything = 0 :c)

var expDays = 1; //1 = expire today

var expMins = 20;

var exp = new Date();

exp.setTime(exp.getTime() + (expDays*expMins*60*1000));





function doSetCookie(key){



	var visitorquery = QueryString(key)

	var visitorcookie = GetCookie('source')

	

	if (visitorquery != null && visitorcookie == null) {

		SetCookie ('source', visitorquery, exp);

	}



}



function GetCookie (name) { 



var arg = name + "="; 

var alen = arg.length; 

var clen = document.cookie.length; 

var i = 0; 



while (i < clen) { 



	var j = i + alen; 



	if (document.cookie.substring(i, j) == arg) 

		return getCookieVal (j); 

		i = document.cookie.indexOf(" ", i) + 1; 



		if (i == 0) break; 



	} 

	return null;

}





function SetCookie (name, value) { 



var argv = SetCookie.arguments; 

var argc = SetCookie.arguments.length; 

var expires = (argc > 2) ? argv[2] : null; 

var path = (argc > 3) ? argv[3] : null; 

var domain = (argc > 4) ? argv[4] : null; 

var secure = (argc > 5) ? argv[5] : false; 



document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 

((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");



}



function getCookieVal (offset) { 



	var endstr = document.cookie.indexOf (";", offset); 



	if (endstr == -1) 

		endstr = document.cookie.length; 

		return unescape(document.cookie.substring(offset, endstr));

}





var loaded = 0;

var baseURL = "";  //base website url, ends with trailing slash.

//var NewWindow = null;



function PreLoad()

{



if (document.images != null)

{



Menu1 = new Image(112,23);

Menu1.src = "/images/nav-btn-trampolines-over.gif";

Menu2 = new Image(112,23);

Menu2.src = "/images/nav-btn-trampolines-up.gif";

Menu3 = new Image(112,23);

Menu3.src = "/images/nav-btn-partsrepair-over.gif";

Menu4 = new Image(112,23);

Menu4.src = "/images/nav-btn-partsrepair-up.gif";

Menu5 = new Image(112,23);

Menu5.src = "/images/nav-btn-warranty-over.gif";

Menu6 = new Image(112,23);

Menu6.src = "/images/nav-btn-warranty-up.gif";

Menu7 = new Image(112,23);

Menu7.src = "/images/nav-btn-safety-over.gif";

Menu8 = new Image(112,23);

Menu8.src = "/images/nav-btn-safety-up.gif";

Menu9 = new Image(112,23);

Menu9.src = "/images/nav-btn-financing-over.gif";

Menu10 = new Image(112,23);

Menu10.src = "/images/nav-btn-financing-up.gif";

Menu11 = new Image(112,23);

Menu11.src = "/images/nav-btn-faq-over.gif";

Menu12 = new Image(112,23);

Menu12.src = "/images/nav-btn-faq-up.gif";

Menu13 = new Image(112,23);

Menu13.src = "/images/nav-btn-testimonials-over.gif";

Menu14 = new Image(112,23);

Menu14.src = "/images/nav-btn-testimonials-up.gif";

Menu15 = new Image(112,23);

Menu15.src = "/images/nav-btn-about-over.gif";

Menu16 = new Image(112,23);

Menu16.src = "/images/nav-btn-about-up.gif";

Menu17 = new Image(112,23);

Menu17.src = "/images/nav-btn-contact-over.gif";

Menu18 = new Image(112,23);

Menu18.src = "/images/nav-btn-contact-up.gif";

Menu19 = new Image(112,23);

Menu19.src = "/images/nav-btn-home-over.gif";

Menu20 = new Image(112,23);

Menu20.src = "/images/nav-btn-home-up.gif";



}

	loaded = 1;

}





function PreLoad2()

{



if (document.images != null)

{



Menu1 = new Image(112,23);

Menu1.src = "/images/new-nav/nav-btn-trampolines-over.gif";

Menu2 = new Image(112,23);

Menu2.src = "/images/new-nav/nav-btn-trampolines.gif";

Menu3 = new Image(112,23);

Menu3.src = "/images/new-nav/nav-btn-parts-over.gif";

Menu4 = new Image(112,23);

Menu4.src = "/images/new-nav/nav-btn-parts.gif";

Menu5 = new Image(112,23);

Menu5.src = "/images/new-nav/nav-btn-warranty-over.gif";

Menu6 = new Image(112,23);

Menu6.src = "/images/new-nav/nav-btn-warranty.gif";

Menu7 = new Image(112,23);

Menu7.src = "/images/new-nav/nav-btn-safety-over.gif";

Menu8 = new Image(112,23);

Menu8.src = "/images/new-nav/nav-btn-safety.gif";

Menu9 = new Image(112,23);

Menu9.src = "/images/new-nav/nav-btn-finance-over.gif";

Menu10 = new Image(112,23);

Menu10.src = "/images/new-nav/nav-btn-finance.gif";

Menu11 = new Image(112,23);

Menu11.src = "/images/new-nav/nav-btn-faq-over.gif";

Menu12 = new Image(112,23);

Menu12.src = "/images/new-nav/nav-btn-faq.gif";

Menu13 = new Image(112,23);

Menu13.src = "/images/new-nav/nav-btn-testimonials-over.gif";

Menu14 = new Image(112,23);

Menu14.src = "/images/new-nav/nav-btn-testimonials.gif";

Menu15 = new Image(112,23);

Menu15.src = "/images/new-nav/nav-btn-about-over.gif";

Menu16 = new Image(112,23);

Menu16.src = "/images/new-nav/nav-btn-about.gif";

Menu17 = new Image(112,23);

Menu17.src = "/images/new-nav/nav-btn-contact-over.gif";

Menu18 = new Image(112,23);

Menu18.src = "/images/new-nav/nav-btn-contact.gif";

Menu19 = new Image(112,23);

Menu19.src = "/images/new-nav/nav-btn-home-over.gif";

Menu20 = new Image(112,23);

Menu20.src = "/images/new-nav/nav-btn-home.gif";



}

	loaded = 1;

}



function hiLite(imgDocID,imgObjName) {

if (document.images !=null)

{

if (loaded)

document.images[imgDocID].src = eval(imgObjName + ".src")

}

}





function popup(winName,URL,height,width,scroll) {

 if(!window.NewWindow || NewWindow.closed || NewWindow == null) {

	var popup = window.open(URL,winName,"height=" + height + ",width=" + width + ",screenX=28,screenY=25,status=no,scrollbars=" + scroll + ",toolbar=no,directories=no,menubar=no,location=no");

 	NewWindow = popup;

 } else {

	if(NewWindow.name != winName) {

		NewWindow.close();

		var popup = window.open(URL,winName,"height=" + height + ",width=" + width + ",screenX=28,screenY=25,status=no,scrollbars=" + scroll + ",toolbar=no,directories=no,menubar=no,location=no");

	 	NewWindow = popup;

	} else {

		NewWindow.focus();

	}

 }

}



function More(theForm) {

	if(theForm.tramp.value == "13") {

		window.location.href= "/13foot.htm";

		}

	if(theForm.tramp.value == "13p") {

		window.location.href= "/13foot-plus.htm";

		}

	if(theForm.tramp.value == "14") {

		window.location.href= "/14foot.htm";

		}

	if(theForm.tramp.value == "16") {

		window.location.href= "/16foot.htm";

		}

	if(theForm.tramp.value == "16p") {

		window.location.href= "/16foot-plus.htm";

		}

	}



function Buy(theForm) {

	if(theForm.tramp.value == "13p") {

		window.location.href= "/trampolines.php?TrampID=13Plus";

		}

	if(theForm.tramp.value == "16p") {

		window.location.href= "/trampolines.php?TrampID=16Plus";

		}

	if(theForm.tramp.value == "16") {

		window.location.href= "/trampolines.php?TrampID=16Round";

		}

	if(theForm.tramp.value == "14") {

		window.location.href= "/trampolines.php?TrampID=14Deluxe";

		}		

	}

	

function Finance(theForm) {

	if(theForm.tramp.value == "13p") {

		window.location.href= "/trampolines.php?TrampID=13Plus";

		}

	if(theForm.tramp.value == "16") {

		window.location.href= "/trampolines.php?TrampID=16Round";

		}

	if(theForm.tramp.value == "16p") {

		window.location.href= "/trampolines.php?TrampID=16Plus";

		}

	}	



function Phone(theForm) {

	if(theForm.tramp.value == "13p") {

		window.location.href= "/trampolines.php?TrampID=13Plus";

		}

	if(theForm.tramp.value == "16") {

		window.location.href= "/trampolines.php?TrampID=16Round";

		}

	if(theForm.tramp.value == "16p") {

		window.location.href= "/trampolines.php?TrampID=16Plus";

		}

	if(theForm.tramp.value == "14") {

		window.location.href= "/trampolines.php?TrampID=14Deluxe";

		}

	}

	



function Fax(theForm) {

	if(theForm.tramp.value == "13p") {

		window.location.href= "/trampolines.php?TrampID=13Plus";

		}

	if(theForm.tramp.value == "16") {

		window.location.href= "/trampolines.php?TrampID=16Round";

		}

	if(theForm.tramp.value == "16p") {

		window.location.href= "/trampolines.php?TrampID=16Plus";

		}

	if(theForm.tramp.value == "14") {

		window.location.href= "/trampolines.php?TrampID=14Deluxe";

		}

	}





function ContactFormVal(theform) {



if (theform.FName.value == "") {

	alert("Please enter your first name.")

	document.Form.FName.focus()

	return false;

	}

if (theform.FName.value.length > 25) {

	alert("Your first name is to long, please fix it.")

	document.Form.FName.focus()

	return false;

	}

if (theform.LName.value == "") {

	alert("Please enter your last name.")

	document.Form.LName.focus()

	return false;

	}

if (theform.LName.value.length > 25) {

	alert("Your last name is to long, please fix it.")

	document.Form.LName.focus()

	return false;

	}

if (theform.AreaCode.value == "") {

	alert("Please enter your Area Code.")

	document.Form.AreaCode.focus()

	return false;

	}

if (theform.Phone.value == "") {

	alert("Please enter your Phone number.")

	document.Form.Phone.focus()

	return false;

	}

if (theform.Email.value == "") {

	alert("Please enter your Email address.")

	document.Form.Email.focus()

	return false;

	}

if (theform.Email.value.length > 50) {

	alert("Your Email address is to long, please fix it.")

	document.Form.Email.focus()

	return false;

	}

	

	document.Form.sComments.value = escape(document.Form.Comments.value);

}



function addresspopup(status,url,theform) {



 if(status != 0) {

 if(popup != null){

popup.focus(); 

 } else { 

 var popup = open(url, "Popup",

 "HEIGHT=450,WIDTH=550,screenX=20,screenY=5,status=yes,scrollbars=yes,toolbar=no,directories=no,menubar=no,location=no");

 popup_window = popup;

 }

 } else {

 if(popup_window != null){

popup_window.close();

}

}

theform.submit();

}



function mataddresspopup(status,url,theform) {

var Valid = "1";

var Message = "";



if(theform.jac_prodoptions7.selectedIndex == 0){

	Valid = "0";

	Message = "Please select a value for measurement 2, feet";

}



if(theform.jac_prodoptions5.selectedIndex == 0){

	Valid = "0";

	Message = "Please select a value for measurement 1, feet";

}

if(Valid == "0"){

	alert(Message);

	Message = "";

	Valid = "1";

	return false;

}else{



 if(status != 0) {

 if(popup != null){

popup.focus(); 

 } else { 

 var popup = open(url, "Popup",

 "HEIGHT=450,WIDTH=550,screenX=20,screenY=5,status=yes,scrollbars=yes,toolbar=no,directories=no,menubar=no,location=no");

 popup_window = popup;

 }

 } else {

 if(popup_window != null){

popup_window.close();

}

}

theform.submit();

}

}



function changeSpringShippingCA() {

if(document.FrontPage_Form2.jac_prodoptions2.selectedIndex == 0) {

		document.FrontPage_Form2.shipping.value = "+19;continental North America;0"

	}

	

if(document.FrontPage_Form2.jac_prodoptions2.selectedIndex == 1) {

		document.FrontPage_Form2.shipping.value = "+23;continental North America;0"

	}

	

if(document.FrontPage_Form2.jac_prodoptions2.selectedIndex == 2) {

		document.FrontPage_Form2.shipping.value = "+26;continental North America;0"

	}

	

if(document.FrontPage_Form2.jac_prodoptions2.selectedIndex == 3) {

		document.FrontPage_Form2.shipping.value = "+35;continental North America;0"

	}	

}



function changeSpringShipping() {

if(document.FrontPage_Form1.jac_prodoptions3.selectedIndex == 0) {

		document.FrontPage_Form1.shipping.value = "+14;continental North America;0"

	}

	

if(document.FrontPage_Form1.jac_prodoptions3.selectedIndex == 1) {

		document.FrontPage_Form1.shipping.value = "+18;continental North America;0"

	}

	

if(document.FrontPage_Form1.jac_prodoptions3.selectedIndex == 2) {

		document.FrontPage_Form1.shipping.value = "+20;continental North America;0"

	}

	

if(document.FrontPage_Form1.jac_prodoptions3.selectedIndex == 3) {

		document.FrontPage_Form1.shipping.value = "+28;continental North America;0"

	}	

}