// JavaScript Document
function imgSwap(oImg)
{
   var strOver  = "_on"    // image to be used with mouse over
   var strOff = "_off"     // normal image
   var strImg = oImg.src
   if (strImg.indexOf(strOver) != -1) 
      oImg.src = strImg.replace(strOver,strOff)
   else
      oImg.src = strImg.replace(strOff,strOver)
}

function formFocus(v,i) {
	if(v.value==i){v.value=''} 
}
function formBlur(v,i) {
	if(v.value==''){v.value=i}
}

				function onAskQ(inputGask,inputQask,inputEask,inputNask,inputTask) {
		jQuery("#loder_ajax").show();
		jQuery("#formask").hide();
		var TYPE="POST";
		var URL="insert-question.php";
		var dataSet={ Gask: inputGask, Qask: inputQask, Eask: inputEask, Nask: inputNask, Telask: inputTask };
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#formask").show();
				jQuery("#formask").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
	function onAskQ_En(inputGask,inputQask,inputEask,inputNask,inputTask) {
		jQuery("#loder_ajax").show();
		jQuery("#formask").hide();
		var TYPE="POST";
		var URL="insert-question-en.php";
		var dataSet={ Gask: inputGask, Qask: inputQask, Eask: inputEask, Nask: inputNask, Telask: inputTask };
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#formask").show();
				jQuery("#formask").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
		
	function onPhoto(inputID,inputKey) {
		jQuery("#loder_ajax").show();
		jQuery("#detail_photo").hide();
		
		var TYPE="POST";
		var URL="photo-ajax.php";
		var dataSet={ photoID: inputID, photoKey: inputKey};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#detail_photo").show();
				jQuery("#detail_photo").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
		
		function onPhoto_En(inputID,inputKey) {
		jQuery("#loder_ajax").show();
		jQuery("#detail_photo").hide();
		
		var TYPE="POST";
		var URL="photo-ajax-en.php";
		var dataSet={ photoID: inputID, photoKey: inputKey};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#detail_photo").show();
				jQuery("#detail_photo").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		function onRegisterEnews(inputEmail,inputSub) {
		jQuery("#loder_ajaxenews").show();
		jQuery("#detail_enews").hide();
		var TYPE="POST";
		var URL="form_enew2-th.php";
		var dataSet={ emailName: inputEmail, subKey: inputSub};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#detail_enews").show();
				jQuery("#detail_enews").html(html)
				jQuery("#loder_ajaxenews").hide();
			}
		}); 
		}	
		
		function onRegisterEnewsFinal(inputValueEmail,inputValueFname,inputValueLname,inputValueGroup) {
		jQuery("#loder_ajaxenews").show();
		jQuery("#detail_enews").hide();
		var inputGroupArr=new Array();
		var inputGroupArr=inputValueGroup;
		var TYPE="POST";
		var URL="insert-enews-ajax.php";
		var dataSet={ emailName: inputValueEmail, fname: inputValueFname, lname: inputValueLname, groupname: [inputGroupArr]};
		
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#detail_enews").show();
				jQuery("#detail_enews").html(html)
				jQuery("#loder_ajaxenews").hide();
			}
		}); 
		}	
		
			function onLogin(inputID,inputKey) {
		jQuery("#loder_ajax").show();
		jQuery("#detail_login").hide();
		
		var TYPE="POST";
		var URL="login.php";
		var dataSet={ userID: inputID, passKey: inputKey};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#detail_login").show();
				jQuery("#detail_login").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
					function onLogin_En(inputID,inputKey) {
		jQuery("#loder_ajax").show();
		jQuery("#detail_login").hide();
		
		var TYPE="POST";
		var URL="login-en.php";
		var dataSet={ userID: inputID, passKey: inputKey};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#detail_login").show();
				jQuery("#detail_login").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
					function onPass(inputID) {
		jQuery("#loder_ajax").show();
		jQuery("#detail_login").hide();
		
		var TYPE="POST";
		var URL="check_pass.php";
		var dataSet={ userID: inputID};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#detail_login").show();
				jQuery("#detail_login").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
		
							function onPass_En(inputID) {
		jQuery("#loder_ajax").show();
		jQuery("#detail_login").hide();
		
		var TYPE="POST";
		var URL="check_pass-en.php";
		var dataSet={ userID: inputID};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#detail_login").show();
				jQuery("#detail_login").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
			function onRegister(inputValueEmail,inputValuePassword,inputValueFName,inputValueLName,inputValueAddress,inputValueDistrict,inputValueCityID,inputValueZipcode,inputValuePosition,inputValueBathID,inputValueTel,inputValueHobby,inputValueEnews) {
		var inputHobbyArr=new Array();
		var inputHobbyArr=inputValueHobby;
		
		var inputEnewsArr=new Array();
		var inputEnewsArr=inputValueEnews;

		
		jQuery("#loder_ajax").show();
		jQuery("#form_register").hide();
		
		var TYPE="POST";
		var URL="insert-register-ajax.php";
		var dataSet={ EmailID: inputValueEmail, PasswordID: inputValuePassword, FNameID: inputValueFName, LNameID: inputValueLName, AddressID: inputValueAddress, DistrictID: inputValueDistrict, CityID: inputValueCityID, ZipcodeID: inputValueZipcode, PositionID: inputValuePosition, BathID: inputValueBathID, telID: inputValueTel, hobbyname: [inputHobbyArr], enewsname: [inputEnewsArr]};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#form_register").show();
				jQuery("#form_register").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
			function onRegister_En(inputValueEmail,inputValuePassword,inputValueFName,inputValueLName,inputValueAddress,inputValueDistrict,inputValueCityID,inputValueZipcode,inputValuePosition,inputValueBathID,inputValueTel,inputValueHobby,inputValueEnews) {
		var inputHobbyArr=new Array();
		var inputHobbyArr=inputValueHobby;
		
		var inputEnewsArr=new Array();
		var inputEnewsArr=inputValueEnews;
		
		jQuery("#loder_ajax").show();
		jQuery("#form_register").hide();
		
		var TYPE="POST";
		var URL="insert-register-ajax-en.php";
		var dataSet={ EmailID: inputValueEmail, PasswordID: inputValuePassword, FNameID: inputValueFName, LNameID: inputValueLName, AddressID: inputValueAddress, DistrictID: inputValueDistrict, CityID: inputValueCityID, ZipcodeID: inputValueZipcode, PositionID: inputValuePosition, BathID: inputValueBathID, telID: inputValueTel, hobbyname: [inputHobbyArr], enewsname: [inputEnewsArr]};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#form_register").show();
				jQuery("#form_register").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
					function onEditProfile(inputValuePassword,inputValueFName,inputValueLName,inputValueAddress,inputValueDistrict,inputValueCityID,inputValueZipcode,inputValuePosition,inputValueBathID,inputValueTel,inputValueHobby) {
		jQuery("#loder_ajax").show();
		jQuery("#form_register").hide();
				var inputHobbyArr=new Array();
		var inputHobbyArr=inputValueHobby;
		
		var TYPE="POST";
		var URL="update-register-ajax.php";
		var dataSet={  PasswordID: inputValuePassword, FNameID: inputValueFName, LNameID: inputValueLName, AddressID: inputValueAddress, DistrictID: inputValueDistrict, CityID: inputValueCityID, ZipcodeID: inputValueZipcode, PositionID: inputValuePosition, BathID: inputValueBathID, telID: inputValueTel, hobbyname: [inputHobbyArr]};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#form_register").show();
				jQuery("#form_register").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
			function onEditProfile_En(inputValuePassword,inputValueFName,inputValueLName,inputValueAddress,inputValueDistrict,inputValueCityID,inputValueZipcode,inputValuePosition,inputValueBathID,inputValueTel,inputValueHobby) {
		jQuery("#loder_ajax").show();
		jQuery("#form_register").hide();
				var inputHobbyArr=new Array();
		var inputHobbyArr=inputValueHobby;
		
		var TYPE="POST";
		var URL="update-register-ajax-en.php";
		var dataSet={  PasswordID: inputValuePassword, FNameID: inputValueFName, LNameID: inputValueLName, AddressID: inputValueAddress, DistrictID: inputValueDistrict, CityID: inputValueCityID, ZipcodeID: inputValueZipcode, PositionID: inputValuePosition, BathID: inputValueBathID, telID: inputValueTel, hobbyname: [inputHobbyArr]};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#form_register").show();
				jQuery("#form_register").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
		function onRegisterCheck(inputValueFName,inputValueLName,inputValueAddress,inputValueDistrict,inputValueCityID,inputValueZipcode,inputValuePosition,inputValueBathID,inputValueTel,inputValueHobby,inputValueEnews) {
			
		var inputHobbyArr=new Array();
		var inputHobbyArr=inputValueHobby;
		
		var inputEnewsArr=new Array();
		var inputEnewsArr=inputValueEnews;

		
	jQuery("#loder_ajax").show();
		jQuery("#form_register").hide();
		
		var TYPE="POST";
		var URL="register-th.php";
		var dataSet={ FNameID: inputValueFName, LNameID: inputValueLName, AddressID: inputValueAddress, DistrictID: inputValueDistrict, CityID: inputValueCityID, ZipcodeID: inputValueZipcode, PositionID: inputValuePosition, BathID: inputValueBathID, telID: inputValueTel, hobbyname: [inputHobbyArr], enewsname: [inputEnewsArr]};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#form_register").show();
				jQuery("#form_register").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
		
			function onRegisterCheck_En(inputValueFName,inputValueLName,inputValueAddress,inputValueDistrict,inputValueCityID,inputValueZipcode,inputValuePosition,inputValueBathID,inputValueTel,inputValueHobby,inputValueEnews) {
			
		var inputHobbyArr=new Array();
		var inputHobbyArr=inputValueHobby;
		
		var inputEnewsArr=new Array();
		var inputEnewsArr=inputValueEnews;

		
	jQuery("#loder_ajax").show();
		jQuery("#form_register").hide();
		
		var TYPE="POST";
		var URL="register-en.php";
		var dataSet={ FNameID: inputValueFName, LNameID: inputValueLName, AddressID: inputValueAddress, DistrictID: inputValueDistrict, CityID: inputValueCityID, ZipcodeID: inputValueZipcode, PositionID: inputValuePosition, BathID: inputValueBathID, telID: inputValueTel, hobbyname: [inputHobbyArr], enewsname: [inputEnewsArr]};
		jQuery.ajax({type:TYPE,url:URL,data:dataSet,
			success:function(html){
				jQuery("#form_register").show();
				jQuery("#form_register").html(html)
				jQuery("#loder_ajax").hide();
			}
		}); 
		}	
		
		
		function onSeller() {
			var selectedEffect ='blind';
			var options = {};
		jQuery("#loder_seller").hide(selectedEffect,options,500);
		jQuery("#hide_seller").show(selectedEffect,options,500);

		}	
		
		
				function onSellerRe() {
			var selectedEffect ='blind';
			var options = {};
			
		jQuery("#hide_seller").hide(selectedEffect,options,400);
		jQuery("#loder_seller").show(selectedEffect,options,500);
		jQuery("#hide_seller").hide();
		
		jQuery("#loder_news").hide(selectedEffect,options,400);
		jQuery("#hide_news").show(selectedEffect,options,500);
		jQuery("#loder_news").hide();
		
		jQuery("#loder_update").hide(selectedEffect,options,400);
		jQuery("#hide_update").show(selectedEffect,options,500);
		jQuery("#loder_update").hide();

		}	
		
				function onSellerOut() {
			var selectedEffect ='blind';
			var options = {};
			
		jQuery("#hide_seller").hide();
		
		jQuery("#loder_news").hide();
		
		jQuery("#loder_update").hide();

		}	
		
		
				function onNewsRe() {
			var selectedEffect ='blind';
			var options = {};
			
		jQuery("#loder_seller").hide(selectedEffect,options,400);
		jQuery("#hide_seller").show(selectedEffect,options,500);
		jQuery("#loder_seller").hide();

		jQuery("#hide_news").hide(selectedEffect,options,400);
		jQuery("#loder_news").show(selectedEffect,options,500);
		jQuery("#hide_news").hide();

		jQuery("#loder_update").hide(selectedEffect,options,400);
		jQuery("#hide_update").show(selectedEffect,options,500);
		jQuery("#loder_update").hide();
		
		}	
		
				
				function onNewsOut() {
			var selectedEffect ='blind';
			var options = {};
			
		jQuery("#loder_seller").hide();

		jQuery("#hide_news").hide();

		jQuery("#loder_update").hide();
		
		}	

		
				function onUpdateRe() {
			var selectedEffect ='blind';
			var options = {};
			
		jQuery("#loder_seller").hide(selectedEffect,options,400);
		jQuery("#hide_seller").show(selectedEffect,options,500);
		jQuery("#loder_seller").hide();

		jQuery("#loder_news").hide(selectedEffect,options,400);
		jQuery("#hide_news").show(selectedEffect,options,500);
		jQuery("#loder_news").hide();

		jQuery("#hide_update").hide(selectedEffect,options,400);
		jQuery("#loder_update").show(selectedEffect,options,500);
		jQuery("#hide_update").hide();

		}	
		
			function onUpdateOut() {
			var selectedEffect ='blind';
			var options = {};
			
		jQuery("#loder_seller").hide();

		jQuery("#loder_news").hide();

		jQuery("#hide_update").hide();

		}	
			
				//callback function to bring a hidden box back

