	function More_Info(prod_id, pic_file) {

		file = "pop_window.php?id="+prod_id ;



		if (screen.width < 600)  { width = screen.width ; }

		else			 { width = 600 ; }

		if (screen.height < 431) { height = screen.height ; }

		else 			 { height = 431 ; }



		left = (screen.width-width)/2 ;

		screen_top = (screen.height - height)/4 ;



		size_settings = "width="+width+",height="+height+",top="+screen_top+",left="+left ;

		if ((width<600) || (height < 431)) { button_settings = "scrollbars,resizable,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,titlebar=no" ; }

		else { button_settings = "resizable,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,titlebar=no" ; }



		settings = size_settings+","+button_settings ;

		window.open(file, 'Item_Info', settings) ;

	}





	function cast_to_Title(str) {

		var state = str ;

		if (is_state(state)) { return state ; }



		var len = state.length ;

		var ch ;

		var ch_int ;

		var fixed = "" ;

		for(i=0; i<len; i++) {

			ch = state.charAt(i) ;

			ch_int = state.charCodeAt(i) ;



			// Cast the first character as an uppercase letter

			if (i == 0) {

				if ((ch_int >= 97) && (ch_int <= 122)) { ch = String.fromCharCode(ch_int - 32) ; }

			} else if ((i == 1) && (len == 2)) {

				if ((ch_int >= 97) && (ch_int <= 122)) { ch = String.fromCharCode(ch_int - 32) ; }

			} else if ((ch_int >= 65) && (ch_int <= 90)) { ch = String.fromCharCode(ch_int + 32) ; }

			fixed += ch ;

		} // closes 'for' loop



		return fixed ;

	} // closes function



	function validate() {



		document.shipping_info.city.value = cast_to_Title(document.shipping_info.city.value) ;

		document.shipping_info.state.value = cast_to_Title(document.shipping_info.state.value) ;



		var error_message = "" ;

		var form_okay =true ;

		var empty_field = false ;

		var bad_state = false ;

		var bad_zip = false ;

		var count = 0 ;



	        if ( (document.shipping_info.fname.value == "") || (document.shipping_info.lname.value == "") ||

		     (document.shipping_info.add1.value == "")  || (document.shipping_info.city.value == "") ||

		     (document.shipping_info.state.value == "") || (document.shipping_info.zip_code.value == "") ||

		     (document.shipping_info.country.value == "") || (document.shipping_info.c_name.value == "") ||

		     (document.shipping_info.c_info.value == "") || (document.shipping_info.c_phone.value == ""))

			{ empty_field = true ; count++ ; }



		if ((document.shipping_info.country.value == "United States") || (document.shipping_info.country.value == "USA")) {

			if (!is_state(document.shipping_info.state.value)) { bad_state = true ; count++ ;}

		}


		if ((document.shipping_info.country.value == "United States") || (document.shipping_info.country.value == "USA")) {

			if (!is_zip(document.shipping_info.zip_code.value)) { bad_zip = true ; count++ ; }

		}



		form_okay = ((!empty_field) && (!bad_state) && (!bad_zip)) ;



		if (empty_field) { error_message = "You must fill in all required fields" ; }

		if (bad_state) {

			if (count == 1) { error_message = "'"+document.shipping_info.state.value+"' is not a valid US state" ; }

			else if (count == 2) { error_message += " and '"+document.shipping_info.state.value+"' is not a valid US state" ; }

			else if (count == 3) { error_message += ", '"+document.shipping_info.state.value+"' is not a valid US state," ; }

		}



		if (bad_zip) {

			if (count == 1) { error_message = "'"+document.shipping_info.zip_code.value+"' is not a valid US zip code" ; }

			else { error_message += " and '"+document.shipping_info.zip_code.value+"' is not a valid US zip code" ; }

		}



		if (!form_okay) {

			window.alert(error_message) ;

		}



		return form_okay ;

	}



	function is_state(state) {

		if (state == "") { return true ; }

		/*if ((state != "Alabama") && (state != "AL") && (state != "Alaska") && (state != "AK") &&

		    (state != "Arizona") && (state != "AZ") && (state != "Arkansas") && (state != "AR") &&

		    (state != "California") && (state != 'CA') && (state != "Colorado") && (state != "CO") &&

		    (state != "Connecticut") && (state != "CT") && (state != "Delaware") && (state != "DE") &&

		    (state != "Florida") && (state != "FL") && (state != "Georgia") && (state != "GA") &&

		    (state != "Hawaii") && (state != "HI") && (state != "Idaho") && (state != "ID") &&

		    (state != "Illinois") && (state != "IL") && (state != "Indiana") && (state != "IN") &&

		    (state != "Iowa") && (state != "IA") && (state != "Kansas") && (state != "KS") &&

		    (state != "Kentucky") && (state != "KY") && (state != "Louisiana") && (state != "LA") &&

		    (state != "Maine") && (state != "ME") && (state != "Maryland") && (state != "MD") &&

		    (state != "Massachusetts") && (state != "MA") && (state != "Michigan") && (state != "MI") &&

		    (state != "Minnesota") && (state != "MN") && (state != "Mississippi") && (state != "MS") &&

		    (state != "Missouri") && (state != "MO") && (state != "Montana") && (state != "MT") &&

		    (state != "Nebraska") && (state != "NE") && (state != "Nevada") && (state != "NV") &&

		    (state != "New Hampshire") && (state != "NH") && (state != "New Jersey") && (state != "NJ") &&

		    (state != "New Mexico") && (state != "NM") && (state != "New York") && (state != "NY") &&

		    (state != "North Carolina") && (state != "NC") && (state != "North Dakota") && (state != "ND") &&

		    (state != "Ohio") && (state != "OH") && (state != "Oklahoma") && (state != "OK") &&

		    (state != "Oregon") && (state != "OR") && (state != "Pennsylvania") && (state != "PA") &&

		    (state != "Rhode Island") && (state != "RI") && (state != "South Carolina") && (state != "SC") &&

		    (state != "South Dakota") && (state != "SD") && (state != "Tennessee") && (state != "TN") &&

		    (state != "Texas") && (state != "TX") && (state != "Utah") && (state != "UT") &&

		    (state != "Vermont") && (state != "VT") && (state != "Virginia") && (state != "VA") &&

		    (state != "Washington") && (state != "WA") && (state != "West Virginia") && (state != "WV") &&

		    (state != "Wisconsin") && (state != "WI") && (state != "Wyoming") && (state != "WY")) {

			return false ;

		}*/



		return true ;

	}



	function is_zip(zip) {

		if (zip == "") { return true ; }

		len = zip.length ;

		if(len < 5) { return false ; }
		for (i=0; i<len; i++) {

			if ((i == 5) && (zip.charAt(i) != '-')) { return false ; }

			else if ((i == 5) && (zip.charAt(i) == '-')) ;

			else if ((zip.charAt(i) < '0') || (zip.charAt(i) > '9')) { return false ; }

		}

		return true ;

	}

	function init()
	{
		document.getElementById("ship_type_elem").innerHTML = "" +
		document.getElementById("ship_type_domestic").innerHTML +"";
	}
	//-->
// JavaScript Document
