/**
 * @author Administrator
 */

function changecolor(x) {
 	x.style.color='#000000';
}

var pretext;
function emptyvalue(x,y)
{
	if (x.value == y) {
		x.value = "";
		x.style.color = '#012233';
	}
}
 
function fillvalue(x,y) {
	if (x.value=="") {
		x.style.color = '#9a9696';
		x.value=y;
	 }
}

function clickIE4(){
	if (event.button==2){
		alert(message);
		return false;
	}
}

function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			alert(message);
			return false;
		}
	}
}

if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("return false")

/*
var xmlHttp;
function doCallback(url,query,divId) {
	xmlHttp= GetXMLHttpObject();
	if (xmlHttp == null) {
		alert('Browser doesn\'t support XML Object');
		return;
	}
	url=url+'?'+query+'&sid='+ new Date.getTime();
	xmlHttp.onreadystatechange= processReqChange(divId);
	xmlHttp.open('POST',url,true);
	
	xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xmlHttp.send(data);
	
}

function processReqChange(divId) {
	//if busy display loading image
	if (xmlHttp.readyState < 4) {
		document.getElementById(divId).innerHTML='Saving...';
	}
	//only if req shows = loaded
	if(xmlHttp.readyState==4 || xmlHttp.readyState=='complete') {
		//only if 'OK'
		if(xmlHttp.status == 200) {
			document.getElementById(divId).innerHTML=xmlHttp.responseText;
		} else {
			alert('There was a problem retrieving XML data:\n' +
			      xmlHttp.responseText);
		}
	}
}
*/


function loadScript(file)
{
	// Create script DOM element
	var script = document.createElement('script');
	script.type = 'text/javascript';
	script.src = file;

	// Alert when the script is loaded
	if (typeof(script.onreadystatechange) == 'undefined') // W3C
		script.onload = function(){ 
							this.onload = null; 
							alert('Script loaded'); 
						};
	else // IE
		script.onreadystatechange = function(){ 
										if (this.readyState != 'loaded' && this.readyState != 'complete') 
											return; 
										this.onreadystatechange = null; 
										alert('Script loaded'); 
									}; // Unset onreadystatechange, leaks mem in IE

	// Add script DOM element to document tree
	document.getElementsByTagName('head')[0].appendChild(script);
};


