/*

uncheck all checkbox for quote request page
This is necessary for 

css 
.on{
 background:url(../images/quote_checkbox.gif) left bottom no-repeat;
}

.off{
background:url(../images/quote_checkbox.gif) left top no-repeat;
}


without this javascript it will mess up conting

*/


Event.observe(window, 'load', unCheckAll, false);

function unCheckAll(){

	document.passForm.des1.checked = false;
	document.passForm.des2.checked = false;
	document.passForm.des3.checked = false;
	document.passForm.des4.checked = false;
	
	document.passForm.dev1.checked = false;
	document.passForm.dev2.checked = false;
	document.passForm.dev3.checked = false;
	document.passForm.dev4.checked = false;

	document.passForm.con1.checked = false;
	document.passForm.con2.checked = false;
	document.passForm.con3.checked = false;
	document.passForm.con4.checked = false;
	
	document.passForm.bra1.checked = false;
	document.passForm.bra2.checked = false;
	document.passForm.bra3.checked = false;
	document.passForm.bra4.checked = false;
	
	document.passForm.mar1.checked = false;
	document.passForm.mar2.checked = false;
	document.passForm.mar3.checked = false;
	document.passForm.mar4.checked = false;
	document.passForm.mar5.checked = false;
	
	document.passForm.loc1.checked = false;
	document.passForm.loc2.checked = false;
	document.passForm.loc3.checked = false;
	document.passForm.loc4.checked = false;
	
	document.passForm.adv1.checked = false;
	document.passForm.adv2.checked = false;
	document.passForm.adv3.checked = false;
	document.passForm.adv4.checked = false;
	
	document.passForm.oth1.checked = false;
	document.passForm.oth2.checked = false;
	document.passForm.oth3.checked = false;
	document.passForm.oth4.checked = false;
}



/*

for 

css 
.on{
 background:url(../images/quote_checkbox.gif) left bottom no-repeat;
}

.off{
background:url(../images/quote_checkbox.gif) left top no-repeat;
}


*/



/*  check box */
var c1=0;
var c2=0;
var c3=0;
var c4=0;
var c5=0;
var c6=0;
var c7=0;
var c8=0;

//design
function check1(box,theId) {
	if(document.getElementById) {
		var inboxCheckbox = document.getElementById(theId);

		if(box.checked) {
			 c1++;
			if(c1>0){
				inboxCheckbox.className = "on";
			}
		}else {
			c1--;
			if(c1 == 0){
				inboxCheckbox.className = "off";
			}
		}
	}
}

//development
function check2(box,theId) {
	if(document.getElementById) {
		var inboxCheckbox = document.getElementById(theId);

		if(box.checked) {
			 c2++;
			if(c2>0){
				inboxCheckbox.className = "on";
			}
		}else {
			c2--;
			if(c2 == 0){
				inboxCheckbox.className = "off";
			}
		}
	}
}

//consulting
function check3(box,theId) {
	if(document.getElementById) {
		var inboxCheckbox = document.getElementById(theId);

		if(box.checked) {
			 c3++;
			if(c3>0){
				inboxCheckbox.className = "on";
			}
		}else {
			c3--;
			if(c3 == 0){
				inboxCheckbox.className = "off";
			}
		}
	}
}

//branding
function check4(box,theId) {
	if(document.getElementById) {
		var inboxCheckbox = document.getElementById(theId);

		if(box.checked) {
			 c4++;
			if(c4>0){
				inboxCheckbox.className = "on";
			}
		}else {
			c4--;
			if(c4 == 0){
				inboxCheckbox.className = "off";
			}
		}
	}
}

//marketing
function check5(box,theId) {
	if(document.getElementById) {
		var inboxCheckbox = document.getElementById(theId);

		if(box.checked) {
			 c5++;
			if(c5>0){
				inboxCheckbox.className = "on";
			}
		}else {
			c5--;
			if(c5 == 0){
				inboxCheckbox.className = "off";
			}
		}
	}
}

//localization
function check6(box,theId) {
	if(document.getElementById) {
		var inboxCheckbox = document.getElementById(theId);

		if(box.checked) {
			 c6++;
			if(c6>0){
				inboxCheckbox.className = "on";
			}
		}else {
			c6--;
			if(c6 == 0){
				inboxCheckbox.className = "off";
			}
		}
	}
}

//advanced
function check7(box,theId) {
	if(document.getElementById) {
		var inboxCheckbox = document.getElementById(theId);

		if(box.checked) {
			 c7++;
			if(c7>0){
				inboxCheckbox.className = "on";
			}
		}else {
			c7--;
			if(c7 == 0){
				inboxCheckbox.className = "off";
			}
		}
	}
}

//other
function check8(box,theId) {
	if(document.getElementById) {
		var inboxCheckbox = document.getElementById(theId);

		if(box.checked) {
			 c8++;
			if(c8>0){
				inboxCheckbox.className = "on";
			}
		}else {
			c8--;
			if(c8 == 0){
				inboxCheckbox.className = "off";
			}
		}
	}
}