Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/iws8/html/iport/js/
Upload File :
Current File : /var/www/html/mmishra/iws8/html/iport/js/mm.js

function openwindow(url) {
        window.open(url,'_blank','height=200,width=400,status=yes,toolbar=no,menubar=no,location=no')
}

function changeparent(elmnt, vlu) {
        window.opener.document.getElementById(elmnt).value='vlu'
}


function reloadpg(patgroup) {
        document.location.href='staff/?pg=<?php echo $pg; ?>&patgroup='+patgroup;
}

function popup(url, title, w, h) {
        var left = (screen.width - w);
        var top = (screen.height - h);
        return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+',top=0, left='+left);
}

function clearText(thefield){
  	if(thefield.defaultValue==thefield.value){
    		thefield.value="";
    		thefield.style.color="red";
  	};
};

function putText(thefield){
  	if(thefield.value==""){
    		thefield.value=thefield.defaultValue;
    		thefield.style.color="black";
  	};
};

function GetXmlHttpObject() {
        var xmlHttp = null;
        try {
                // Firefox, Opera 8.0+, Safari
                xmlHttp = new XMLHttpRequest();
        } catch (e) {
                // Internet Explorer
                try {
                        xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
        }
        return xmlHttp;
}

function ajax(url) {
        if (task.length == 1 || query.length < 3) {
                document.getElementById("ajax").innerHTML="";
                document.getElementById("ajax").style.visibility = 'hidden';
                return;
        } else
                document.getElementById("ajax").style.visibility = 'visible';
        xmlHttp=GetXmlHttpObject()
        if (xmlHttp == null) {
                alert ("Your browser does not support AJAX!");
                return;
        }
        //var url = url+"&query="+query;
        alert(url);
        xmlHttp.onreadystatechange = stateChanged;
        xmlHttp.open("GET", url, true);
        xmlHttp.send(null);
}

function stateChanged() {
        if (xmlHttp.readyState==4) {
                document.getElementById("ajax").innerHTML=xmlHttp.responseText;
        }
}