// JavaScript Document
/*----------------------- Start Over ----------------------*/
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)
}
/*----------------------- End Over ----------------------*/

function loadProfileInner() {
	jQuery("#load_profilewaiting").show();
	var TYPE="POST";
	var URL="load_profileinner.php";
		jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_newprofile").show();
			jQuery("#load_newprofile").html(html);
			jQuery("#load_profilewaiting").hide();
		}
	}); 
	}
	
	function loadProfileInnerTH() {
	jQuery("#load_profilewaiting").show();
	var TYPE="POST";
	var URL="load_profileinner-th.php";
		jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_newprofile").show();
			jQuery("#load_newprofile").html(html);
			jQuery("#load_profilewaiting").hide();
		}
	}); 
	}
	
function loadProfileNew() {
	
	jQuery("#load_profilewaiting").show();
	
	var TYPE="POST";
	var URL="load_profile.php";
		jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_newprofile").show();
			jQuery("#load_newprofile").html(html);
			jQuery("#load_profilewaiting").hide();
		}
	}); 
	}
	
function loadProfileNewTH() {
	
	jQuery("#load_profilewaiting").show();
	
	var TYPE="POST";
	var URL="load_profile-th.php";
		jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_newprofile").show();
			jQuery("#load_newprofile").html(html);
			jQuery("#load_profilewaiting").hide();
		}
	}); 
	}
	
function loadJobInner() {
	jQuery("#load_profilewaiting").show();
	var TYPE="POST";
	var URL="load_jobinner.php";
		jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_newprofile").show();
			jQuery("#load_newprofile").html(html);
			jQuery("#load_profilewaiting").hide();
		}
	}); 
	}	
	
function loadJobInnerTh() {
	jQuery("#load_profilewaiting").show();
	var TYPE="POST";
	var URL="load_jobinner-th.php";
		jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_newprofile").show();
			jQuery("#load_newprofile").html(html);
			jQuery("#load_profilewaiting").hide();
		}
	}); 
	}	

function insertContactUs() {
	
	jQuery("#load_mainwaiting").show();

	var TYPE="POST";
	var URL="load_contactus.php";
	var dataSet= $("#myForm").serialize();
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_mainContant").show();
			jQuery("#load_mainContant").html(html);
			jQuery("#load_mainwaiting").hide();
		}
	}); 
	}	

function insertContactUsTh() {
	
	jQuery("#load_mainwaiting").show();

	var TYPE="POST";
	var URL="load_contactus-th.php";
	
	var dataSet= $("#myForm").serialize();
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_mainContant").show();
			jQuery("#load_mainContant").html(html);
			jQuery("#load_mainwaiting").hide();
		}
	}); 
	}	
	
function loadBannerHome() {
	jQuery("#load_bannerwaiting").show();
	var TYPE="POST";
	var URL="load_banner.php";
		jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_waitbanner").show();
			jQuery("#load_waitbanner").html(html);
			jQuery("#load_bannerwaiting").hide();
		}
	}); 
	}	
	
	function loadBannerHomeTH() {
	jQuery("#load_bannerwaiting").show();
	var TYPE="POST";
	var URL="load_banner-th.php";
		jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_waitbanner").show();
			jQuery("#load_waitbanner").html(html);
			jQuery("#load_bannerwaiting").hide();
		}
	}); 
	}	


		function onOpenPage1() {
		var selectedEffect ='blind';
		var options = {};
		jQuery("#loder_page1").show(selectedEffect,options,500);
		jQuery("#loder_page2").hide();
		jQuery("#loder_page3").hide();
	//	jQuery("#lond_close").show();
	//	jQuery("#lond_open").hide();

		}	

		function onOpenPage2() {
		var selectedEffect ='blind';
		var options = {};
		jQuery("#loder_page1").hide();
		jQuery("#loder_page2").show(selectedEffect,options,500);
		jQuery("#loder_page3").hide();
	//	jQuery("#lond_close").show();
	//	jQuery("#lond_open").hide();

		}	
		
		function onOpenPage3() {
		var selectedEffect ='blind';
		var options = {};
		jQuery("#loder_page1").hide();
		jQuery("#loder_page2").hide();
		jQuery("#loder_page3").show(selectedEffect,options,500);
	//	jQuery("#lond_close").show();
	//	jQuery("#lond_open").hide();

		}	

