// JavaScript Document
// ------------------------------------------------

	function redirectme($adr_target) {
		document.location = $adr_target;
	}

// ------------------------------------------------

	function update_prices($shipping,$tax,$subtotal) {

		$shipping = parseFloat($shipping);

		var $mytotal = $shipping+parseFloat($tax)+parseFloat($subtotal);

		document.getElementById('total_ship_price').innerHTML = $shipping;

		document.getElementById('total_peyment_price').innerHTML = $mytotal.toFixed(2);

		document.getElementById('shipping_1').value = $shipping;

}

// ------------------------------------------------



	function MM_swapImgRestore() { //v3.0

	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

	}

	

	function MM_preloadImages() { //v3.0

	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

	}

	

	function MM_findObj(n, d) { //v4.01

	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

	  if(!x && d.getElementById) x=d.getElementById(n); return x;

	}

	

	function MM_swapImage() { //v3.0

	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

	}





	

	// ------------------------------------------------

	// --- modules scripts ----------------------------

	// ------------------------------------------------

	

		function subtotal_status_cb(export_result){

			$('cart_total_price').innerHTML = export_result;

		}

	

	// ------------------------------------------------

	

		function cart_status_cb( export_result ){
			$("cart__product_list").innerHTML = export_result;
			//$('cart').scrollTop = $('cart').scrollHeight;
			//x_calc_subtotal( subtotal_status_cb );
			//showResponse();
			//modal_load_hide();
		}

		function cart_status_cb_2( export_result ){
			$("cart__product_list").innerHTML = export_result;
			setTimeout( function(){ $('prduct_add_to_cart_msg').style.display = "block" } , 200 );
			setTimeout( function(){ $('prduct_add_to_cart_msg').style.display = "none" } , 8000 );
			//$('cart').scrollTop = $('cart').scrollHeight;
			//x_calc_subtotal( subtotal_status_cb );
			//showResponse();
			//modal_load_hide();
		}
	

	// ------------------------------------------------

	function addProduct(element, dropon, event) {
			//modal_load_show('<span>'+$msgHtml__add_product+'</span>' , {title: $msgHtml__add_product_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			//showLoad();
			$ptname = 'prdtype_' + element.id.substring(8) ;
			$ptype = $($ptname).value;
			x_cart_add_product(element.id , $ptype , cart_status_cb);
		}

	// ------------------------------------------------

	

		function addProduct2($id) {

			//modal_load_show('<span>'+$msgHtml__add_product+'</span>' , {title: $msgHtml__add_product_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			//showLoad();
			$ptname = 'prdtype_' + $id ;
			$ptype = $($ptname).value;
			$id = 'product_'+$id;
			x_cart_add_product($id , $ptype , cart_status_cb_2);

		}

	

	// ------------------------------------------------

	

		function start_shopping_cart() {

			//modal_load_show('<span>'+$msgHtml__loading_cart+'</span>' , {title: $msgHtml__loading_cart_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			//showLoad();
			x_show_cart_products( cart_status_cb );

		}

	

	// ------------------------------------------------

	

		function clearCart() {

			//modal_load_show('<span>'+$msgHtml__clear_cart+'</span>' , {title: $msgHtml__clear_cart_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			//showLoad();
			x_cart_clearall(cart_status_cb)

		}

	

	// ------------------------------------------------

	

		function clearProduct (id) {

			//modal_load_show('<span>'+$msgHtml__remove_product+'</span>' , {title: $msgHtml__remove_product_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			//showLoad();
			x_cart_delete_product(id,cart_status_cb);

		}	

	

	// ------------------------------------------------

	

		function IncreaseProduct (id) {

			//modal_load_show('<span>'+$msgHtml__increase_product+'</span>' , {title: $msgHtml__increase_product_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			//showLoad();
			x_cart_increase_product(id,cart_status_cb);

		}	

	

	// ------------------------------------------------

	

		function update_ship_state_cb(export_result){

			document.getElementById("ship_state").innerHTML = export_result;

			$('ship_state_loading').style.visibility = "hidden";

			$('ship_state_loading').style.display = "none";

		}

	

	// ------------------------------------------------

	

		function update_ship_state() {

			$country_id = document.getElementById('s_country').value;

			if ( $country_id ) {

				$('ship_state_loading').style.visibility = "visible";

				$('ship_state_loading').style.display = "block";

				x_update_state($country_id ,'ship', update_ship_state_cb);

			} else {

				document.getElementById("ship_state").innerHTML = "<input name=\"s_state\" type=\"text\" class=\"input-boxes\" id=\"s_state\" size=\"30\" maxlength=\"255\">";

			}

		}

	

	// ------------------------------------------------

	

		function update_bill_state_cb(export_result){

			document.getElementById("bill_state").innerHTML = export_result;

			$('bill_state_loading').style.visibility = "hidden";

			$('bill_state_loading').style.display = "none";

		}

	

	// ------------------------------------------------

	

		function update_bill_state() {

			$country_id = document.getElementById('b_country').value;

			if ( $country_id ) {

				$('bill_state_loading').style.visibility = "visible";

				$('bill_state_loading').style.display = "block";

				x_update_state($country_id ,'bill', update_bill_state_cb);

			} else {

				document.getElementById("bill_state").innerHTML = "<input name=\"b_state\" type=\"text\" class=\"input-boxes\" id=\"b_state\" size=\"30\" maxlength=\"255\">";

			}

		}

	

	// ------------------------------------------------

	

		function manage_write_bill_state() {

			$selstate = document.getElementById('b_state').value;

			if ($selstate=="NEW-STATE") {

				// active field write new state

					$('b_state_new').style.visibility = "visible";

					$('b_state_new').style.display = "block";

			} else {

				// inactive field write new state

				$newstate_status = document.getElementById('b_state_new').style.visibility;

				if ($newstate_status=="visible") {

					$('b_state_new').style.visibility = "hidden";

					$('b_state_new').style.display = "none";

				}

			}

			return;

		}

	

	// ------------------------------------------------

	

		function manage_write_ship_state() {

			$selstate = document.getElementById('s_state').value;

			if ($selstate=="NEW-STATE") {

				// active field write new state

					$('s_state_new').style.visibility = "visible";

					$('s_state_new').style.display = "block";

			} else {

				// inactive field write new state

				$newstate_status = document.getElementById('s_state_new').style.visibility;

				if ($newstate_status=="visible") {

					$('s_state_new').style.visibility = "hidden";

					$('s_state_new').style.display = "none";

				}

			}

			return;

		}

	

	// ------------------------------------------------

		function showResponse () {
			$('myclearCart').style.visibility = "visible";
			$('myclearCart').style.display = "block";
			//$('btncheckout').style.display = "block";
			$('myloading').style.visibility = "hidden";
			$('myloading').style.display = "none";
			
		}

	// ------------------------------------------------

		function modal_load_show($content,$params) {
			if ( $params!='' ) {
				Modalbox.show( $content, $params );
			} else {
				Modalbox.show( $content );
			}
		}


		function modal_load_hide() {
			Modalbox.hide();
		}
		
	// ------------------------------------------------

		function showLoad ($content,$params) {
			$('myloading').style.visibility = "visible";
			$('myloading').style.display = "block";
			//$('myclearCart').style.visibility = "hidden";
			$('myclearCart').style.display = "none";
			$('btncheckout').style.display = "none";
		}

	// ------------------------------------------------

	

		function get_current_store_id() {

			return $('current_store_id').innerHTML;

		}



	// ------------------------------------------------



		function do_upgrade_user() {

			//modal_load_show('<span>'+$msgHtml__upgrade_user_info+'</span>' , {title: $msgHtml__upgrade_user_info_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			$('upgrade_status_message').className = "hideme";
			//$('upgrade_loading').style.visibility = "visible";
			//$('upgrade_loading').style.display = "block";

			

			$result_form = '';

			$store_id = get_current_store_id();

			$_name = $('pi_name').value;

			if ($_name=='') {

				if ($result_form) {

					$result_form = $result_form + '<br />Fill <b>Personal Information : </b><u>Name</u> field .';

				} else {

					$result_form = 'Fill <b>Personal Information : </b><u>Name</u> field .';

				}

			}

	

			$_lastname = $('pi_lastname').value;

			if ($_lastname=='') {

				if ($result_form) {

					$result_form = $result_form + '<br />Fill <b>Personal Information : </b><u>Last Name</u> field .';

				} else {

					$result_form = 'Fill <b>Personal Information : </b><u>Last Name</u> field .';

				}

			}

	

			$_adr = $('b_adr').value;

			if ($_adr=='') {

				if ($result_form) {

					$result_form = $result_form + '<br />Fill <b>Billing Address : </b><u>Address</u> field .';

				} else {

					$result_form = 'Fill <b>Billing Address : </b><u>Address</u> field .';

				}

			}

			

	

			$_city = $('b_city').value;

			if ($_city=='') {

				if ($result_form) {

					$result_form = $result_form + '<br />Fill <b>Billing Address : </b><u>City</u> field .';

				} else {

					$result_form = 'Fill <b>Billing Address : </b><u>City</u> field .';

				}

			}

	

	

			$_country = $('b_country').value;

			if ($_country=='') {

				if ($result_form) {

					$result_form = $result_form + '<br />Fill <b>Billing Address : </b><u>Country</u> field .';

				} else {

					$result_form = 'Fill <b>Billing Address : </b><u>Country</u> field .';

				}

			}

	

			$_zip = $('b_zip').value;

			if ($_zip=='') {

				if ($result_form) {

					$result_form = $result_form + '<br />Fill <b>Billing Address : </b><u>Zip / Postal Code</u> field .';

				} else {

					$result_form = 'Fill <b>Billing Address : </b><u>Zip / Postal Code</u> field .';

				}

			}

	

	

	

			if ( $('s_check').checked==false ) {

				

				// shipping information is NOT same as billing information

				

				$_sadr = $('s_adr').value;

				if ($_sadr=='') {

					if ($result_form) {

						$result_form = $result_form + '<br />Fill <b>Shipping Address : </b><u>Address</u> field .';

					} else {

						$result_form = 'Fill <b>Shipping Address : </b><u>Address</u> field .';

					}

				}

				

	

	

				$_scity = $('s_city').value;

				if ($_scity=='') {

					if ($result_form) {

						$result_form = $result_form + '<br />Fill <b>Shipping Address : </b><u>City</u> field .';

					} else {

						$result_form = 'Fill <b>Shipping Address : </b><u>City</u> field .';

					}

				}

		

	

				$_scountry = $('s_country').value;

				if ($_scountry=='') {

					if ($result_form) {

						$result_form = $result_form + '<br />Fill <b>Shipping Address : </b><u>Country</u> field .';

					} else {

						$result_form = 'Fill <b>Shipping Address : </b><u>Country</u> field .';

					}

				}

		

	

				$_szip = $('s_zip').value;

				if ($_szip=='') {

					if ($result_form) {

						$result_form = $result_form + '<br />Fill <b>Shipping Address : </b><u>Zip / Postal Code</u> field .';

					} else {

						$result_form = 'Fill <b>Shipping Address : </b><u>Zip / Postal Code</u> field .';

					}

				}

				

			}

	

	

			$_phone = $('ci_phone').value;

			if ($_phone=='') {

				if ($result_form) {

					$result_form = $result_form + '<br />Fill <b>Contact information : </b><u>Phone</u> field .';

				} else {

					$result_form = 'Fill <b>Contact information : </b><u>Phone</u> field .';

				}

			}

	

	

			$_bill_state = $('b_state').value;

			if ($_bill_state=="NEW-STATE") {

				$_bill_state = $('b_newstate').value;

			}

	

			$_ship_state = $('s_state').value;

			if ($_ship_state=="NEW-STATE") {

				$_ship_state = $('s_newstate').value;

			}

	

			if ($result_form=='') {

				x_upgrade_user( $('pi_title').value , 

								   $_name,$_lastname, 

									$('pi_company').value ,

									$_adr,

									$('b_adr2').value ,

									$_city,$_country, 

									$_bill_state ,

									$_zip,

									$('s_check').checked,

									$('s_name').value ,

									$('s_lastname').value ,

									$('s_adr').value ,

									$('s_adr2').value ,

									$('s_city').value,

									$('s_country').value,

									$_ship_state ,

									$('s_zip').value,

									$_phone,

									$('ci_fax').value ,

									$('ci_website').value ,

									$('newsletter_check').checked ,

									$store_id ,

									upgrade_user_cb );	

			} else {

				$('upgrade_status_message').innerHTML = $result_form;
				$('upgrade_status_message').className = "showme";

				//$('upgrade_loading').style.visibility = "hidden";
				//$('upgrade_loading').style.display = "none";
				//modal_load_hide();
			}

		}

		

	// ------------------------------------------------

	

		function toggleShippingAddress() {

			var checkbox = $('s_check');

			var addressDiv = $('shippingAddress');

			

			if (checkbox.checked) {

				addressDiv.style.display = 'none';

			} else {

				addressDiv.style.display = 'block';

			}

		}

	

	// ------------------------------------------------

	

		function upgrade_user_cb($export_result) {

			//$('upgrade_loading').style.visibility = "hidden";
			//$('upgrade_loading').style.display = "none";

			if ($export_result[0]=='error') {

				$('upgrade_status_message').innerHTML = $export_result[1];
				$('upgrade_status_message').className = "showme";

			} else {

				$('upgrade_status_message').innerHTML = $export_result[1]; 
				$('upgrade_status_message').className = "showme successmsg";

			}
			//modal_load_hide();
		}

		

	// ------------------------------------------------

	

		function do_change_password() {

			//$('password_loading').style.visibility = "visible";
			//$('password_loading').style.display = "block";
			$('password_status_message').className = "hideme";
			//modal_load_show('<span>'+$msgHtml__change_password+'</span>' , {title: $msgHtml__change_password_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );

			

			$result_form = '';

			

			$npass = $('newpass').value;

			$cnpass = $('cnewpass').value;

			if ($npass!=$cnpass) {

				$result_form = "<u>New Password</u> & <u>Confirm New Password</u> field aren't match !";

			}

			$pass = $('pass').value ;		

			if ($result_form=="") {

				x_change_pass( $pass , $npass , do_change_password_cb ); 

			} else {

				$('password_status_message').innerHTML = $result_form;
				$('password_status_message').className = "showme";

				//$('password_loading').style.visibility = "hidden";
				//$('password_loading').style.display = "none";
				//modal_load_hide();
			}	

		}

	

	// ------------------------------------------------

	

		function do_change_password_cb($export_result) {

			//$('password_loading').style.visibility = "hidden";
			//$('password_loading').style.display = "none";

			if ($export_result[0]=='error') {

				$('password_status_message').innerHTML = $export_result[1];
				$('password_status_message').className = "showme";

			} else {

				$('password_status_message').innerHTML = $export_result[1]; 
				$('password_status_message').className = "showme successmsg";

			}
			//modal_load_hide();
		}

	

	// ------------------------------------------------

	

		function do_login_user() {

			//$('login_loading').style.visibility = "visible";
			//$('login_loading').style.display = "block";
			//modal_load_show('<span>'+$msgHtml__login_user+'</span>' , {title: $msgHtml__login_user_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			$('login_status_message').className = "hideme";

			$user_email = $('loginuser').value;

			if ($user_email) {

				$user_pass = $('loginpass').value;

				$store_id = get_current_store_id();

				x_login_user($user_email,$user_pass,$store_id,login_user_cb);	

			} else {

				$('login_status_message').innerHTML = '<b>ERROR :</b><br>Please enter account details!';
				$('login_status_message').className = "showme";

				//$('login_loading').style.visibility = "hidden";
				//$('login_loading').style.display = "none";
				//modal_load_hide();
			}

		}

	

	// ------------------------------------------------

	

		function login_user_cb($export_result) {

			//$('login_loading').style.visibility = "hidden";
			//$('login_loading').style.display = "none";

			if ($export_result[0]=='error') {

				$('login_status_message').innerHTML = '<b>ERROR :</b><br>' + $export_result[1];
				$('login_status_message').className = "showme";
				//modal_load_hide();
				
			} else {

				$('login_status_message').className = "hideme";
				$('login_status_message').innerHTML = '';
				redirectme($export_result[1]);

			}

		}

		

	// ------------------------------------------------



		function do_forgotpass_user() {

			//$('forgotpass_loading').style.visibility = "visible";
			//$('forgotpass_loading').style.display = "block";

			//modal_load_show('<span>'+$msgHtml__forgot_password+'</span>' , {title: $msgHtml__forgot_password_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			$('forgotpass_status_message').className = "hideme";

			$user_email = $('mailforgotpass').value;
			$user_name = $('nameforgotpass').value;
			$user_family = $('familyforgotpass').value;

			if ($user_email) {

				x_forgotpass_user($user_name,$user_family,$user_email,forgotpass_user_cb);	

			} else {

				$('forgotpass_status_message').innerHTML = '<b>ERROR :</b><br>Please fill all fields .';
				$('forgotpass_status_message').className = "showme";
				//modal_load_hide();
				//$('forgotpass_loading').style.visibility = "hidden";
				//$('forgotpass_loading').style.display = "none";

			}

		}

	

	// ------------------------------------------------

	

		function forgotpass_user_cb($export_result) {

			//$('forgotpass_loading').style.visibility = "hidden";
			//$('forgotpass_loading').style.display = "none";

			if ($export_result[0]=='error') {

				$('forgotpass_status_message').innerHTML = '<b>ERROR :</b><br>' + $export_result[1];
				$('forgotpass_status_message').className = "showme";
				
			} else {

				$('forgotpass_status_message').className = "showmegreen";
				$('forgotpass_status_message').innerHTML = $export_result[1];

			}
			//modal_load_hide();
		}

		

	// ------------------------------------------------



		function do_signup_user() {
			//$('login_loading').style.visibility = "visible";
			//$('login_loading').style.display = "block";
			//modal_load_show('<span>'+$msgHtml__signup_user+'</span>' , {title: $msgHtml__signup_user_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			$('login_status_message_payment').className = "hideme";
			$result_form = '';


			$_email = $('e_email').value;
			if ($_email=='') {
				if ($result_form) {
					$result_form = $result_form + '<br /><u>Email</u> field must be filled.';
				} else {
					$result_form = '<u>Email</u> field must be filled.';
				}
			}

	
			$_pass = $('e_pass').value;
			if ($_pass=='') {
				if ($result_form) {
					$result_form = $result_form + '<br /><u>Password</u> field must be filled.';
				} else {
					$result_form = '<u>Password</u> field must be filled.';
				}
			}

	
			$_pass2 = $('e_pass2').value;
			if ($_pass2=='') {
				if ($result_form) {
					$result_form = $result_form + '<br /><u>Confirm Password</u> field must be filled.';
				} else {
					$result_form = '<u>Confirm Password</u> field must be filled.';
				}
			}

	

			if ($_pass2!=$_pass) {
				if ($result_form) {
					$result_form = $result_form + '<br /><u>Password</u> & <u>Confirm Password</u> field , They are not match!';
				} else {
					$result_form = '<u>Password</u> & <u>Confirm Password</u> field , They are not match!';
				}
			}

	
			$store_id = get_current_store_id();

	

			if ($result_form=='') {

				x_signup_user( $_email,
							   $_pass ,
  							   $('newsletter_check').checked ,
							   $store_id ,
							   signup_user_cb );	

			} else {
				$('login_status_message_payment').innerHTML = '<b>ERROR :</b><br>' + $result_form;
				$('login_status_message_payment').className = "showme";
				//$('login_loading').style.visibility = "hidden";
				//$('login_loading').style.display = "none";
				//modal_load_hide();
			}

		}

	

	// ------------------------------------------------

	

		function signup_user_cb($export_result) {

			//$('login_loading').style.visibility = "hidden";
			//$('login_loading').style.display = "none";

			if ($export_result[0]=='error') {

				$('login_status_message').innerHTML = $export_result[1];
				$('login_status_message').className = "showme";
				//modal_load_hide();
			} else {

				$('login_status_message').className = "hideme";
				$('login_status_message').innerHTML = '';
				redirectme($export_result[1]);

			}

		}

		

	// ------------------------------------------------



		function CheckoutCart() {

			$store_id = get_current_store_id();
			var $ssid = document.getElementById('current__substore_select').value;
			if ( $ssid != 0 ) {
				redirectme('body.php?id=' + $store_id + '&module=checkout&substoreid='+$ssid);
			} else {
				redirectme('body.php?id=' + $store_id + '&module=checkout');
			}

		}

		

	// ------------------------------------------------





	function send_peyment() {

		

		if (document.getElementById('cvmvalue').value=='' && document.getElementById('cvmindicator').value=='provided' ) {

			alert("Please fill CVV2 parameter of your Credit Card.");

		} else {

			frmpeyment.submit();

		}

		

		//$tax = document.getElementById('total_tax_price').innerHTML;

		//$ship = document.getElementById('total_ship_price').innerHTML;

		//$peyment = document.getElementById('peyment_type').innerHTML;



		//$ds_code = document.getElementById('peyment_discount_code').innerHTML;

		//$ds_discount = document.getElementById('peyment_discount_percent').innerHTML;

		

		// save parameters by ajax

		//init_bill_details($tax,$ship,$peyment,$ds_code,$ds_discount);

		

	}



	

	// ------------------------------------------------

	

	function init_bill_details($tax,$ship,$peymenttype,$ds_code,$ds_percent) {

			x_init_bill($tax,$ship,$peymenttype,$ds_code,$ds_percent,init_bill_details_callback);

		}





		function init_bill_details_callback($result) {

			alert($result[0]);

			alert($result[1]);

			//if ($result[0]) {



			//	alert($result[1]);

			

			//} else {

			//	alert('There was a problem processing your card please contact info@ymamerch.com');

				//alert('There was a problem processing your card please contact research@themerchlab.com');

				//alert('There was a problem processing your card please contact sales@airporttapesandrecords.com');

			//}

		}

		

	// ------------------------------------------------

		

	function enlarge_to_main_image($imgid) {
		$image_handle = 'imgothers-'+$imgid;
		$($image_handle).className = "select_image_border";
		$($image_handle).name = "imgothers-select";
		$('img_main_product').src = $($image_handle).src ;
	}

	

	// ------------------------------------------------

	function toggle_faq_detail( obj_id )
	{
		//$answer = $('faq_desc_section_'+obj_id);
		//new Effect.toggle( $answer ,'Blind' , {duration:1} );
		//var mySlide = new Fx.Slide( 'faq_desc_section_' + obj_id ).hide().toggle();

		//var myAccordion = new Accordion($$('.faq_title_section'), $$('.faq_desc_section'), {
			//display: 2,
		//});

		//$q = $('faq_title_section_'+obj_id);
		//new Effect.Shake( $q , {duration:1,distance:5} );

		/*
		$item = $('faq_desc_section_'+obj_id);
		$classname = $item.className;
		if ($classname=="faq_desc_section") {
			$item.className = 'faq_desc_section_show';
			new Effect.Appear( $item , {duration:1,to:1} );
		} else {
			$item.className = 'faq_desc_section';
			new Effect.Fade( $item , {duration:1,to:0} );
		}
		*/
	}
	
	// ------------------------------------------------
	
	function prd__LMO(pid, isMouseOver)
	{
		if(isMouseOver == true)
		{
			$('rolldata-' + pid).style.visibility='visible';
			$('ptitle-' + pid).style.visibility='visible';
			$('pdetail-' + pid).style.visibility='hidden';
		}
		else
		{
			$('rolldata-' + pid).style.visibility='hidden';
			$('ptitle-' + pid).style.visibility='hidden';
			$('pdetail-' + pid).style.visibility='visible';
		}
	}

	// ------------------------------------------------

	function fire_win_prd_detail($sid,$pid,$store_of_product_id,$substore_id,$ptitle) {
		//var win = new Window({className: "DarkX", title: '' , width:800, height:435, url: "body.php?id="+$sid+"&module=product_details_popup&pid="+$pid, showEffectOptions: {duration:1} , hideEffectOptions: {duration:0.5}, showEffect:Effect.Appear, hideEffect: Effect.SlideUp, draggable:true, wiredDrag: true,minimizable:false,maximizable:false,resizable:true});
		//var win = new Window({className: "DarkX", title: '' , width:800, height:435, url: "body.php?id="+$sid+"&module=product_details_popup&pid="+$pid, draggable:true, wiredDrag: true,minimizable:false,maximizable:false,resizable:true});
		var win = new Window({className: "DarkX", title: '' , width:800, height:435, url: "body.php?id="+$sid+"&module=product_details_popup&pid="+$pid+"&s_pid="+$store_of_product_id+"&substoreid="+$substore_id, showEffectOptions: {duration:0} , hideEffectOptions: {duration:0}, showEffect:Effect.Appear, hideEffect: Effect.Fade, draggable:true, wiredDrag: true,minimizable:false,maximizable:false,resizable:true});
		//win.setStatusBar("Press ESC to Close this window.");
		win.show(true);
		win.showCenter();
		WindowCloseKey.init();
	}
	
	// ------------------------------------------------
	
	function fire_win_email_product($sid,$pid,$store_of_product_id,$substore_id) {
		var winmail = new Window({className: "DarkX", title: '' , width:600, height:400, url: "body.php?id="+$sid+"&module=product_details_send_mail&pid="+$pid+"&s_pid="+$store_of_product_id+"&substoreid="+$substore_id, showEffectOptions: {duration:.2} , hideEffectOptions: {duration:.2}, showEffect:Effect.Appear, hideEffect: Effect.Fade, draggable:true, wiredDrag: true,minimizable:false,maximizable:false,resizable:true});
		winmail.show(true);
		winmail.showCenter();
		WindowCloseKey.init();
	}
	
	// ------------------------------------------------
	function fire_win_download_product($sid,$order_id) {
		var win_download = new Window({className: "DarkX", title: '' , width:650, height:260, url: "body.php?id="+$sid+"&module=order_popup_download&orderid="+$order_id, showEffectOptions: {duration:0} , hideEffectOptions: {duration:0}, showEffect:Effect.Appear, hideEffect: Effect.Fade, draggable:true, wiredDrag: true,minimizable:false,maximizable:false,resizable:true});
		win_download.show(true);
		win_download.showCenter();
		WindowCloseKey.init();
		return win_download.getId();
	}
	
	// ------------------------------------------------

	function show_result_box($id){
		new Effect.Appear( $($id) , { duration:1 , from:0 , to:1 } );
		new Effect.Pulsate( $($id) , { duration:2 , delay:1} );
		new Effect.Fade( $($id) , { duration:1 , from:1, to:0,delay:3 } );
	}
	
	// ------------------------------------------------
	
	
	// ------------------------------------------------
	function online_shipping_cb(export_result){
			document.getElementById("shipping_total_price_value").innerHTML = '$' + export_result;
			//modal_load_hide();
	}
	
	function do_online_shipping() {
			var vsh = document.getElementById("shipping_city").value;
			if( vsh != '' ) {
				//modal_load_show('<span>'+$msgHtml__online__shipping+'</span>' , {title: $msgHtml__online__shipping_title , overlayClose: false , transitions: false , closeValue:'HIDE___BUTTON' } );
			
				x_get_online_shipping(vsh,online_shipping_cb);
			} else {
				document.getElementById("shipping_total_price_value").innerHTML = '$0.00';	
			}
		}
	