
function MM_openBrWindow(theURL,winName,features) 
{ 
  	window.open(theURL,winName,features);
}
function openBonusGame() {
 	var url = "game_cupid.php";
	newwindow = window.open(url,'CupidBonusGame','height=590, width=674, left=0, top=0, resizable=yes, scrollbars=no, toolbar=no, menubar=no');
}
//Begin - AC_RunActiveContent.js
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';
  document.write(str);
}
function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    
    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
//End - AC_RunActiveContent.js
//Begin - validation.js
	function CheckUsername(username)
	{		
		var xmlHttp;
		if (window.XMLHttpRequest)
		{	
		  xmlHttp=new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{		 
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (xmlHttp == null)
		{		
			alert ("Browser does not support HTTP Request")
			return
		}
		var url = "/checkuser.php?username=" + username 
		xmlHttp.open("GET", url, true)
		xmlHttp.onreadystatechange = function () 
		{
			if (xmlHttp.readyState == 4) 
			{		
				document.getElementById("checkalias").innerHTML = xmlHttp.responseText;			
			}
		};
		xmlHttp.send(null);		
	}
	function CheckEmail(email_address)
	{		
		var xmlHttp;
		if (window.XMLHttpRequest)
		{	
		  xmlHttp=new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{		 
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (xmlHttp == null)
		{		
			alert ("Browser does not support HTTP Request")
			return
		}
		var url = "/checkuser.php?email_address=" + email_address
		xmlHttp.open("GET", url, true)
		xmlHttp.onreadystatechange = function () 
		{
			if (xmlHttp.readyState == 4) 
			{		
				document.getElementById("checkEmail").innerHTML = xmlHttp.responseText;			
			}
		};
		xmlHttp.send(null);		
	}
function CheckPasswd(password)
	{		
		var xmlHttp;
		if (window.XMLHttpRequest)
		{	
		  xmlHttp=new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{		 
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (xmlHttp == null)
		{		
			alert ("Browser does not support HTTP Request")
			return 
		}
		var url = "/checkuser.php?password=" + password 
		xmlHttp.open("GET", url, true) 
		xmlHttp.onreadystatechange = function () 
		{
			if (xmlHttp.readyState == 4) 
			{		
				document.getElementById("checkPasswd").innerHTML = xmlHttp.responseText;			
			}
		};
		xmlHttp.send(null);		
	}
	function CheckPasswdMatch(confirm_password,password)
	{
		var xmlHttp;
		if (window.XMLHttpRequest)
		{	
		  xmlHttp=new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{		 
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (xmlHttp == null)
		{		
			alert ("Browser does not support HTTP Request") 
			return 
		}
		var url = "/checkuser.php?password="+password+"&confirm_password="+confirm_password 
		xmlHttp.open("GET", url, true) 
		xmlHttp.onreadystatechange = function () 
		{
			if (xmlHttp.readyState == 4) 
			{		
				document.getElementById("CheckPasswdMatch").innerHTML = xmlHttp.responseText;			
			}		
		};
		xmlHttp.send(null);		
	}
//*************** Validate Password ***************//
function validatePwd() 
{
	var invalid = " "; 
	var minLength = 6; 
	var ctp = document.myForm.currentpasswd.value;
	var pw1 = document.myForm.newpasswd1.value;
	var pw2 = document.myForm.newpasswd2.value;
	if(ctp == '') 
	{
		alert('Enter your Current Password');
	    window.document.myForm.currentpasswd.focus();
		return false;
	}
	if (pw1 == '' || pw2 == '') 
	{
		alert('Please enter a new password in both the fields.');
		return false;
	}	
	if (document.myForm.newpasswd1.value.length < minLength) 
	{
		alert('Your password must be at least ' + minLength + ' characters long. Please Try again.');
		return false;
	}	
	if (document.myForm.newpasswd1.value.indexOf(invalid) > -1) 
	{
		alert("Spaces are not allowed as Password. Please re-enter again.");
		/*document.getElementById('txt_password').value = "";
		document.getElementById('txt_password').focus();		*/
		return false;
	}
	else 
	{
		if (pw1 != pw2) 
		{
			alert ("You did not enter the same new password in both the fields. Please Try again.");
			return false;
		}
	}
}

//*************** Validate Registration ***************//
function register_val(register) 
{
	var als = window.document.register.alias.value;
	var pwd = window.document.register.passwd.value;
	// Added by P.Jayadevan to fix validation bugs. 
	var confirmPwd = document.getElementById('txt_confirmPassword').value; 
	var emailID = document.getElementById('txt_email').value; 
	var invalid = " "; 
	var minLength = 6; 	
	var maxLength=20;
	if(als == "")
	{
		alert("Please enter an Alias.");
		window.document.register.alias.focus();
		return false;
	}
	else if(als.length <= 4)
	{
			alert('Alias must be more than 4 characters. Please Try again.');
			document.getElementById('txt_alias').focus();			
			return false;
	}
	 else if(als.length > 20){
			 alert('Alias must be less than 20 characters. Please Try again.');
			 document.getElementById('txt_alias').value="";
			 document.getElementById('txt_alias').focus();			
			return false;
	}
	if(pwd == "")
	{
		alert("Please enter your Password.");
		window.document.register.passwd.focus();
		return false;
	}			
	else if (pwd.length < minLength)	
	{
		alert('Your password must be at least ' + minLength + 'characters long. Please try again');		
		document.getElementById('txt_password').focus();		
		return false;
	}
	else if (pwd.length > maxLength ){
	alert('Your password must be less than'+maxLength+'characters . Please Try again.');
	document.getElementById('txt_password').value="";
	document.getElementById('txt_password').focus();	
	}
	else if (document.register.passwd.value.indexOf(invalid) > -1) 
	{
		alert("Spaces are not allowed as Password. Please re-enter again.");
		window.document.register.passwd.select();
		return false;
	}	
	if(confirmPwd ==""){
		alert("Please confirm your Password.");
		document.getElementById('txt_confirmPassword').focus();
		return false;
	}
	if(confirmPwd !="" && pwd!=confirmPwd){ // Added by P.Jayadevan to fix validation bugs.
		alert("Passwords do not match. Please Try again");			
		document.getElementById('txt_confirmPassword').value="";
		document.getElementById('txt_confirmPassword').focus();			
		return false;
	}	
	var emailID = document.getElementById('txt_email').value // Added by P.Jayadevan to fix validation bugs.
	if(emailID==""){
		alert("Please enter your email ID");
		document.getElementById('txt_email').focus();
		return false;		
	}		
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(emailID)){
	testresults=true
	}
	else{
	alert("Please input a valid email address!")
	testresults=false;
	document.getElementById('txt_email').value="";
	document.getElementById('txt_email').focus();
	return false;
}	
}
//*************** Validate Email ***************//
function checkEmail(myForm) 
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value))
	{
		return (true)
	}
	alert("Invalid E-mail Address! Please re-enter.");
	document.getElementById('txt_email').value ="";
	document.getElementById('txt_email').focus();	
	return (false)
}
//*************** Process Logout ***************//
function logout()
{	
	var name=confirm("Are you sure you to want Logout ?")
	if (name==true)
	{
		window.location.href="/logout.php";
	}
	else 
	{
		
	}
}
//*************** Validate Login Form ***************//
function validate(formCheck) 
{
	var invalid = " ";	
	if(formCheck.login.value=="User Name" || formCheck.login.value==""){
		alert("Please enter User Name");
		formCheck.login.value = "";
		formCheck.login.select();
		return false;
	}
	if(formCheck.passwd.value=="Password" || formCheck.passwd.value==""){
		alert("Please enter Your Password");
		formCheck.passwd.value = "";
		formCheck.passwd.select();
		return false;
	}
	/*if (formCheck.login.value.indexOf(invalid) > -1)
	{
		
		alert("Spaces are not allowed in Alias. Please enter again.");
		formCheck.login.select();		
		return false;
	}
	else if(formCheck.passwd.value.indexOf(invalid) > -1) 
	{
		alert("Spaces are not allowed as Password. Please enter again.");
		formCheck.passwd.select();
		return false;
	}*/
}


//*************** Validate Deposits ***************//
function validate_deposit(mainform) 
{
	var amount = window.document.mainform.amount.value;
	if (amount=='') 
	{
		alert('Please enter an amount to Deposit');
		window.document.mainform.amount.select();
		return false;
	}
	else if(amount <=0)
	{
		alert('The amount you have entered is invalid, Please re-enter again.');
		window.document.mainform.amount.select();
		return false;
	}
	else if(amount >1000)
	{
		alert('You cannot deposit more than 1000 per transaction.');
		window.document.mainform.amount.select();
		return false;
	}
}

function validateProfile()
{
	var firstname = window.document.editprofile.firstname.value;
	var lastname = window.document.editprofile.lastname.value;
	var bmon = window.document.editprofile.bmon.value;
	var byear = window.document.editprofile.byear.value;
	var bday = window.document.editprofile.bday.value;
	var address = window.document.editprofile.address.value;
	var city = window.document.editprofile.city.value;
	var country = window.document.editprofile.country.value;
	var zip = window.document.editprofile.zip.value;
	var phone = window.document.editprofile.phone.value;
	
	var myRegxp = /[0-9]/;
	var myRegxpPhone = /[A-Za-z]/;
	if(firstname == "")
	{
		alert(" First Name can't be Blank");
		window.document.editprofile.firstname.focus();
		return false;
	}
	if(lastname == "")
	{
		alert("Last Name can't be Blank");
		window.document.editprofile.lastname.focus();
		return false;
	}
	if(bmon == "" || byear =="" || bday == "")
	{
		alert("Please Enter Date of Birth");
		window.document.editprofile.bmon.focus();
		return false;
	}
	if(address == "")
	{
		alert("Address can't be Blank");
		window.document.editprofile.address.focus();
		return false;
	}
	if(city == "")
	{
		alert("City can't be Blank");
		window.document.editprofile.city.focus();
		return false;
	}
	if(country == "")
	{
		alert("Country can't be Blank");
		window.document.editprofile.country.focus();
		return false;
	}
	if(zip == "")
	{
		alert("Zip/Postal Code can't be Blank");
		window.document.editprofile.firstname.focus();
		return false;
	}
	if(phone == "")
	{
		alert("Phone can't be Blank");
		window.document.editprofile.phone.focus();
		return false;
	}
	

	
	if(myRegxp.test(document.editprofile.firstname.value))
	{
		alert("First name cannot contain a numerical 0-9 value.");
		return false;
	}
	if(myRegxp.test(document.editprofile.lastname.value))
	{
		alert("Last name cannot contain a numerical 0-9 value.");
		return false;
	}
	if(myRegxpPhone.test(document.editprofile.phone.value))
	{
		alert("Telephone number must be a numerical 0-9 value.");
		return false;
	}
}
//*************** Return to Status Page from POS ***************//
function openBlankWindow(trackid, paymenttype)
{
	window.open('','POS', 'width=700, height=600, left=200, top=40, scrollbars=yes, toolbar=no, status=yes, resizable=no');
	parent.location.href=paymenttype+'/status.php?trackid='+trackid;
	return true;
}
//*************** Display Bingo Timer ***************//
function init()
{
	setTimeout('refreshTimer()', 1000);
}
function refreshTimer()
{
	var streams = document.getElementById("streams");
	var timers = document.getElementById("streams").value ;
	var i=1 ;
	for ( i=1 ; i < timers ;i++)
	{
		time = document.getElementById("time"+i);
		seconds = time.value ;
		seconds = seconds - 1 ; 
		time.value=seconds ;
		message = document.getElementById("message"+i);
		if ( seconds < 1 ) 
			message.innerHTML="Started" ;
		else
		{
			min = (seconds - seconds % 60) / 60 ; 
			sec = seconds%60 ;
			if ( sec < 10 ) 
				str = min+":0"+sec ;
			else
				str = min+":"+sec ; 
			message.innerHTML = str ;
		}

	}
	setTimeout('refreshTimer()', 1000); 
}
//*************** Open POPUP Window ***************//
function MM_openBrWindow(theURL,winName,features) 
{ 
	newwindow = window.open(theURL,winName,features);
	if(window.focus){
		newwindow.focus();	
	}
}
//*************** Getting Started ***************//
function newImage(arg) {	
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
//*********************** Validate LPS ***********************//
function minimum_deposit() {
	var amount = document.cashier.amount.value;
	if (amount < 10) {
		alert("Minimum deposit amount is \u00A310");
		window.document.cashier.amount.focus();
		return false;
	}
	if (isNaN(amount)) {
		alert("Minimum deposit amount is \u00A310");
		window.document.cashier.amount.focus();
		return false;
	}	
}
function changeImages() 
{	
	if (document.images && (preloadFlag == true)) 
	{
		for (var i=0; i<changeImages.arguments.length; i+=2) 
		{
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
//*************** Username Password Text box hints for login .php***************//
var HintClass = "hintTextbox";
var HintActiveClass = "hintTextboxActive";
// define a custom method on the string class to trim leading and training spaces
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); };
function initHintTextboxes() {
  var inputs = document.getElementsByTagName('input');
  for (i=0; i<inputs.length; i++) {
    var input = inputs[i];  
    if (input.className.indexOf(HintClass)!=-1) {
      input.hintText = input.value;
      input.className = HintClass;
      input.onfocus = onHintTextboxFocus;
      input.onblur = onHintTextboxBlur;
    }
  }
}
function onHintTextboxFocus() {
  var input = this;
  if (input.value.trim()==input.hintText) {
    input.value = "";
    input.className = HintActiveClass;
  }
}
function onHintTextboxBlur() {
  var input = this;
  if (input.value.trim().length==0) {
    input.value = input.hintText;
    input.className = HintClass;
  }
}
window.onload = initHintTextboxes;
//End - validation.js
//Begin - ClickShowHideMenu.js
function ClickShowHideMenu(id, clicked_menu) {
	show_menu = id+"-"+(clicked_menu-1);
	this.box1Hover = true;
    this.box2Hover = true;
    this.highlightActive = false;
    this.menu_id = 1;
    this.init = function () {
        if (!document.getElementById(this.id)) {
          alert("Unable to load Java Script. Please check your browser settings and refresh the page.");
          return;
        }
        this.parse(document.getElementById(this.id).childNodes, this.tree, this.id, this.menu_id);
        this.load();
        if (window.attachEvent) {
            window.attachEvent("onunload", function (e) {
                self.save();
            }
            );
        }
        else if (window.addEventListener) {
            window.addEventListener("unload", function (e) {
                self.save();
            }
            , false);
        }
    }
    this.parse = function (nodes, tree, id) {
        for (var i = 0; i < nodes.length; i++) {
            if (nodes[i].nodeType != 1) {
                continue;
            }
            if (nodes[i].className) {
                if ("box1" == nodes[i].className.substr(0, 4)) {
                    nodes[i].id = id + "-" + tree.length;
                    tree[tree.length] =  new Array();
                    eval('nodes[i].onmouseover = function() { self.box1over("' + nodes[i].id + '"); }');
                    eval('nodes[i].onmouseout = function() { self.box1out("' + nodes[i].id + '"); }');
                    eval('nodes[i].onclick = function() { self.box1click("' + nodes[i].id + '"); }');
                }
                if ("section" == nodes[i].className) {
                    id = id + "-" + (tree.length - 1);
                    nodes[i].id = id + "-section";
                    tree = tree[tree.length - 1];
                }
                if ("box2" == nodes[i].className.substr(0, 4)) {
                    nodes[i].id = id + "-" + tree.length;
                    tree[tree.length] =  new Array();
                    eval('nodes[i].onmouseover = function() { self.box2over("' + nodes[i].id + '", "' + nodes[i].className + '"); }');
                    eval('nodes[i].onmouseout = function() { self.box2out("' + nodes[i].id + '", "' + nodes[i].className + '"); }');
                }
            }
            if (this.highlightActive && nodes[i].tagName && nodes[i].tagName == "A") {
                if (document.location.href == nodes[i].href) {
                    nodes[i].className = (nodes[i].className ? ' active' : 'active');
                }
            }
            if (nodes[i].childNodes) {
                this.parse(nodes[i].childNodes, tree, id);
            }
        }
    }
    this.box1over = function (id) {
        if (!this.box1Hover)return;
        if (!document.getElementById(id))return;
        document.getElementById(id).className = (this.id_openbox == id ? "box1-open-hover" : "box1-hover");
    }
    this.box1out = function (id) {
        if (!this.box1Hover)return;
        if (!document.getElementById(id))return;
        document.getElementById(id).className = (this.id_openbox == id ? "box1-open" : "box1");
    }
    this.box1click = function (id) {
        if (!document.getElementById(id)) {
            return;
        }
        var id_openbox = this.id_openbox;
        if (this.id_openbox) {
            if (!document.getElementById(id + "-section")) {
                return;
            }
            this.hide();
            if (id_openbox == id) {
                if (this.box1hover) {
                    document.getElementById(id_openbox).className = "box1-hover";
                }
                else {
                    document.getElementById(id_openbox).className = "box1";
                }
            }
            else {
                document.getElementById(id_openbox).className = "box1";
            }
        }
        if (id_openbox != id) {
            this.show(id);
            var className = document.getElementById(id).className;
            if ("box1-hover" == className) {
                document.getElementById(id).className = "box1-open-hover";
            }
            if ("box1" == className) {
                document.getElementById(id).className = "box1-open";
            }
        }
    }
    this.box2over = function (id, className) {
        if (!this.box2Hover)return;
        if (!document.getElementById(id))return;
        document.getElementById(id).className = className + "-hover";
    }
    this.box2out = function (id, className) {
        if (!this.box2Hover)return;
        if (!document.getElementById(id))return;
        document.getElementById(id).className = className;
    }
    this.show = function (show_menu) {
        if (document.getElementById(show_menu + "-section")) {
			document.getElementById(show_menu + "-section").style.display = "block";
            this.id_openbox = show_menu;
        }
    }
    this.hide = function () {
        document.getElementById(this.id_openbox + "-section").style.display = "none";
        this.id_openbox = "";
    }
    this.save = function () {
        if (this.id_openbox) {
            this.cookie.set(this.id, this.id_openbox);
        }
        else {            
        }
    }
    this.load = function () {
        var id_openbox = show_menu;
		if (id_openbox) {
            this.show(id_openbox);
            document.getElementById(id_openbox).className = "box1-open";
        }
    }
    function Cookie() {
        this.get = function (name) {
            var cookies = document.cookie.split(";");
            for (var i = 0; i < cookies.length; i++) {
                var a = cookies[i].split("=");
                if (a.length == 2) {
                    a[0] = a[0].trim();
                    a[1] = a[1].trim();
                    if (a[0] == name) {
                        return unescape(a[1]);
                    }
                }
            }
            return "";
        }
        this.set = function (name, value) {
            document.cookie = name + "=" + escape(value);
        }
        this.del = function (name) {
            document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT";
        }
    }
    var self = this;
    this.id = id;
    this.tree =  new Array();
    this.cookie =  new Cookie();
    this.id_openbox = "";
}
if (typeof String.prototype.trim == "undefined") {
    String.prototype.trim = function () {
        var s = this.replace(/^\s*/, "");
        return s.replace(/\s*$/, "");
    }
}
//End - ClickShowHideMenu.js
//Begin - popupbox.js
var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all
var dragswitch=0
var nsx
var nsy
var nstemp
function drag_dropns(name){
if (!ns4)
return
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}
function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}
function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}
function drag_drop(e){
if (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
return false
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx+"px"
crossobj.style.top=tempy+e.clientY-offsety+"px"
return false
}
}
function initializedrag(e){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "html" : document.compatMode && document.compatMode!="BackCompat"? "documentElement" : "body"
while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!="dragbar"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}
if (firedobj.id=="dragbar"){
offsetx=ie4? event.clientX : e.clientX
offsety=ie4? event.clientY : e.clientY
tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)
dragapproved=true
document.onmousemove=drag_drop
}
}
document.onmouseup=new Function("dragapproved=false")


function hidebox(){
document.getElementById('showimage').style.display='none';
}
//End - popupbox.js
//Begin - rounded-corners.js
function DHTMLgoodies_roundedCorners()
{
	var roundedCornerTargets;	
	this.roundedCornerTargets = new Array();	
}
	var string = '';

DHTMLgoodies_roundedCorners.prototype = {
    addTarget : function(divId,xRadius,yRadius,color,backgroundColor,padding,heightOfContent,whichCorners)
    {	
    	var index = this.roundedCornerTargets.length;
    	this.roundedCornerTargets[index] = new Array();
    	this.roundedCornerTargets[index]['divId'] = divId;
    	this.roundedCornerTargets[index]['xRadius'] = xRadius;
    	this.roundedCornerTargets[index]['yRadius'] = yRadius;
    	this.roundedCornerTargets[index]['color'] = color;
    	this.roundedCornerTargets[index]['backgroundColor'] = backgroundColor;
    	this.roundedCornerTargets[index]['padding'] = padding;
    	this.roundedCornerTargets[index]['heightOfContent'] = heightOfContent;
    	this.roundedCornerTargets[index]['whichCorners'] = whichCorners;      	
    }
    ,	
	init : function()
	{		
		for(var targetCounter=0;targetCounter < this.roundedCornerTargets.length;targetCounter++){			
			whichCorners = this.roundedCornerTargets[targetCounter]['whichCorners'];
			divId = this.roundedCornerTargets[targetCounter]['divId'];
			xRadius = this.roundedCornerTargets[targetCounter]['xRadius'];
			yRadius = this.roundedCornerTargets[targetCounter]['yRadius'];
			color = this.roundedCornerTargets[targetCounter]['color'];
			backgroundColor = this.roundedCornerTargets[targetCounter]['backgroundColor'];
			padding = this.roundedCornerTargets[targetCounter]['padding'];
			heightOfContent = this.roundedCornerTargets[targetCounter]['heightOfContent'];
			whichCorners = this.roundedCornerTargets[targetCounter]['whichCorners'];
			var cornerArray = new Array();
			if(!whichCorners || whichCorners=='all'){
				cornerArray['top_left'] = true;
				cornerArray['top_right'] = true;
				cornerArray['bottom_left'] = true;
				cornerArray['bottom_right'] = true;
			}else{
				cornerArray = whichCorners.split(/,/gi);
				for(var prop in cornerArray)cornerArray[cornerArray[prop]] = true;
			}				
			var factorX = xRadius/ yRadius;	
			var obj = document.getElementById(divId);	
			obj.style.backgroundColor=null;	
			obj.style.backgroundColor='transparent';
			var content = obj.innerHTML;	
			obj.innerHTML = '';							
			if(cornerArray['top_left'] || cornerArray['top_right']){
				var topBar_container = document.createElement('DIV');
				topBar_container.style.height = yRadius + 'px';
				topBar_container.style.overflow = 'hidden';			
				obj.appendChild(topBar_container);		
				var currentAntialiasSize = 0;
				var savedRestValue = 0;				
				for(no=1;no<=yRadius;no++){
					var marginSize = (xRadius - (this.getY((yRadius - no),yRadius,factorX)));					
					var marginSize_decimals = (xRadius - (this.getY_withDecimals((yRadius - no),yRadius,factorX)));					
					var restValue = xRadius - marginSize_decimals;		
					var antialiasSize = xRadius - marginSize - Math.floor(savedRestValue)
					var foregroundSize = xRadius - (marginSize + antialiasSize);						
					var el = document.createElement('DIV');
					el.style.overflow='hidden';
					el.style.height = '1px';					
					if(cornerArray['top_left'])el.style.marginLeft = marginSize + 'px';				
					if(cornerArray['top_right'])el.style.marginRight = marginSize + 'px';	
					topBar_container.appendChild(el);				
					var y = topBar_container;					
					for(var no2=1;no2<=antialiasSize;no2++){
						switch(no2){
							case 1:
								if (no2 == antialiasSize)
									blendMode = ((restValue + savedRestValue) /2) - foregroundSize;
								else {
								  var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2),xRadius,1/factorX);
								  blendMode = (restValue - foregroundSize - antialiasSize + 1) * (tmpValue - (yRadius - no)) /2;
								}						
								break;							
							case antialiasSize:								
								var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2 + 1),xRadius,1/factorX);								
								blendMode = 1 - (1 - (tmpValue - (yRadius - no))) * (1 - (savedRestValue - foregroundSize)) /2;							
								break;
							default:			
								var tmpValue2 = this.getY_withDecimals((xRadius - marginSize - no2),xRadius,1/factorX);
								var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2 + 1),xRadius,1/factorX);		
								blendMode = ((tmpValue + tmpValue2) / 2) - (yRadius - no);							
						}						
						el.style.backgroundColor = this.__blendColors(backgroundColor,color,blendMode);
						y.appendChild(el);
						y = el;
						var el = document.createElement('DIV');
						el.style.height = '1px';	
						el.style.overflow='hidden';
						if(cornerArray['top_left'])el.style.marginLeft = '1px';
						if(cornerArray['top_right'])el.style.marginRight = '1px';    						
						el.style.backgroundColor=color;					
					}					
					y.appendChild(el);				
					savedRestValue = restValue;
				}
			}						
			var contentDiv = document.createElement('DIV');
			contentDiv.className = obj.className;
			contentDiv.style.border='1px solid ' + color;
			contentDiv.innerHTML = content;
			contentDiv.style.backgroundColor=color;
			contentDiv.style.paddingLeft = padding + 'px';
			contentDiv.style.paddingRight = padding + 'px';	
			if(!heightOfContent)heightOfContent = '';
			heightOfContent = heightOfContent + '';
			if(heightOfContent.length>0 && heightOfContent.indexOf('%')==-1)heightOfContent = heightOfContent + 'px';
			if(heightOfContent.length>0)contentDiv.style.height = heightOfContent;			
			obj.appendChild(contentDiv);		
			if(cornerArray['bottom_left'] || cornerArray['bottom_right']){
				var bottomBar_container = document.createElement('DIV');
				bottomBar_container.style.height = yRadius + 'px';
				bottomBar_container.style.overflow = 'hidden';			
				obj.appendChild(bottomBar_container);		
				var currentAntialiasSize = 0;
				var savedRestValue = 0;				
				var errorOccured = false;
				var arrayOfDivs = new Array();
				for(no=1;no<=yRadius;no++){					
					var marginSize = (xRadius - (this.getY((yRadius - no),yRadius,factorX)));					
					var marginSize_decimals = (xRadius - (this.getY_withDecimals((yRadius - no),yRadius,factorX)));						
	
					var restValue = (xRadius - marginSize_decimals);				
					var antialiasSize = xRadius - marginSize - Math.floor(savedRestValue)
					var foregroundSize = xRadius - (marginSize + antialiasSize);						
					var el = document.createElement('DIV');
					el.style.overflow='hidden';
					el.style.height = '1px';					
					if(cornerArray['bottom_left'])el.style.marginLeft = marginSize + 'px';				
					if(cornerArray['bottom_right'])el.style.marginRight = marginSize + 'px';	
					bottomBar_container.insertBefore(el,bottomBar_container.firstChild);									
					var y = bottomBar_container;							
					for(var no2=1;no2<=antialiasSize;no2++){
						switch(no2){
							case 1:
								if (no2 == antialiasSize)
									blendMode = ((restValue + savedRestValue) /2) - foregroundSize;
								else {
								  var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2),xRadius,1/factorX);
								  blendMode = (restValue - foregroundSize - antialiasSize + 1) * (tmpValue - (yRadius - no)) /2;
								}						
								break;							
							case antialiasSize:								
								var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2 + 1),xRadius,1/factorX);								
								blendMode = 1 - (1 - (tmpValue - (yRadius - no))) * (1 - (savedRestValue - foregroundSize)) /2;							
								break;
							default:			
								var tmpValue2 = this.getY_withDecimals((xRadius - marginSize - no2),xRadius,1/factorX);
								var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2 + 1),xRadius,1/factorX);		
								blendMode = ((tmpValue + tmpValue2) / 2) - (yRadius - no);							
						}
						
						el.style.backgroundColor = this.__blendColors(backgroundColor,color,blendMode);
						
						if(y==bottomBar_container)arrayOfDivs[arrayOfDivs.length] = el;
						
						try{	
							var firstChild = y.getElementsByTagName('DIV')[0];
							y.insertBefore(el,y.firstChild);
						}catch(e){
							y.appendChild(el);							
							errorOccured = true;
						}
						y = el;
						
						var el = document.createElement('DIV');
						el.style.height = '1px';	
						el.style.overflow='hidden';
						if(cornerArray['bottom_left'])el.style.marginLeft = '1px';
						if(cornerArray['bottom_right'])el.style.marginRight = '1px';   
										
					}
					
					if(errorOccured){
						for(var divCounter=arrayOfDivs.length-1;divCounter>=0;divCounter--){
							bottomBar_container.appendChild(arrayOfDivs[divCounter]);
						}
					}
					
					el.style.backgroundColor=color;	
					y.appendChild(el);				
					savedRestValue = restValue;
				}
	
			}			
		}
	}		
	,		
	getY : function(x,maxX,factorX){		
		return Math.max(0,Math.ceil(factorX * Math.sqrt( (maxX * maxX) - (x*x)) ));		
	}	
	,				
	getY_withDecimals : function(x,maxX,factorX){		
		return Math.max(0,factorX * Math.sqrt( (maxX * maxX) - (x*x)) );		
	}
	,			
	__blendColors : function (colorA, colorB, blendMode) {
		if(colorA.length=='4'){
			colorA = '#' + colorA.substring(1,1) + colorA.substring(1,1) + colorA.substring(2,1) + colorA.substring(2,1) + colorA.substring(3,1) + colorA.substring(3,1);
		}	
		if(colorB.length=='4'){
			colorB = '#' + colorB.substring(1,1) + colorB.substring(1,1) + colorB.substring(2,1) + colorB.substring(2,1) + colorB.substring(3,1) + colorB.substring(3,1);
		}
		var colorArrayA = [parseInt('0x' + colorA.substring(1,3)), parseInt('0x' + colorA.substring(3, 5)), parseInt('0x' + colorA.substring(5, 7))];	
		var colorArrayB = [parseInt('0x' + colorB.substring(1,3)), parseInt('0x' + colorB.substring(3, 5)), parseInt('0x' + colorB.substring(5, 7))];	
		var red = Math.round(colorArrayA[0] + (colorArrayB[0] - colorArrayA[0])*blendMode).toString(16);	
		var green = Math.round(colorArrayA[1] + (colorArrayB[1] - colorArrayA[1])*blendMode).toString(16);	
		var blue = Math.round(colorArrayA[2] + (colorArrayB[2] - colorArrayA[2])*blendMode).toString(16);			
		if(red.length==1)red = '0' + red;
		if(green.length==1)green = '0' + green;
		if(blue.length==1)blue = '0' + blue;			
		return '#' + red + green+ blue;
	}
}
//End - rounded-corners.js
//Begin - ajaxtabs.js
var bustcachevar=1 
var loadstatustext="<img src='/images/loading.gif' /> Requesting content..."
var enabletabpersistence=1 
var loadedobjects=""
var defaultcontentarray=new Object()
var bustcacheparameter=""
function ajaxpage(url, containerid, targetobj){
var page_request = false
if (window.XMLHttpRequest) 
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ 
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
var ullist=targetobj.parentNode.parentNode.getElementsByTagName("li")
for (var i=0; i<ullist.length; i++)
ullist[i].className=""  
targetobj.parentNode.className="selected" 
if (url.indexOf("#default")!=-1){ 
document.getElementById(containerid).innerHTML=defaultcontentarray[containerid]
return
}
document.getElementById(containerid).innerHTML=loadstatustext
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) 
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
function loadobjs(revattribute){
if (revattribute!=null && revattribute!=""){ 
var objectlist=revattribute.split(/\s*,\s*/) 
for (var i=0; i<objectlist.length; i++){
var file=objectlist[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ 
if (file.indexOf(".js")!=-1){ 
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ 
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " 
}
}
}
}
function expandtab(tabcontentid, tabnumber){ 
var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
if (thetab.getAttribute("rel")){
ajaxpage(thetab.getAttribute("href"), thetab.getAttribute("rel"), thetab)
loadobjs(thetab.getAttribute("rev"))
}
}
function savedefaultcontent(contentid){
if (typeof defaultcontentarray[contentid]=="undefined") 
defaultcontentarray[contentid]=document.getElementById(contentid).innerHTML
}
function startajaxtabs(){
for (var i=0; i<arguments.length; i++){
var ulobj=document.getElementById(arguments[i])
var ulist=ulobj.getElementsByTagName("li")
var persisttabindex=(enabletabpersistence==1)? parseInt(getCookie(arguments[i])) : "" 
var isvalidpersist=(persisttabindex<ulist.length)? true : false 
for (var x=0; x<ulist.length; x++){ 
var ulistlink=ulist[x].getElementsByTagName("a")[0]
ulistlink.index=x
if (ulistlink.getAttribute("rel")){
var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
ulistlink.setAttribute("href", modifiedurl)
savedefaultcontent(ulistlink.getAttribute("rel"))
ulistlink.onclick=function(){
ajaxpage(this.getAttribute("href"), this.getAttribute("rel"), this)
loadobjs(this.getAttribute("rev"))
saveselectedtabindex(this.parentNode.parentNode.id, this.index)
return false
}
if ((enabletabpersistence==1 && persisttabindex<ulist.length && x==persisttabindex) || (enabletabpersistence==0 && ulist[x].className=="selected")){
ajaxpage(ulistlink.getAttribute("href"), ulistlink.getAttribute("rel"), ulistlink) 
loadobjs(ulistlink.getAttribute("rev")) 
}
}
}
}
}
function saveselectedtabindex(ulid, index){ 
if (enabletabpersistence==1)
setCookie(ulid, index)
}
function getCookie(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); 
if (document.cookie.match(re)) 
return ""
}
function setCookie(name, value){
document.cookie = name+"="+value 
}
//End - ajaxtabs.js

