function startAJAX(div,url,imgload){
	var div;
	var url;
	var imgload;
	if(window.ActiveXObject){
		xmlHttpInfo = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest) {
		xmlHttpInfo = new XMLHttpRequest();
	}
	
	xmlHttpInfo.onreadystatechange =  function(){
		if(xmlHttpInfo.readyState == 4){
			if(xmlHttpInfo.status == 200){
				document.getElementById(div).innerHTML = xmlHttpInfo.responseText;
			}
		} else {
				if(imgload){
					load = "<img src='loading/loading"+imgload+".gif'>";
				}else{
					load = "<br><br><br><center><img src='loading/loading1.gif'><br><span class='text-title'>loading data...</span></center>";
				} 
				document.getElementById(div).innerHTML = load ; 
		}
	};
	xmlHttpInfo.open("GET","./"+url, true);
	xmlHttpInfo.send(null);
}

function isDigit(c)    {
    var test = "" + c;
    if (test == "0" || test == "1" || test == "2" || test == "3" || test == "4" || test == "5" || test == "6" || test == "7" || test == "8" || test == "9"){
		return true;
        } else {
	    return false;
	}
}

function isAllDigits(s)    {
	 var test = "" + s;
    for (var k = 0; k < test.length; k++)        {
		var c = test.substring(k, k+1);
        if (isDigit(c) == false)            {
			return false;
            }
        }
    return true;
    }

function BlockNum(txt){
	var tname = document.getElementById(txt);
	if(tname.value=="0"){tname.value="";}
	if(isAllDigits(tname.value)==false){tname.value="";}
}
 
function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Metropolitan Jewellery Manufacturing Ltd.");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right; 