

								  
								  

var CurrentTimeoutTimer;
var mousex, mousey;

document.onmousemove = getXY;

//*****************************************************************************
// Function    : getXY
// Description :
// Created     : 27-10-2005
// Author      : ATP
//*****************************************************************************
function getXY(e) {
  mousex = event.clientX + document.body.scrollLeft;
  mousey = event.clientY + document.body.scrollTop;
  return true;
}

function ehOnMouseOver()
{
	//ShowImage (cImg)
	if(window.event.srcElement != null && window.event.srcElement.cImg){
		DisplayPopup(window.event.srcElement.cImg)
    window.event.srcElement.alt=''
	}
}

function ehOnMouseOut()
{
	//ShowImage (cImg)
	if(window.event.srcElement != null && window.event.srcElement.cImg){
		ClearPopup()
	}
}

//*****************************************************************************
// Function    : ClearPopup
// Description :
// Created     : 27-10-2005
// Author      : ATP
//*****************************************************************************
function ClearPopup()
{
	window.clearTimeout(CurrentTimeoutTimer);	
	ResizeDiv.className = 'PopImageHidden';
	fDoDisplayPopup = false;
}

//*****************************************************************************
// Function    : DisplayPopup
// Description :
// Created     : 27-10-2005
// Author      : ATP
//*****************************************************************************
function DisplayPopup(PopPageParam)
{
	window.clearTimeout(CurrentTimeoutTimer);	
	if (document.body != null)
	{
		if (PopPageParam != '' && PopPageParam != null) {

      var AreaHeight = 10;
      var AreaWidth  = 100;
      
      
	    if (mousex != null)
	    {
		    if (mousex < (document.body.offsetWidth-150)+50)
			    ResizeDiv.style.left		= mousex+25;
		    else
			    ResizeDiv.style.left		= mousex-(AreaWidth+30);
  				
		    if (mousey < (document.body.offsetHeight/2)+20)
			    ResizeDiv.style.top			= mousey+10;
		    else
			    ResizeDiv.style.top			= mousey-(AreaHeight+10);

			  ResizeDiv.className = 'PopImageLoading';
			  fDoDisplayPopup			= true;
			  ResizeDiv.innerHTML = 'Loading!';
			  CurrentTimeoutTimer	= window.setTimeout('DoDisplayPage(\''+ PopPageParam +'\')', 500);

	    }

		}
	}
}

//*****************************************************************************
// Function    : DoDisplayPage
// Description :
// Created     : 27-10-2005
// Author      : ATP
//*****************************************************************************
function DoDisplayPage(PopPageParam)
{
	window.clearTimeout(CurrentTimeoutTimer);	
  
  if (fDoDisplayPopup)
  {
    ResizeDiv.className = 'PopImageDisplay';
    ResizeDiv.innerHTML = '<img width=150 src=\"' + PopPageParam + '\" />';
  }
}


function DoStatus(ByElem)
{
	if (ByElem.checked)
	{
		var elem = document.getElementById('PaymentNext')
		if (elem != null) {
			elem.disabled = false;
		}
	} else
	{
		var elem = document.getElementById('PaymentNext')
		if (elem != null) {
			elem.disabled = true;
		}
	}
}

//*****************************************************************************
// Function    : DropJump(URL)
// Parameters  : URL with page navigation number.
// Description : On change the dropdown list, URL value is passed along with the position for the current page. 
				//Function returns URL which loads the  same page with the different page content(i.e)Products,
				//Based on the page number selected.
// Created     : 9-Jan-2008
// Author      : Huang He
//*****************************************************************************

function DropJump(URL) {
	
	if (URL.options[URL.selectedIndex].value != "") 
	//var enqType=URL.options[URL.selectedIndex].value;
	//formEnq.submit();//NOT REQUIRED
	self.location.href = URL.options[URL.selectedIndex].value;	
	return true;
}

//*****************************************************************************
// Function    : openWin(URL)
// Parameters  : URL with image information.
// Description : Opens new window with the image.
// Created     : 23-Jan-2008

//*****************************************************************************

