function popup(StaticPage,dow,WindowWidth,WindowHeight) {
   scott=window.open(StaticPage,'desc','toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=no,resizable=yes,copyhistory=no,width='+WindowWidth+',height='+WindowHeight)
   scott.focus()
}

function get_obj_ref(objname) {	
	if (document.all) {return document.all(''+objname+'');} 
	else if (document.layers) {return document.layers[''+objname+''];} 
	else if(document.getElementById) { return document.getElementById(''+objname+'');} 
	else {return 0;}
}

function validateSKU() {
	var pass = true;
	if (document.forms.form.sku.value == "") {
		changeDisplay('sku_select_warning', 'block');
		pass = false;
	}
	return pass;
}

function changeDisplay(objectID, changeTo) {
	if (document.layers) { document.layers[objectID].display = changeTo; }
	else if (document.all) { document.all[objectID].style.display = changeTo; }
	else if (document.getElementById) { document.getElementById(objectID).style.display = changeTo; }
}

function shippingDateEnable_1() {
	for( i=0; i < document.form.shipping_hold_date_type_1.length; i++ ) {
		if( document.form.shipping_hold_date_type_1[i].checked == true ) {
			val=document.form.shipping_hold_date_type_1[i].value;
		}
	}
	if (val == 'date') {
		document.form.shipping_hold_date_mm_1.disabled=false;document.form.shipping_hold_date_dd_1.disabled=false;
	} else {
		document.form.shipping_hold_date_mm_1.disabled=true;document.form.shipping_hold_date_dd_1.disabled=true;
		document.form.shipping_hold_date_mm_1.value="";document.form.shipping_hold_date_dd_1.value="";
	}
}

function shippingDateEnable_2() {
	for( i=0; i < document.form.shipping_hold_date_type_2.length; i++ ) {
		if( document.form.shipping_hold_date_type_2[i].checked == true ) {
			val=document.form.shipping_hold_date_type_2[i].value;
		}
	}
	if (val == 'date') {
		document.form.shipping_hold_date_mm_2.disabled=false;document.form.shipping_hold_date_dd_2.disabled=false;
	} else {
		document.form.shipping_hold_date_mm_2.disabled=true;document.form.shipping_hold_date_dd_2.disabled=true;
		document.form.shipping_hold_date_mm_2.value="";document.form.shipping_hold_date_dd_2.value="";
	}
}

function shippingDateEnable_3() {
	for( i=0; i < document.form.shipping_hold_date_type_3.length; i++ ) {
		if( document.form.shipping_hold_date_type_3[i].checked == true ) {
			val=document.form.shipping_hold_date_type_3[i].value;
		}
	}
	if (val == 'date') {
		document.form.shipping_hold_date_mm_3.disabled=false;document.form.shipping_hold_date_dd_3.disabled=false;
	} else {
		document.form.shipping_hold_date_mm_3.disabled=true;document.form.shipping_hold_date_dd_3.disabled=true;
		document.form.shipping_hold_date_mm_3.value="";document.form.shipping_hold_date_dd_3.value="";
	}
}

function shippingDateEnable_4() {
	for( i=0; i < document.form.shipping_hold_date_type_4.length; i++ ) {
		if( document.form.shipping_hold_date_type_4[i].checked == true ) {
			val=document.form.shipping_hold_date_type_4[i].value;
		}
	}
	if (val == 'date') {
		document.form.shipping_hold_date_mm_4.disabled=false;document.form.shipping_hold_date_dd_4.disabled=false;
	} else {
		document.form.shipping_hold_date_mm_4.disabled=true;document.form.shipping_hold_date_dd_4.disabled=true;
		document.form.shipping_hold_date_mm_4.value="";document.form.shipping_hold_date_dd_4.value="";
	}
}

function shippingDateEnable_5() {
	for( i=0; i < document.form.shipping_hold_date_type_5.length; i++ ) {
		if( document.form.shipping_hold_date_type_5[i].checked == true ) {
			val=document.form.shipping_hold_date_type_5[i].value;
		}
	}
	if (val == 'date') {
		document.form.shipping_hold_date_mm_5.disabled=false;document.form.shipping_hold_date_dd_5.disabled=false;
	} else {
		document.form.shipping_hold_date_mm_5.disabled=true;document.form.shipping_hold_date_dd_5.disabled=true;
		document.form.shipping_hold_date_mm_5.value="";document.form.shipping_hold_date_dd_5.value="";
	}
}

function shippingDateEnable_6() {
	for( i=0; i < document.form.shipping_hold_date_type_6.length; i++ ) {
		if( document.form.shipping_hold_date_type_6[i].checked == true ) {
			val=document.form.shipping_hold_date_type_6[i].value;
		}
	}
	if (val == 'date') {
		document.form.shipping_hold_date_mm_6.disabled=false;document.form.shipping_hold_date_dd_6.disabled=false;
	} else {
		document.form.shipping_hold_date_mm_6.disabled=true;document.form.shipping_hold_date_dd_6.disabled=true;
		document.form.shipping_hold_date_mm_6.value="";document.form.shipping_hold_date_dd_6.value="";
	}
}

function shippingDateEnable_7() {
	for( i=0; i < document.form.shipping_hold_date_type_7.length; i++ ) {
		if( document.form.shipping_hold_date_type_7[i].checked == true ) {
			val=document.form.shipping_hold_date_type_7[i].value;
		}
	}
	if (val == 'date') {
		document.form.shipping_hold_date_mm_7.disabled=false;document.form.shipping_hold_date_dd_7.disabled=false;
	} else {
		document.form.shipping_hold_date_mm_7.disabled=true;document.form.shipping_hold_date_dd_7.disabled=true;
		document.form.shipping_hold_date_mm_7.value="";document.form.shipping_hold_date_dd_7.value="";
	}
}

function shippingDateEnable_8() {
	for( i=0; i < document.form.shipping_hold_date_type_8.length; i++ ) {
		if( document.form.shipping_hold_date_type_8[i].checked == true ) {
			val=document.form.shipping_hold_date_type_8[i].value;
		}
	}
	if (val == 'date') {
		document.form.shipping_hold_date_mm_8.disabled=false;document.form.shipping_hold_date_dd_8.disabled=false;
	} else {
		document.form.shipping_hold_date_mm_8.disabled=true;document.form.shipping_hold_date_dd_8.disabled=true;
		document.form.shipping_hold_date_mm_8.value="";document.form.shipping_hold_date_dd_8.value="";
	}
}
