﻿ var bl_showDivId ="blShowDiv";
	var bl_postBody;
	var bookmarkActionUrl = '/beauty-medical/AjaxBookLeaningV3.jsp';
	function setBookMarkActionUrl(url)
	{
		bookmarkActionUrl = url;
	}
	function getBookLeaning(jumpPage)
	{
		var postdata = encodeURI(bl_postBody) + "&_condition=&jumpPage="+jumpPage;
		
		var dime = $(bl_showDivId).getDimensions();
		$(bl_showDivId).setStyle({height:dime.height+"px"});
		
		
		var LogingImg = new Image();
		LogingImg.src = "/images/login/loadingAnimation.gif";
		$(bl_showDivId).update("<table width='100%' height='100%'><tr><td align='center' valign='bottom'><img src='/images/login/loadingAnimation.gif' /></td></tr></table>");
		new Ajax.Request(bookmarkActionUrl,
		{method:'post',postBody:postdata,asynchronous :false,
		onSuccess: function(transport) {
	      var res = transport.responseText;
		  $(bl_showDivId).update(transport.responseText);
		  
	    },
	    onFailure: function(transport)
	    {
	      $(bl_showDivId).update("出現錯誤狀況!!");
	      
	    },
		onComplete: function()
		{
			$(bl_showDivId).setStyle({height:""});
		}
	  });
	}

	function setBookLeaning(sid,showDivId)//str,str,str,str,str
	{
		 
                bl_postBody = "id="+sid;  
		bl_showDivId = showDivId;
	}
 
 
   

function doList() {
/*  document.frmTabList.KZ.value="";
  document.frmTabList.jumpPage.value="";
	document.frmTabList.id.value = actId;
  document.frmTabList.submit();
  */
} 

function jump(pageNo,pageCondition) {
  document.frmTabList.jumpPage.value=pageNo;
  document.frmTabList._condition.value= pageCondition;
  document.frmTabList.submit();
}

function tabMouseAct(idx,act) {
	//td
  document.getElementById("tab"+lastTab).className= "main1_menu1";
  document.getElementById("tab"+idx).className= act ? "main1_menu":"main1_menu1";
	document.getElementById("tab"+actTab).className = "main1_menu";
	//span
  document.getElementById("sTab"+lastTab).className= "main1_menu_word1";
  document.getElementById("sTab"+idx).className= act ? "main1_menu_word":"main1_menu_word1";
	document.getElementById("sTab"+actTab).className = "main1_menu_word";
}

function doTabClick(idx,id) {
  lastTab=actTab;
	actTab=idx;
	actId=id;
	doList();
}    
var actTab = 0; lastTab=0; actId = "";
   
