var reqXMLHTTP = null;

var tblTotal = null

var tblShow = null;

var spanImg = null;

var spanTxt = null;

var msg = "";

String.prototype.trim = function()
{
    var pos=arguments[0];
    
    if(pos==1)
    {
        return this.replace(/(^\s*)/g, "");	//delete left 
    }        
    else if(pos==2)
    {
        return this.replace(/(\s*$)/g, ""); //delete right       
    }
    else
    {
        return this.replace(/(^\s*)|(\s*$)/g, ""); //both
    }
}

String.prototype.isEmail = function()
{
	return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(this);
}

String.prototype.isUKZip = function()
{
	return /^[a-zA-Z]{1}[0-9]{2}\s{1}[0-9]{1}[a-zA-Z]{2}$/.test(this);
}

function getXMLHTTPRequest() 
{ 
	var xRequest=null;
	 
	if (window.XMLHttpRequest) 
	{ 
		xRequest=new XMLHttpRequest(); 
	} 
	else if (typeof ActiveXObject != "undefined") 
	{ 
		xRequest=new ActiveXObject("Microsoft.XMLHTTP"); 
	} 
	return xRequest; 
}


