
function body_onload()
{
;
}

function delsure()
{
 var send = window.confirm("Si si istư?");
    if(send==false) return false;				
}

function isnumber(textin)
{
 r=true; //nums='09';
 for (i=0;i<textin.length;i++)
    if ((textin.charCodeAt(i)<48)||(textin.charCodeAt(i)>57)) r=false;		
 return ((i>0)&&(r)); 
}

function issometext(textin)
{
 r=false; //nums='09';
 for (i=0;i<textin.length;i++)
    if ((textin.charCodeAt(i)>64)&&(textin.charCodeAt(i)<123)) r=true;		
 return ((i>0)&&(r)); 
}

function isemail(textin)
{
 r=true; //nums='09';
   if ((textin.indexOf('@')<1)||(textin.indexOf('.')<3) || (textin.length<6)) r=false;		
 return (r); 
}


function disable_obj(objid){
objid.enable=false;
}


function insertValue(obj,stext) {
    var myQuery = obj;

    if(1) {
        var chaineAj = stext;

        //IE support
        if (document.selection) {
            myQuery.focus();
            sel = document.selection.createRange();
            sel.text = chaineAj;
            //document.sqlform.insert.focus();
        }
        //MOZILLA/NETSCAPE support
        else if (myQuery.selectionStart || myQuery.selectionStart == "0") {
            var startPos = myQuery.selectionStart;
            var endPos = myQuery.selectionEnd;
            var chaineSql = myQuery.value;

            myQuery.value = chaineSql.substring(0, startPos) + chaineAj + chaineSql.substring(endPos, chaineSql.length);
						myQuery.selectionStart=startPos+chaineAj.length;
						myQuery.selectionEnd=startPos+chaineAj.length;
						myQuery.focus();
        } else {
            myQuery.value += chaineAj;
        }
    }
}



function runPhpScript(url,postRequest,intoDivId,otherFunction,dontUseClock,condEval)
{
	 	
	 	
        var http_request = false;
        
		var r='';
        if (window.XMLHttpRequest) 
        {
            http_request = new XMLHttpRequest();
        } 
        else if (window.ActiveXObject) 
        {
            try {
              http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (eror) {
              http_request = new ActiveXObject("Microsoft.XMLHTTP");
            }
        }
     
    	http_request.onreadystatechange = function() 
        {
    	    
    	   
            if(intoDivId!=''||otherFunction!='')
    	    if (http_request && http_request.readyState == 4)
    	    //if (http_request && http_request.readyState >0)
            {
        	    
        	    if (http_request.status == 200)
        	    {    
    			       if(intoDivId )
                       {
                           var elmdiv=document.getElementById(intoDivId);
                           if((intoDivId!='' )&& (elmdiv) )
                           {
            	            
            	               if(typeof(elmdiv.innerHTML) != undefined)
                                   elmdiv.innerHTML=http_request.responseText;                        
                           }  
                                                   	           
                    	   
                           if(otherFunction!='')            	   	   
                    	       eval(otherFunction);
                       }
                   
                    
        	    }
        	    
    	    }
    	  
    	};

        http_request.open('GET', url, true);
        //http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
       
        //var pst='&ajax=1'+postRequest;
        http_request.send(null);
         
        //http_request.send(pst);
}