function openWin(theURL,winName,features)
{
			//alert(theURL);
			var popLink;
			var PopWinView;
			var popWinName=winName;
			var e=document.getElementById("MainImage")
			if (e!="" && popWinName=="ImageView")
			{
				popLink=e.src;
				//alert(popLink);
				PopWinView=window.open(popLink,winName,features);}
			else
			{
				popLink=theURL;
				PopWinView=window.open(popLink,winName,features);}
		
			
}

function   Cookie(){  
  //Cookie.set(String   sName,String   sValue,[Date   dHours,String   sRegion,String   sPath,String   sDomain,Boolean   bSecure])  
  this.set=function(sName,sValue,dHours,sRegion,sPath,sDomain,bSecure){  
  var   str=new   String();  
  var   nextTime=new   Date();  
  nextTime.setHours(nextTime.getHours()+dHours);//   set expiry hours 
  sValue=escape(sValue);//   Encode value 
  if(sRegion){//   if got subkey  
  var   tValue=this.get(sName,"",true);//   get main key value(include subkeys)  
  var   tStr=tValue.replace(new   RegExp("\\b("+sRegion+"=)[^\\&]+\\b","i"),"$1"+sValue);//   find and replace in value got, replace value of the subkey 
  if(RegExp.$1)//   if replace succeed  
  str=sName+"="+tStr;//   set Main key value  
  else//   if not succeed  
  str=sName+"="+sRegion+"="+sValue+(/=/.exec(tValue)?"&"+tStr:"");//   write the value, if already set, write original value  
  }  
  else//   if no subkey indicated  
  str=sName+"="+sValue;  
  if(dHours)//   If set expire Hours 
  str+=";expires="+nextTime.toGMTString();  
  if(sPath)//   If set path  
  str+=";path="+sPath;  
  if(sDomain)//   set domain 
  str+=";domain="+sDomain;  
 if(bSecure)//   secure cookie?
  str+=";secure";  
  document.cookie=str;  
  }  
  //Cookie.get(String   sName,[String   sRegion,Boolean   bCode])  
  this.get=function(sName,sRegion,bCode){  
  var   rs=new   RegExp("(^|)"+sName+"=([^;]*)(;|$)","g").exec(document.cookie);//   search in main key 
  if(sRegion&&rs){//   if indicated subkey and main key not empty  
  var   rs1=new   RegExp("(^|)"+sRegion+"=([^\&]*)(\&|$)","g").exec(rs[2]);//   search in subkey  
  return   rs1?bCode?rs1[2]:unescape(rs1[2]):"";//   return value in subkey 
  }  
  else{  
  return   rs?bCode?rs[2]:unescape(rs[2]):"";//   return value in main key  
  }  
  }  
  //Cookie.remove(String   sName)  
  this.remove=function(sName){  
  this.set(sName,"",-1);  
  }  
  }  
   
function   SetCookie(sName,sValue,dHours,sRegion,sPath,sDomain,bSecure){
	
	var   _s=new   Cookie();  
    _s.set(sName,sValue,dHours,sRegion,sPath,sDomain,bSecure);  
	window.location=window.location.href;
}


/********************************************************************* 
Function	: setShipCookie(cookieName,CookieValue,expiryDate,form,url)
Parameter	: Name,value and date of expiration for product cookie. 
   			  Name&Value=Product NO,Date=0, form values, url(shipping.asp) for page reload
Description	: Creates drpCountry,drpShipMethod cookie for selected country value 
			  and shipping method respectively.
			  
***********************************************************************/

