function sameToggle(toggle_id){
	
	fieldsArray = new Array("ship_fname","ship_lname","ship_address","ship_city","shipStateSelect","ship_zip","shipCountrySelect","ship_phone");
	toggleObject = document.getElementById(toggle_id);
	
	for(i=0;i<fieldsArray.length;i++){
		
		objectRef = document.getElementById(fieldsArray[i]);
		if(toggleObject.checked){
			objectRef.disabled = true;
			objectRef.style["backgroundColor"]="#eaeaea";
		}else{
			objectRef.disabled = false;
			objectRef.style["backgroundColor"]="";
		}
	}
	
}

function switchTab(newtab,prefix,numtabs,windowprefix){
	
	for(i=1;i<=numtabs;i++){

		tabobject = document.getElementById(prefix+i);
		windowobject = document.getElementById(windowprefix+i);
		
		if(newtab==i){
			tabobject["className"]="active";
			windowobject.style["display"]="";
		}else{
			tabobject["className"]="normal";
			windowobject.style["display"]="none";
		}
	
	}
	
}

	function launchSizing(){
		window.open('sizing.php','sizing','width=460,height=400,left=100,top=100,toolbar=no,menubar=no,directories=no,location=no,scrollbars=no,status=no,resizable=no,fullscreen=no');
	}

	function launchPopup(url,width,height){
		window.open(url,'loiter_popup','width='+width+',height='+height+',left=100,top=100,toolbar=no,menubar=no,directories=no,location=no,scrollbars=no,status=no,resizable=no,fullscreen=no');
	}


function shake(n) {
	if (self.moveBy) {
		for (i = 10; i > 0; i--) {
			for (j = n; j > 0; j--) {
				self.moveBy(0,i);
				self.moveBy(i,0);
				self.moveBy(0,-i);
				self.moveBy(-i,0);
			}
		}
	}
}

function showProductPicture(filename){
	
	thediv = document.getElementById('product_picture');
	thediv.innerHTML = "<img src='pictures/"+filename+"'>";
	
}
