/*
--------------------------------------------------------------------------------
Main JavaScript validation 
---------------------------------------------------------------------------------
   Version        Date        Name      Desc
      1.0         17/05/2006  AEK       First version to include ExtractCrap
      1.1	  28/05/2006  AEK	Add MouseOver and MouseOut functions
---------------------------------------------------------------------------------
*/

var ColB = '#ffffff';
var ColA = '#aaaaaa';
         
function ExtractCrap(textValue)  {
 //var invalidChars = '\/*?-"<>|';  
 var validChars = 'ABCDEF';  
 var newTextValue = '';        
 var blnOK = true;
 var thisChar = '';
 
 alert('button is also clicked in here too ' + textValue);
 for(var i = 0; i < textValue.length; i++) {
    alert('in for loop');
    thisChar = textValue.charAt(i);
    alert('character found ' + thisChar);
    if (validChars.indexOf(thisChar) != -1) {
       //newTextValue = newTextValue + thisChar;
       //alert('Special characters such as \% are not allowed');
       blnOK = false;
       break;
    }   
 }
return blnOK;
 // return newTextValue;
 }         
 
 
 function MouseOver(id)  {
//alert('button is also clicked in here too ' + ColA);
 var el = document.getElementById(id);
//alert('ID = ' + el.style.backgroundColor);
 el.style.backgroundColor = ColA;
//this.style.backgroundColor = ColA

}      
 
 function MouseOut(id)  {
var el = document.getElementById(id);
el.style.backgroundColor = ColB;

}      

function showtooltip(varToolTip)  {
return varToolTip;

}      

function HideToolTip()  {
return "Tooltip hidden";
}  

 function SayHello()  {
//var el = document.getElementById(id);
//alert('ID = ' + el.style.backgroundColor);
alert('HelloZ' );
}     

 function SayBello(id)  {
var el = document.getElementById(id);
alert('ID = ' + el.name );

}         

function ConditionalConfirm(varMessage,varDisplayOrNot)  {
var OK = true;	

if (varDisplayOrNot=='True') {
	OK = confirm(varMessage);
} 
else {
	OK = false;
}

}


function confirmSubmit(varMessage)  {
var OK = true;	
//var el = document.getElementById(varID);
if (confirm(varMessage)) {
	//alert("msgx yes = ");
	OK = true;
	__doPostBack('btnSubmit','Christmas');
	//the previous line is dangerous in .Net 1.1 because it requires EnableEventValidation="false"
} 
else {
	OK = true;
	__doPostBack('btnSubmit','EasterBunny');

}
return OK;
}