// JavaScript Document
function setCookies(sName,sValue,oExpires,sPath,sDomain,Bsecure)
{
    var sCookie=sName+"="+encodeURIComponent(sValue);
    if(oExpires) sCookie+="; expires="+oExpires.toGMTString();
    if(sPath)sCookie+="; path="+ sPath;
    if(sDomain)sCookie+="; domain="+sDomain;
    if(Bsecure)sCookie+="; secure";
    document.cookie=sCookie;
}
function getCookies(sName)
{
    var sRE="(?:; )?" + sName+"=([^;]*);?";
    var oRE=new RegExp(sRE);
    if(oRE.test(document.cookie))
    {
        return decodeURIComponent(RegExp["$1"]);
        
    } 
    return null;
}
function getHtml(url,param ,method,methodParam)
{  
    if ($)
	{
	   $.ajax({
		   type: "post",
		   url: url,
		   data:  param,
		   dataType :"html",   
			success : function(msg)
		   {
				 var regExp = />([{][^<]{0,}[}])</;
				 regExp.exec(msg);
				 var Result = RegExp.$1; 
				 var Json = eval( "(" + Result + ")");
				 if (method){
			     eval(method+"(Json.Info,methodParam)");
				 }
				 else
				 {
				  $(methodParam).html(Json.Info);
				}
			}
		});	
    }
}
function getData(url,param ,method,methodParam)
{ 
    if ($)
	{
	   $.ajax({
		   type: "post",
		   url: url,
		   data:  param,
		   dataType :"html",   
			success : function(msg)
		   {
				 var regExp = />([{][^<]{0,}[}])</;
				 regExp.exec(msg);
				 var Result = RegExp.$1; 
				 var Json = eval( "(" + Result + ")");
			     eval(method+"(Json.Data,methodParam)");
			}
		});	
    }
}
function displayByID(ID)
{
	if ($)
	{ 
		 $("#"+ID).css("display","");
	}	
}
function hiddenByID(ID)
{
	if ($)
	{ 
		 $("#"+ID).css("display","none");
	}	
}