//Begin - form-field-tooltip_new.js
var DHTMLgoodies_globalTooltipObj;
function DHTMLgoodies_formTooltip()
{
	var tooltipDiv;
	var tooltipText;
	var tooltipContentDiv;				
	var imagePath;						
	var arrowImageFile;					
	var arrowImageFileRight;			
	var arrowRightWidth;
	var arrowTopHeight;
	var tooltipWidth;					
	var roundedCornerObj;				
	var tooltipBgColor;
	var closeMessage;					
	var activeInput;					
	var tooltipPosition;				
	var tooltipCornerSize;				
	var displayArrow;					
	var cookieName;						
	var disableTooltipPossibility;		
	var disableTooltipByCookie;			
	var disableTooltipMessage;
	var tooltipDisabled;
	var isMSIE;
	var tooltipIframeObj;
	var pageBgColor;					
	var currentTooltipObj;				
	
	this.currentTooltipObj = false,
	this.tooltipDiv = false,
	this.tooltipText = false;
	this.imagePath = '../images/';
	this.arrowImageFile = '../images/green-arrow.gif';
	this.arrowImageFileRight = '../images/green-arrow-right.gif';
	this.tooltipWidth = 200;
	this.tooltipBgColor = '#CCA9FF';
	this.closeMessage = 'Close';
	this.disableTooltipMessage = 'Don\'t show this message again';
	this.activeInput = false;
	this.tooltipPosition = 'right';
	this.arrowRightWidth = 16;			
	this.arrowTopHeight = 13;			
	this.tooltipCornerSize = 10;
	this.displayArrow = true;
	this.cookieName = 'DHTMLgoodies_tooltipVisibility';
	this.disableTooltipByCookie = false;
	this.tooltipDisabled = false;
	this.disableTooltipPossibility = true;
	this.tooltipIframeObj = false;
	this.pageBgColor = '#FFFFFF';
	
	DHTMLgoodies_globalTooltipObj = this;
	
	if(navigator.userAgent.indexOf('MSIE')>=0)this.isMSIE = true; else this.isMSIE = false;
}


