<!--
   function checkit(){
     var charcode=(event.which)?event.which:event.keycode;
            if(charcode>31&&(charcode< 48||charcode>57)){
      alert("Here can importation numeral.");
      return false;}
     //return true;
    }
	
function dateCheck(str){
    var re = new RegExp("^([0-9]{4})[.-]{1}([0-9]{1,2})[.-]{1}([0-9]{1,2})$");
    var ar;
    var res = true;
    
    if ((ar = re.exec(str)) != null){
        var im,jd,ky;
        //ky = parseFloat(ar[3]);
		ky = parseFloat(ar[1]);
		im = parseFloat(ar[2]);
        // verify mm
        if (im <= 0 || im > 12){
            res = false;
        }
        //jd = parseFloat(ar[1]);
        jd = parseFloat(ar[3]);
		// verify dd
        if (jd <= 0 || jd > 31){
            res = false;
        }
		if ((im == 4 || im == 6 || im == 9 || im == 11)&&(jd > 30)){
		    res = false;
		}
		if ((ky % 4 == 0 && ky % 100 != 0 || ky % 400==0)&&(im == 2)&&(jd > 29)){
		    res = false;
        }
		if ((!(ky % 4 == 0 && ky % 100 != 0 || ky % 400==0))&&(im == 2)&&(jd > 28)){
		    res = false;
        }
    }else {
        res = false;
    }
    if (str.length == 0){res = true;}
    if (!res){
        alert('Date format inaccuracy.');
    }
   
    return res;
}

function showdiv(LayerName1,y){
   var x1,y1;
   var ev;
   ev=ev||window.event;
   x1=ev.clientX + document.body.scrollLeft;
   y1=ev.clientY + scPos() + y - 80;
   if(x1+220 > window.document.body.offsetWidth){x1=window.document.body.offsetWidth -240;}
   //y1 = document.body.scrollTop+ y1 - 80;
   //eval("document.all." + LayerName1 + ".style.posLeft = x1");//
   //eval("document.all." + LayerName1 + ".style.posTop = y1");//
   //eval("document.all." + LayerName1 + ".style.visibility = 'visible'");
   document.getElementById(LayerName1).style.posLeft = x1 ;//
   document.getElementById(LayerName1).style.posTop = y1 ;//
   document.getElementById(LayerName1).style.visibility = 'visible';

}

function hiddendiv(LayerName1){
   eval("document.all." + LayerName1 + ".style.visibility = 'hidden'");
}
function scPos(){ 
   var scrollPos;
   if (typeof window.pageYOffset != 'undefined') { 
      scrollPos = window.pageYOffset; 
   }else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') { 
      scrollPos = document.documentElement.scrollTop; 
   }else if (typeof document.body != 'undefined') { 
      scrollPos = document.body.scrollTop; 
   }
   return scrollPos; 
}

function del_yesnot(id){
   var obj = window.confirm('Assurance want to delete ?');
   if (obj){
      window.location.href = id;
      return true;
   }else{
   //window.location.href = '';
   //return false;
   }
}

function toBreakWord(intLen, id){
 var obj=document.getElementById(id);
 var strContent=obj.innerHTML; 
 var strTemp="";
 while(strContent.length>intLen){
  strTemp+=strContent.substr(0,intLen)+"<br>"; 
  strContent=strContent.substr(intLen,strContent.length); 
 }
 strTemp+= strContent;
 obj.innerHTML=strTemp;
}

function CopyTable(oTable)
{
  var ua,s;
  ua = navigator.userAgent;  
  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0){
   var obj = document.getElementById(oTable);
   var txt = document.body.createTextRange();
   txt.moveToElementText(obj);
   txt.select();
   txt.execCommand("Copy");  
 }
 else{
    alert("Use in Microsoft Internet Explorer");
 }  
}

   function show_img(idname,w0,h0){
      var w,h;
	  var k;
	  var con;
	  var smallslot =document.getElementById(idname);
	  w=smallslot.width;
	  h=smallslot.height;
	  k=w/h;
	  if(k>=1){
	     if (w>=w0){
		    w=w0;
			h=w/k;			
		 }
		 if(h0>0 && h>h0){
			   h=h0;
			   w=k*h;
		 }
	  } 
	  else{
	     if (h>=h0){
		    h=h0;
			w=k*h;
		 }
	  } 
      return w; 
   } 
//-->
