$(document).ready(function()
{
	$("#dim").css("height", $(document).height());
});	
function $D(cont){
   var d=$my(cont);
   var h=d.offsetHeight;
   var maxh=606;
   function dmove(){
       h+=20;
       if(h>=maxh){
          d.style.height='606px';
          clearInterval(iIntervalId);
       }else{
       d.style.display='block';
       d.style.height=h+'px';
       }
       }
     iIntervalId=setInterval(dmove,2);
}
function $D2(cont){
   var d=$my(cont);
   var h=d.offsetHeight;
   var maxh=606;
   function dmove(){
       h-=20;
       if(h<=0){
       d.style.display='none';
       clearInterval(iIntervalId);
       }else{
       d.style.height=h+'px';
       }
       }
     iIntervalId=setInterval(dmove,2);
}

function $use(obj,cont){
   var d=$my(cont);
   var sb=$my(obj.id);
   if(d.style.display=='block'){
   $D2(cont);
   sb.innerHTML='More[+]';
   }else{
   $D(cont);
   sb.innerHTML='Close[-]';
   }
};

function $my(id) {
    return document.getElementById(id);
}

function showMenu (baseID, divID) {
    baseID = $my(baseID);
    divID  = $my(divID);
    if (showMenu.timer) clearTimeout(showMenu.timer);
	hideCur();
    divID.style.display = 'block';
	showMenu.cur = divID;

    if (! divID.isCreate) {
        divID.isCreate = true;
        //divID.timer = 0;
        divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
			hideCur();
            divID.style.display = 'block';
        };

        function hide () {
            showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 400);
        }

        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
	function hideCur () {
		showMenu.cur && (showMenu.cur.style.display = 'none');
	}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function   chkmaxsms(vobj1,vmax)
{
  var   str=vobj1.value;   
  var   strlen=str.length;   
    
  if(strlen>vmax)   {   
  alert('The message exceeds 300 characters limit.');   
  vobj1.value=str.substr(0,vmax);
  }   
}
today=new Date();
y0=today.getFullYear();