function setShipCookie(name,days,form,url)
{
	if (name=='drpCountry')
	{
		var countryVal=form.CountryGuid.options[form.CountryGuid.options.selectedIndex].value;
		if (days) 
		{
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+escape(countryVal)+expires+"; path=/";
		var cokie=document.cookie;
	}
	else if (name=='drpShipMethod')
	{
		var ShipMethods=form.ShipMethods.options[form.ShipMethods.options.selectedIndex].value;
		if (days) 
		{
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
			else var expires = "";
			document.cookie = name+"="+ShipMethods+expires+"; path=/";
			var cokie=document.cookie;

	}
	window.location=url;
	
}

/********************************************************************* 
Function	: setQuickCookie(form,url)
Parameter	: Form Fields are passed as parameters and url for page redirection.
Description	: Creates Product Item No cookie for Left quick pad. 
Sets the Cookie Leftquickpad with the values from 5 item No text boxes and Quantities
First checks Special characters in the Item No.If found then sets boolean bitemSplMsg value as TRUE

***********************************************************************/

function setQuickCookie(form,url)
{  
	

	var itemNoarray1=new Array(form.itemNo0.value,form.itemNo1.value,form.itemNo2.value,form.itemNo3.value,form.itemNo4.value);
    var quanArray1=new Array(form.Quantity0.value,form.Quantity1.value,form.Quantity2.value,form.Quantity3.value,form.Quantity4.value);
	var splCharItem=new Array(5);
	var splCharQuan=new Array(5);
	/*Check for existing item no's */
	
Array.prototype.has = function(value1) 
	{
		var i,loopcnt,value1,value2;
		//alert(loopcnt);
		//alert(value1);
		for (var i = 0;i < 5; i++) 
		{
			if(this[i] ==value1) 
			{
			//alert('inside'+i);
			return true;
			}
			
		}
		//alert('outside');
		return false;
	};
	
	var itemNoarray2=new Array(form.itemNo0.value,form.itemNo1.value,form.itemNo2.value,form.itemNo3.value,form.itemNo4.value);
	//alert(itemNoarray2[0]);
	//itemNoarray2[0] = form.itemNo1.value;
	//alert(itemNoarray2.has(form.itemNo1.value)); // Should display true
	//alert(arr.has('test2')); // Should display false



	
try//************** check for spl char.	******************
	{
		for(var i=0;i<itemNoarray1.length; i++)
		{
				var comp=itemNoarray1[i];
				var quantity=quanArray1[i].length;
				var quanSpl=quanArray1[i];
				//Check 1: Number of characters in the item no textbox.Limited to 25 characters
				if(comp.length>=25)
				{
				alert("Number of Characters in  "+itemNoarray1[i]+" exceeds Max limit. Pls Chk the item No.."); 
				var bitemCnt=true;
				}
				//Check 2: Number of digits in quantity textbox. Limited to 4 digits.
				if(quantity>4)
				{
				alert("Quantity for "+itemNoarray1[i]+" exceeds Max limit. Pls Chk the Quantity value.."); 
				var bquanCnt=true;
				}
				//Check 3: For  special characters and alphabets in quantity textbox.
				if(quantity<=4 && quanSpl!=="" )
				{
					var iChars = "!@#$%^&*()+=-[]\\\';,/{}|\":<>?abcdefghijklnmopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
					for (var k=0;k<quanSpl.length;k++)
					{
						if(iChars.indexOf(quanSpl.charAt(k)) !==-1)
						{
						splCharQuan[i]=","+itemNoarray1[i];
						var bquansplMsg=true;
						}
						else splCharQuan[i]=" ";
					}
				}
				else splCharQuan[i]=" ";
			// Check 4: Special characters in item No textbox
				var iChars = "!@#$%^&*+=[]\\\';,{}|\":<>?";
				//Removed (),-,/  characters as, some ProductGuid has these characters. 

				if(comp!=="")
				{
					for (var k=0;k<comp.length;k++)
					{
						if(iChars.indexOf(comp.charAt(k)) !==-1)
						{
						splCharItem[i]=","+comp;
						var bitemSplMsg=true;
						}
						else splCharItem[i]=" ";
					}
				}
				else splCharItem[i]=" ";
			
		}
			//Msg display for special characters in item no and quantity.
			if(bitemSplMsg==true)
			{var splCharItems=splCharItem[0]+splCharItem[1]+splCharItem[2]+splCharItem[3]+splCharItem[4];
			splCharItems=splCharItems.substr(1,splCharItems.length);
			alert("Invalid Characters in following Item(s).\nPlease Check the same.\n Item No(s). "+splCharItems);}
			if(bquansplMsg==true)
			{var splCharQuans=splCharQuan[0]+splCharQuan[1]+splCharQuan[2]+splCharQuan[3]+splCharQuan[4];
			splCharQuans=splCharQuans.substr(1,splCharQuans.length);
			alert("Invalid Characters for Quantity in following Item(s).\nPlease Check the same.\n Item No(s). "+splCharQuans);}
			
	}
	catch(err)
	{alert(" Error in Spl Char Check :"+err.description);	}
//**************End of check for spl char.	******************
try//***********SET Cookie Array ************//
	{if(bitemSplMsg!==true && bitemCnt!==true && bquanCnt!==true && bquansplMsg!==true )
	{
		var itemNoarray=new Array(form.itemNo0.value,form.itemNo1.value,form.itemNo2.value,form.itemNo3.value,form.itemNo4.value);
		var quanArray=new Array(form.Quantity0.value,form.Quantity1.value,form.Quantity2.value,form.Quantity3.value,form.Quantity4.value);
		var cookieArray= new Array();
		var cookieValue="";
		var itemCount=0;
		for(i=0;i<=4;i++)
		{
			if(itemNoarray[i]!=="")
			{itemCount=itemCount+1;	}
			if(itemNoarray[i]!=="" && quanArray[i]=="")// Cond 1: If item No is NOT empty and quantity is empty, Set quantity=1 
			{
				quanArray[i]=1;
				cookieArray[i]=itemNoarray[i]+"="+quanArray[i];
			}
			else if(itemNoarray[i]!=="" && quanArray[i]!=="")//Cond 2: If item No and quantity both are NOT empty.
			{cookieArray[i]=itemNoarray[i]+"="+quanArray[i];}
			else if(itemNoarray[i]=="" && quanArray[i]=="") //Cond 3: If item No and quantity both are empty.
			{cookieArray[i]="";	}
			else if(itemNoarray[i]=="" && quanArray[i]!=="")// Cond 4: If item No is empty and quantity is NOT empty. 
			{cookieArray[i]="";	}
			if(cookieArray[i]!=="")
			{cookieValue=cookieArray[0]+"&"+cookieArray[1]+"&"+cookieArray[2]+"&"+cookieArray[3]+"&"+cookieArray[4];}
		}//***********SET Cookie Array ************//
		
	}
	//***********Check for Leftquickpad existance ************//
	try
	{
		
	  var arg = "Leftquickpad"+"=";
	  var alen = arg.length;
	  var clen = document.cookie.length;
	  var i = 0;
	  while (i < clen) 
	  {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) 
		{
			var endstr = document.cookie.indexOf (";", j);
			if (endstr == -1) 
			{ 
			//alert('insideloop'+i+","+j +","+endstr);
			endstr = document.cookie.length; 
			}
			var exisval= unescape(document.cookie.substring(j, endstr));
			//alert("existing value"+exisval);
			
		}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
		}
	}
	catch(err)
	{ alert("Error in check for cookie existance "+err.description);}
 //***********End of Check for Leftquickpad existance ************//
  
 //********Cookie Creation******************//
 
		var days=0;//Expiry date set to 0. Cookies expire when browser is closed.
		var name="Leftquickpad";
		cookieValue=cookieValue+"&"+exisval;
		if (days) 
		{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+escape(cookieValue)+expires+"; path=/";

	} //********End of Cookie Creation******************//
	catch(err)
	{alert("Error in cookie creation "+err.description);}
	if(bitemSplMsg!==true && bitemCnt!==true && bquanCnt!==true && bquansplMsg!==true )//IF special char message not set then reload the page.
	{window.location=url;}
	
}

/********************************************************************* 
Function	: deleteQuickCookie(name,cookievalue,url)
Parameter	: Name of the cookie, cookievalue and url to reload the page.
Description	: Confirms deletion and replace the cookievalue 
with empty string in the leftquickpad cookie
***********************************************************************/

function deleteQuickCookie(cookieName,cookieRow,url)
{
	var bdelConfirm;
	if (confirm("Are you sure you want to delete the item from quickpad?")==true)
    bdelConfirm=true;
  	else
    bdelConfirm=false;
	try//***** Check for cookie existance. Search and replace the cookie value*******//
	{
	if(bdelConfirm)
	{
	  var toRep=cookieRow;
	 // alert(toRep);
	  //var subitem=cookieRow.substring(0,cookieRow.length-2);
	  var cookieRowLen=cookieRow.length;
	  var arg = cookieName+"=";
	  var alen = arg.length;
	  var clen = document.cookie.length;
	  var i = 0;
	  while (i < clen) 
	  {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) 
		{
			var endstr = document.cookie.indexOf (";", j);
			if (endstr == -1) { endstr = document.cookie.length; }
			var exisval= unescape(document.cookie.substring(j, endstr));
  		 	//alert("value exist" +exisval);
			var exisval=exisval.replace(toRep,"");//Replace the cookie value with empty string.
			//alert("repvalue is:" +exisval);
		}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
		}
		
		//*******Cookie creation with replaced value****************//
		var days=0;
		var name=cookieName;
		//cookieValue=cookieValue+"&"+exisval;
		if (days) 
		{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+escape(exisval)+expires+"; path=/";
		window.location=url;
		//alert(name+"Item Deleted "+cookieRow);
	}
		else(bdelConfirm==false)
		{window.location=url;}

  }
	catch(err)
	{alert("Error in cookie deletion "+err.description);}
	
	
}


/********************************************************************* 
Function	: setProCookieNew(name,value,days,url)
Parameter	: "ProductCookie",product number , expiry date and url for page redirection.
Description	: Creates Product Item No cookie for Left quick pad. 
Sets the Cookie Leftquickpad with the values from 5 item No text boxes and Quantities
First checks Special characters in the Item No.If found then sets boolean bitemSplMsg value as TRUE

***********************************************************************/
function setProCookieNew(name,value,days,url)
{
try
{
	// var arg = "ProductCookie"+"=";
	var arg = "Leftquickpad"+"=";
	  var alen = arg.length;
	  var clen = document.cookie.length;
	  var i = 0;
	  while (i < clen) 
	  {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) 
		{
			var endstr = document.cookie.indexOf (";", j);
			if (endstr == -1) { endstr = document.cookie.length; }
			var exisval= unescape(document.cookie.substring(j, endstr));
  		 	//alert("value exist" +exisval);
			//var exisval=exisval.replace(cookieRow,"");//REPLACE FUNC
			//alert("repvalue is:" +exisval);
			//COOKIE CREATION
		}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
	}
		var days=0;
		var name="Leftquickpad";
		if(exisval!=="")
		{
		value=value+"&"+exisval;}

		if (days) 
		{
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+escape(value)+expires+"; path=/";
		//alert("cookie created"+document.cookie);

	}//END OF TRY
	catch(err)
	{alert("in check for existing value 1"+err.description);}
	//document.location.reload();
	window.location=url;
	
}

/********************************************************************* 
Function	: formSubmit(buttonid,linkurl)
Parameter	: button clicked(Purchase or Enquiry) and url for page submit.
Description	: quickpad page is submitted to _cart.asp if "Purchase" Button clicked
or to enquiry.asp if "Enquiry" button clicked.
***********************************************************************/


function formQuickSubmit(buttonid,linkurl)
{
	var myForm=document.getElementById('formQuickPad');
	var url;
	if(buttonid=="Purchase")
	{url=linkurl;}
	else if(buttonid=="Enquiry")
	{url=linkurl;}
	formQuickPad.setAttribute("action",url);
	formQuickPad.setAttribute("method","post");
	formQuickPad.submit();
}

/********************************************************************* 
Function	: productImageLink(productLink)
Parameter	: product link to display large image of the selected product small image.
Description	: onclick of product small image, page displays the Larger image, 
			by setting the main image source(MainImage.src) link dynamically
***********************************************************************/

function productImageLink(productLink)
{
	var e=document.getElementById("MainImage");
	e.src=productLink;
	//alert("Main Image source:"+e.src);
}

/********************************************************************* 
Function	: emailValidation()
Parameter	: Nil.
Description	: function is called on submit of enquiry page. check  
			for user name and email id not null values. If null then alert 
			messages displayed.
			Validation for Email Id .
			If invalid then alert msg displayed.
			Once all the validation cleared form is submitted.
***********************************************************************/

function emailValidation()
{
	 //var userName=document.formEnq.UserName.value;
	//var EmailID=document.formEnq.EmailID.value;
	var userName=document.getElementById('userName').value;
	var EmailID=document.getElementById('EmailID').value;
	var txtUserEnq=document.getElementById('txtEnq').value.length;
	var blnUserName;
	var blnEmailID;
	var blnValidEmail;
	var blnTxtUserEnq;
	if(userName=="")
	{
		alert("User Name cannot be blank");
		blnUserName=false;
	}
	else if(userName!="")
	  blnUserName=true;
	
	if(EmailID=="")
	{
		alert("Email ID cannot be blank");
		blnEmailID=false;
	}
	else if(EmailID!="")
	{
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
		if(filter.test(EmailID))
		{
		blnValidEmail=true;
		blnEmailID=true;
		}
		else
		{
			alert("Invalid Email Address. Please check the same");
			blnValidEmail=false;
			blnEmailID=true;
		}
	}
//To check empty textarea
	if(txtUserEnq<=0)
	{
		alert("Please enter your enquiry/feedback.");
		blnTxtUserEnq=false;
	}
	else if(txtUserEnq!="")
	blnTxtUserEnq=true;
	if (blnUserName && blnEmailID && blnValidEmail &&blnTxtUserEnq)
	{return true }
	else 
	return false
}
/************************END of Email Check *****************/

					function deleteQuickCookie1(cookieName,cookieRow,URL)
					{
						/*var days=0;
						var name="Leftquickpad";
						var	cookieValue=document.getElementById("leftCookie").value;
						alert("cookieValue==="+cookieValue);
						if (days) 
						{
						var date = new Date();
						date.setTime(date.getTime()+(days*24*60*60*1000));
						var expires = "; expires="+date.toGMTString();
						}
						else var expires = "";
						document.cookie = name+"="+escape(cookieValue)+expires+"; path=/";
						function deleteQuickCookie(cookieName,cookieRow,url)*/

	var bdelConfirm;
	if (confirm("Are you sure you want to delete the item from quickpad?")==true)
    bdelConfirm=true;
  	else
    bdelConfirm=false;
	try//***** Check for cookie existance. Search and replace the cookie value*******//
	{
	if(bdelConfirm)
	{
	 
		
		//*******Cookie creation with replaced value****************//
		var days=0;
		var name=cookieName;
		//cookieValue=cookieValue+"&"+exisval;
		if (days) 
		{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+escape(cookieRow)+expires+"; path=/";
		window.location=URL;
		//alert(name+"Item Deleted "+cookieRow);
	}
		else(bdelConfirm==false)
		{window.location=URL;}

  }
	catch(err)
	{alert("Error in cookie deletion "+err.description);}
	
	
}
//*****************************************************************************
// Function    : SetPopularIndexValue
// Description :
// Created     : 18-Sep-2008
 //*****************************************************************************

function SetPopularIndexValue(textId,textValue)
{
	var value=document.getElementById(textId).value;
	document.getElementById('Hidden-'+textId).value=value;
	document.getElementById('productid-'+textId).value=textId;
	document.getElementById('Update').disabled=false;
}

function message(blnSent)

{
	var blnSent=blnSent;
	//alert('bln'+blnSent);
	if (blnSent=='True')
	{
	document.getElementById('frmReq').style.visibility='hidden';
	document.getElementById('message').style.visibility='visible';
	//alert('bln2'+blnSent);
	}
	else
	{
	document.getElementById('frmReq').style.visibility='visible';
	document.getElementById('message').style.visibility='hidden';
	//alert('bln3'+blnSent);
	}
}

function textMsg(textNow,textAct)
{
	var textNow1,textAct1;
	textNow1=textNow.value;
	textAct1=textAct;
	alert("textNow1"+textNow1);
	alert("textAct1"+textAct1);
	if(textNow1!=textAct1)
	{
	textNow.style.backgroundColor = '#D0F5A9';
	alert("value changed");
	}
	else if (textNow1==textAct1)
	{
		textNow.style.backgroundColor='#FFFFFF';
		alert("value not changed");
	}
 return true;
}

 

	
 