window.oncopy="return false;" 
window.oncut="return false;" 
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}


function LTrim( value ) {
	
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
	
}

// Removes ending whitespaces
function RTrim( value ) {
	
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");
	
}

// Removes leading and ending whitespaces
function trim( value ) {
	
	return LTrim(RTrim(value));
	
}

function Prompt_Login() {

    myWindow = window.open("/JS/Prompt_Login.aspx", "", "toolbar=no,width=200,height=200");
    myWindow.moveTo(100, 200);
    myWindow.document.close();

}

function Prompt_User() {

    myWindow = window.open("/JS/Prompt_User.aspx", "", "toolbar=no,width=200,height=200");
    myWindow.moveTo(100, 200);
    myWindow.document.close();

}

function Prompt() 
{
    Prompt_Login();
}

function GetTimeZone()
{
    if (getCookie("timezone") == "") {
        var now = new Date();
        var offset = now.getTimezoneOffset() / 60;
        setCookie("timezone", offset, null);
    }
}

function getCookie(c_name)
{
    if (document.cookie.length>0)
    {
          c_start=document.cookie.indexOf(c_name + "=")
          if (c_start!=-1)
          { 
                c_start=c_start + c_name.length+1 ;
                c_end=document.cookie.indexOf(";",c_start);
                if (c_end==-1) c_end=document.cookie.length;
                return unescape(document.cookie.substring(c_start,c_end));
          } 
    }
    return "";
}

function setCookie(c_name,value,expiredays) {
    var exdate=new Date();
    exdate.setDate(exdate.getDate()+expiredays);
    document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}

function isUrl(s) {
   
	var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
	return regexp.test(s);
}

function isEmpty(str){
  return (str == null) || (str.length == 0);
}

function isEmail(str){
  if(isEmpty(str)) return false;
  var re = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i
  return re.test(str);
}
// returns true if the string only contains characters A-Z or a-z
function isAlpha(str){
  var re = /[^a-zA-Z]/g
  if (re.test(str)) return false;
  return true;
}
// returns true if the string only contains characters 0-9
function isNumeric(str){
  var re = /[\D]/g
  if (re.test(str)) return false;
  return true;
}
// returns true if the string only contains characters A-Z, a-z or 0-9
function isAlphaNumeric(str){
  var re = /[^a-zA-Z0-9]/g
  if (re.test(str)) return false;
  return true;
}
// returns true if the string's length equals "len"
function isLength(str, len){
  return str.length == len;
}