DHTMLgoodies_formTooltip.prototype = {
	initFormFieldTooltip : function()
	{
		var formElements = new Array();
		var inputs = document.getElementsByTagName('INPUT');
		for(var no=0;no<inputs.length;no++){
			var attr = inputs[no].getAttribute('tooltipText');
			if(!attr)attr = inputs[no].tooltipText;
			if(attr)formElements[formElements.length] = inputs[no];
		}			
		var inputs = document.getElementsByTagName('TEXTAREA');
		for(var no=0;no<inputs.length;no++){
			var attr = inputs[no].getAttribute('tooltipText');
			if(!attr)attr = inputs[no].tooltipText;
			if(attr)formElements[formElements.length] = inputs[no];
		}
		var inputs = document.getElementsByTagName('SELECT');
		for(var no=0;no<inputs.length;no++){
			var attr = inputs[no].getAttribute('tooltipText');
			if(!attr)attr = inputs[no].tooltipText;
			if(attr)formElements[formElements.length] = inputs[no];
		}			
		window.refToFormTooltip = this;		
		for(var no=0;no<formElements.length;no++){
			formElements[no].onfocus = this.__displayTooltip;
		}
		this.addEvent(window,'resize',function(){ window.refToFormTooltip.__positionCurrentToolTipObj(); });		
		this.addEvent(document.documentElement,'click',function(e){ window.refToFormTooltip.__autoHideTooltip(e); });
	}		
	,			
	setTooltipPosition : function(newPosition)
	{
		this.tooltipPosition = newPosition;
	}
	,			
	setCloseMessage : function(closeMessage)
	{
		this.closeMessage = closeMessage;
	}
	,		
	setDisableTooltipMessage : function(disableTooltipMessage)
	{
		this.disableTooltipMessage = disableTooltipMessage;
	}
	,			
	setTooltipDisablePossibility : function(disableTooltipPossibility)
	{
		this.disableTooltipPossibility = disableTooltipPossibility;
	}
	,		
	setCookieName : function(newCookieName)
	{
		this.cookieName = newCookieName;
	}
	,		
	
	setTooltipWidth : function(newWidth)
	{
		this.tooltipWidth = newWidth;
	}	
	,		
	setArrowVisibility : function(displayArrow)
	{
		this.displayArrow = displayArrow;
	}	
	,			
	setDisableTooltipByCookie : function(disableTooltipByCookie)
	{
		this.disableTooltipByCookie = disableTooltipByCookie;
	}	
	,			
	setTooltipBgColor : function(newBgColor)
	{
		this.tooltipBgColor = newBgColor;
	}
	,		
	setTooltipCornerSize : function(tooltipCornerSize)
	{
		this.tooltipCornerSize = tooltipCornerSize;
	}	
	,		
	setTopArrowHeight : function(arrowTopHeight)
	{
		this.arrowTopHeight = arrowTopHeight;
	}	
	,	
	setRightArrowWidth : function(arrowRightWidth)
	{
		this.arrowRightWidth = arrowRightWidth;
	}	
	,	
	setPageBgColor : function(pageBgColor)
	{
		this.pageBgColor = pageBgColor;
	}		
	,			
	__displayTooltip : function()
	{
		if(DHTMLgoodies_globalTooltipObj.disableTooltipByCookie){
			var cookieValue = DHTMLgoodies_globalTooltipObj.getCookie(DHTMLgoodies_globalTooltipObj.cookieName) + '';	
			if(cookieValue=='1')DHTMLgoodies_globalTooltipObj.tooltipDisabled = true;
		}			
		if(DHTMLgoodies_globalTooltipObj.tooltipDisabled)return;	
		var tooltipText = this.getAttribute('tooltipText');
		DHTMLgoodies_globalTooltipObj.activeInput = this;		
		if(!tooltipText)tooltipText = this.tooltipText;
		DHTMLgoodies_globalTooltipObj.tooltipText = tooltipText;		
		if(!DHTMLgoodies_globalTooltipObj.tooltipDiv)DHTMLgoodies_globalTooltipObj.__createTooltip();		
		DHTMLgoodies_globalTooltipObj.__positionTooltip(this);	
		DHTMLgoodies_globalTooltipObj.tooltipContentDiv.innerHTML = tooltipText;
		DHTMLgoodies_globalTooltipObj.tooltipDiv.style.display='block';		
		if(DHTMLgoodies_globalTooltipObj.isMSIE){
			if(DHTMLgoodies_globalTooltipObj.tooltipPosition == 'below'){
				DHTMLgoodies_globalTooltipObj.tooltipIframeObj.style.height = (DHTMLgoodies_globalTooltipObj.tooltipDiv.clientHeight - DHTMLgoodies_globalTooltipObj.arrowTopHeight);
			}else{
				DHTMLgoodies_globalTooltipObj.tooltipIframeObj.style.height = (DHTMLgoodies_globalTooltipObj.tooltipDiv.clientHeight);
			}
		}		
	}
	,					
	__hideTooltip : function()
	{
		try{
			DHTMLgoodies_globalTooltipObj.tooltipDiv.style.display='none';
		}catch(e){
		}
		
	}
	,
    getSrcElement : function(e)
    {
    	var el;
		if (e.target) el = e.target;
			else if (e.srcElement) el = e.srcElement;
			if (el.nodeType == 3) 
				el = el.parentNode;
		return el;	
    }	
	,
	__autoHideTooltip : function(e)
	{
		if(document.all)e = event;	
		var src = this.getSrcElement(e);
		if(src.tagName.toLowerCase()!='input' && src.tagName.toLowerCase().toLowerCase()!='textarea' && src.tagName.toLowerCase().toLowerCase()!='select')this.__hideTooltip();

		var attr = src.getAttribute('tooltipText');
		if(!attr)attr = src.tooltipText;
		if(!attr){
			this.__hideTooltip();
		}		
	}
	,				
	__hideTooltipFromLink : function()
	{
		
		this.activeInput.focus();
		window.refToThis = this;
		setTimeout('window.refToThis.__hideTooltip()',10);
	}
	,		
	disableTooltip : function()
	{
		this.__hideTooltipFromLink();
		if(this.disableTooltipByCookie)this.setCookie(this.cookieName,'1',500);	
		this.tooltipDisabled = true;	
	}		
	,			
	__createTooltip : function()
	{
		this.tooltipDiv = document.createElement('DIV');
		this.tooltipDiv.style.position = 'absolute';		
		if(this.displayArrow){
			var topDiv = document.createElement('DIV');			
			if(this.tooltipPosition=='below'){				
				topDiv.style.marginLeft = '20px';
				var arrowDiv = document.createElement('IMG');
				arrowDiv.src = this.imagePath + this.arrowImageFile + '?rand='+ Math.random();
				arrowDiv.style.display='block';
				topDiv.appendChild(arrowDiv);					
			}else{
				topDiv.style.marginTop = '5px';
				var arrowDiv = document.createElement('IMG');
				arrowDiv.src = this.imagePath + this.arrowImageFileRight + '?rand='+ Math.random();	
				arrowDiv.style.display='block';
				topDiv.appendChild(arrowDiv);					
				topDiv.style.position = 'absolute';			
			}			
			this.tooltipDiv.appendChild(topDiv);	
		}		
		var outerDiv = document.createElement('DIV');
		outerDiv.style.position = 'relative';
		outerDiv.style.zIndex = 1000;
		if(this.tooltipPosition!='below' && this.displayArrow){			
			outerDiv.style.left = this.arrowRightWidth + 'px';
		}				
		outerDiv.id = 'DHTMLgoodies_formTooltipDiv';
		outerDiv.className = 'DHTMLgoodies_formTooltipDiv';
		outerDiv.style.backgroundColor = this.tooltipBgColor;
		this.tooltipDiv.appendChild(outerDiv);
		if(this.isMSIE){
			this.tooltipIframeObj = document.createElement('<IFRAME name="tooltipIframeObj" width="' + this.tooltipWidth + '" frameborder="no" src="about:blank"></IFRAME>');
			this.tooltipIframeObj.style.position = 'absolute';
			this.tooltipIframeObj.style.top = '0px';
			this.tooltipIframeObj.style.left = '0px';
			this.tooltipIframeObj.style.width = (this.tooltipWidth) + 'px';
			this.tooltipIframeObj.style.zIndex = 100;
			this.tooltipIframeObj.background = this.pageBgColor;
			this.tooltipIframeObj.style.backgroundColor= this.pageBgColor;
			this.tooltipDiv.appendChild(this.tooltipIframeObj);	
			if(this.tooltipPosition!='below' && this.displayArrow){
				this.tooltipIframeObj.style.left = (this.arrowRightWidth) +  'px';	
			}else{
				this.tooltipIframeObj.style.top = this.arrowTopHeight + 'px';	
			}
			setTimeout("self.frames['tooltipIframeObj'].document.documentElement.style.backgroundColor='" + this.pageBgColor + "'",500);
		}		
		this.tooltipContentDiv = document.createElement('DIV');	
		this.tooltipContentDiv.style.position = 'relative';	
		this.tooltipContentDiv.id = 'DHTMLgoodies_formTooltipContent';
		outerDiv.appendChild(this.tooltipContentDiv);					
		var closeDiv = document.createElement('DIV');
		closeDiv.style.textAlign = 'center';	
		closeDiv.innerHTML = '<A class="DHTMLgoodies_formTooltip_closeMessage" href="#" onclick="DHTMLgoodies_globalTooltipObj.__hideTooltipFromLink();return false">' + this.closeMessage + '</A>';
		if(this.disableTooltipPossibility){
			var tmpHTML = closeDiv.innerHTML;
			tmpHTML = tmpHTML + ' | <A class="DHTMLgoodies_formTooltip_closeMessage" href="#" onclick="DHTMLgoodies_globalTooltipObj.disableTooltip();return false">' + this.disableTooltipMessage + '</A>';
			closeDiv.innerHTML = tmpHTML;
		} 		
		outerDiv.appendChild(closeDiv);		
		document.body.appendChild(this.tooltipDiv);				
		if(this.tooltipCornerSize>0){
			this.roundedCornerObj = new DHTMLgoodies_roundedCorners();
			this.roundedCornerObj.addTarget('DHTMLgoodies_formTooltipDiv',this.tooltipCornerSize,this.tooltipCornerSize,this.tooltipBgColor,this.pageBgColor,5);
			this.roundedCornerObj.init();
		}
		this.tooltipContentDiv = document.getElementById('DHTMLgoodies_formTooltipContent');
	}
	,
	addEvent : function(whichObject,eventType,functionName)
	{ 
	  if(whichObject.attachEvent){ 
	    whichObject['e'+eventType+functionName] = functionName; 
	    whichObject[eventType+functionName] = function(){whichObject['e'+eventType+functionName]( window.event );} 
	    whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName] ); 
	  } else 
	    whichObject.addEventListener(eventType,functionName,false); 	    
	} 	
	,
	__positionCurrentToolTipObj : function()
	{
		if(DHTMLgoodies_globalTooltipObj.activeInput)this.__positionTooltip(DHTMLgoodies_globalTooltipObj.activeInput);
		
	}
	,		
	__positionTooltip : function(inputObj)
	{	
		var offset = 0;
		if(!this.displayArrow)offset = 3;	
		if(this.tooltipPosition=='below'){
			this.tooltipDiv.style.left = this.getLeftPos(inputObj)+  'px';
			this.tooltipDiv.style.top = (this.getTopPos(inputObj) + inputObj.offsetHeight + offset) + 'px';
		}else{		
			this.tooltipDiv.style.left = (this.getLeftPos(inputObj) + inputObj.offsetWidth + offset)+  'px';
			this.tooltipDiv.style.top = this.getTopPos(inputObj) + 'px';			
		}
		this.tooltipDiv.style.width=this.tooltipWidth + 'px';		
	}
	,
	getTopPos : function(inputObj)
	{		
	  var returnValue = inputObj.offsetTop;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!='HTML'){
	  		returnValue += inputObj.offsetTop;
	  		if(document.all)returnValue+=inputObj.clientTop;
	  	}
	  } 
	  return returnValue;
	}	
	,	
	getLeftPos : function(inputObj)
	{	  
	  var returnValue = inputObj.offsetLeft;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!='HTML'){
	  		returnValue += inputObj.offsetLeft;
	  		if(document.all)returnValue+=inputObj.clientLeft;
	  	}
	  }
	  return returnValue;
	}	
	,			
	getCookie : function(name) { 
	   var start = document.cookie.indexOf(name+"="); 
	   var len = start+name.length+1; 
	   if ((!start) && (name != document.cookie.substring(0,name.length))) return null; 
	   if (start == -1) return null; 
	   var end = document.cookie.indexOf(";",len); 
	   if (end == -1) end = document.cookie.length; 
	   return unescape(document.cookie.substring(len,end)); 
	} 	
	,	
	setCookie : function(name,value,expires,path,domain,secure) { 
		expires = expires * 60*60*24*1000;
		var today = new Date();
		var expires_date = new Date( today.getTime() + (expires) );
	    var cookieString = name + "=" +escape(value) + 
	       ( (expires) ? ";expires=" + expires_date.toGMTString() : "") + 
	       ( (path) ? ";path=" + path : "") + 
	       ( (domain) ? ";domain=" + domain : "") + 
	       ( (secure) ? ";secure" : ""); 
	    document.cookie = cookieString; 
	}		
}
//End - form-field-tooltip_new.js
/*Begin - Function to clear form fields on home page*/
function clearFormfields(fieldID){
if(document.getElementById(fieldID).value=='User Name' || document.getElementById(fieldID).value =='Password')
document.getElementById(fieldID).value = "";
return false;
}
/*End - Function to clear form fields on home page*/