function insertOnlineSand() {
	
	jQuery("#load_mainwaiting").show();

	var TYPE="POST";
	var URL="load_online.php";
	var dataSet= $("#myForm").serialize();
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_contantonline").show();
			jQuery("#load_contantonline").html(html);
			jQuery("#load_mainwaiting").hide();
		}
	}); 
	}
	
	function insertOnlineSandTh() {
	
	jQuery("#load_mainwaiting").show();

	var TYPE="POST";
	var URL="load_online-th.php";
	var dataSet= $("#myForm").serialize();
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_contantonline").show();
			jQuery("#load_contantonline").html(html);
			jQuery("#load_mainwaiting").hide();
		}
	}); 
	}
	

	function loadContantToPage(fileload) {
	jQuery("#load_contantwaiting").show();
	var TYPE="POST";
	var URL= fileload+".php";
			jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_contantInsert").show();
			jQuery("#load_contantInsert").html(html);
			jQuery("#load_contantwaiting").hide();
		}
	}); 
	}
	
		function productSearch() {
	
	jQuery("#load_productwaiting").show();
	jQuery(popup).empty().hide();
	jQuery('#thumbPopup').remove();

	var TYPE="POST";
	var URL="load_product_5_search.php";
	var dataSet= $("#frmSearch").serialize();
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_contantInsert").show();
			jQuery("#load_contantInsert").html(html);
			jQuery("#load_productwaiting").hide();
		}
	}); 
	}
	
	function productSearchView(productid) {
	
	jQuery("#load_productwaiting").show();
	jQuery(popup).empty().hide();
	jQuery('#thumbPopup').remove();
	
	var TYPE="POST";
	var URL="load_product_5_view.php";
	var dataSet={ 
	pro_id : productid
	};
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_productnew").show();
			jQuery("#load_productnew").html(html);
			jQuery("#load_productwaiting").hide();
		}
	}); 
	}
	
	function productSearchLink(productid,productgid) {
	jQuery("#load_productwaiting").show();
	jQuery(popup).empty().hide();
	jQuery('#thumbPopup').remove();

	var TYPE="POST";
	var URL="load_product_5_search.php";
	var dataSet={ 
	pro_id : productid,
	inputGroupID : productgid
	};
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_contantInsert").show();
			jQuery("#load_contantInsert").html(html);
			jQuery("#load_productwaiting").hide();
		}
	}); 
	}
	
	function productSearchBack() {
	jQuery("#load_contantwaiting").show();
	var TYPE="POST";
	var URL= "load_product_5.php";
			jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_contantInsert").show();
			jQuery("#load_contantInsert").html(html);
			jQuery("#load_contantwaiting").hide();
		}
	}); 
	}
	
	
	
	function productSearchTH() {
	
	jQuery("#load_productwaiting").show();

	var TYPE="POST";
	var URL="load_product_5_search-th.php";
	var dataSet= $("#frmSearch").serialize();
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_contantInsert").show();
			jQuery("#load_contantInsert").html(html);
			jQuery("#load_productwaiting").hide();
		}
	}); 
	}
	
	function productSearchViewTH(productid) {
	
	jQuery("#load_productwaiting").show();

	var TYPE="POST";
	var URL="load_product_5_view-th.php";
	var dataSet={ 
	pro_id : productid
	};
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_productnew").show();
			jQuery("#load_productnew").html(html);
			jQuery("#load_productwaiting").hide();
		}
	}); 
	}
	
	function productSearchLinkTH(productid,productgid) {
	
	jQuery("#load_productwaiting").show();

	var TYPE="POST";
	var URL="load_product_5_search-th.php";
	var dataSet={ 
	pro_id : productid,
	inputGroupID : productgid
	};
		
	jQuery.ajax({type:TYPE,url:URL,data:dataSet,
		success:function(html){
			
			jQuery("#load_contantInsert").show();
			jQuery("#load_contantInsert").html(html);
			jQuery("#load_productwaiting").hide();
		}
	}); 
	}
	
	function productSearchBackTH() {
	jQuery("#load_contantwaiting").show();
	var TYPE="POST";
	var URL= "load_product_5-th.php";
			jQuery.ajax({type:TYPE,url:URL,
		success:function(html){
			jQuery("#load_contantInsert").show();
			jQuery("#load_contantInsert").html(html);
			jQuery("#load_contantwaiting").hide();
		}
	}); 
	}
