function ShowHideIndexNav(tab)
{ 
if (tab=="simple")
{
document.getElementById('simpletab').style.display="";
document.getElementById('advancetab').style.display="none";
document.getElementById('simpletext').style.fontWeight="bold";
document.getElementById('advancetext').style.fontWeight="normal";
}
else if (tab=="advance")
{
document.getElementById('simpletab').style.display="none";
document.getElementById('advancetab').style.display="";
document.getElementById('simpletext').style.fontWeight="normal";
document.getElementById('advancetext').style.fontWeight="bold";
}

}

// START tab box timing show function //
var y
var timerID = 0;

function showTab(x)
{
document.getElementById('Div1').style.display="none";
document.getElementById('Div2').style.display="none";
document.getElementById('Div3').style.display="none";
document.getElementById('Div4').style.display="none";
document.getElementById('Div5').style.display="none";
document.getElementById('Div'+x).style.display="";

if (x==5)
	{ y=1 ;}
else
	{ y=x+1; }

clearTimeout(timerID);
timerID=0;
timerID = setTimeout("showTab(y)", 5000);

}

// END tab box timing show function //

function MOver(N)
{ document.getElementById(N).style.textDecoration='underline'; 
  document.getElementById(N).style.color='#993333';
}

function MOut(N)
{ document.getElementById(N).style.textDecoration='';
  document.getElementById(N).style.color='#3E3939';
 }



//Mini cart Module

var xmlHttpobj

function showminicart(opt)
{ 

xmlHttpobj=GetXmlHttpObject1();


if (xmlHttpobj==null)

  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  
var urll;  
 if (opt=='Y') 
  {	urll="shop/minishopcart.aspx";}
 else if(opt=='N')
  { urll="../shop/minishopcart.aspx"; }	

urll=urll+"?cart="+get_cookie('shopcart');
urll=urll+"&DScart="+get_cookie('Dcart');
urll=urll+"&indx="+opt ;

xmlHttpobj.onreadystatechange=stateChangedfun;
xmlHttpobj.open("GET",urll,true);
xmlHttpobj.send(null);

}

function stateChangedfun() 
{ 
if (xmlHttpobj.readyState==4)
	{ 
	document.getElementById("mini").innerHTML=xmlHttpobj.responseText;
	}
}


function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' );

  if ( results )
    return ( unescape ( results[1] ) );
  else
    return null;
}


function GetXmlHttpObject1()
{
var xmlHttpobj=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttpobj=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttpobj=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttpobj=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttpobj;

}

//Ajax for mini cart end//



function make_blank(keyword)
{
if (keyword=="hide")
	{
	if (document.search.q.value=="Enter Keyword or Item Code")
		{
			document.search.q.value="";
		}
	}
else if (keyword=="show")
	{
	if (document.search.q.value=="")
		{
			document.search.q.value="Enter Keyword or Item Code";
		}
	}
}

/*
function make_blankemail(keyword)
{
if (keyword=="hide")
	{
	if (document.newsletter.Email.value=="Enter the Email Id")
		{
			document.newsletter.Email.value="";
		}
	}
else if (keyword=="show")
	{
	if (document.newsletter.Email.value=="")
		{
			document.newsletter.Email.value="Enter the Email Id";
		}
	}
}

*/


function make_blanknmail(dis,q)
{

	if (dis=="hide")
	{
	if ( document.getElementById(q).value=="Enter your Email id" )
	{
	document.getElementById(q).value="";	
	}
	}
	else if (dis=="show")
	{
	 if (document.getElementById(q).value=="")
	{
	document.getElementById(q).value="Enter your Email id";	
	}}

	
}




function submitLetterindexaspx_n(opt){  

    if(document.newsletter.Email.value=="")
   		{alert("Please Enter Email ID");
   		document.newsletter.Email.focus();}
    else if (checkmail(document.newsletter.Email.value)){
       val=document.newsletter.Email.value 
         if (opt=='Y') 
         {	
        centerWindowX('submit.aspx?Email='+val+'&mode=letter');
         }
         else if(opt=='N')
         {  
        centerWindowX('store/submit.aspx?Email='+val+'&mode=letter');
         }

            document.newsletter.Email.value=''}}
            
            



function MouseOverLink(divid)
{
document.getElementById(divid).style.color="#993333";
document.getElementById(divid).style.textDecoration='underline';
}

function MouseOutLink(divid)
{
document.getElementById(divid).style.color="";
document.getElementById(divid).style.textDecoration='';
}

function MM_openBrWindow(theURL,winName,features) { 
     window.open(theURL,winName,features);}

function submitLetterindex(){  
    if(document.newsletter.EMail.value=="")
   		{alert("Please Enter Email ID");
   		document.newsletter.EMail.focus();}
    else if (checkmail(document.newsletter.EMail.value)){
       val=document.newsletter.EMail.value 
       centerWindowX('../store/submit.asp?Email='+val+'&mode=letter');
       document.newsletter.EMail.value=''}}
       
       
function checkmail(str){
   		var at="@"        
		var dot="."
		var temp;
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		var invalidchar=" \"([{}])!#$%^&*';:,/\\?|+`~<>=~"
		if (str.indexOf(at)==-1){
			alert("Please Enter a valid Email ID.")
		   	return false }
		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr-1){
		   alert("Please Enter a valid Email ID.")
		   return false	}
		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr-1){
		    alert("Please Enter a valid Email ID.")
		    return false }
		if (str.indexOf(at,(lat+1))!=-1){
		    alert("Please Enter a valid Email ID.")
		    return false }
		if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Please Enter a valid Email ID.")
		    return false }
		if (str.indexOf(dot,(lat+2))==-1){
		    alert("Please Enter a valid Email ID.")
		    return false }		
		for (i=0; i<(invalidchar.length-1); i++){
		      temp=invalidchar.substring(i,i+1);		      
		      if (str.indexOf(temp)!=-1){
		         alert("Please Enter a valid Email ID.")
		         return false} 
	 	}		 		
return true; }  

function centerWindowX(fname) {
    if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax=480;
    var xOffset = (xMax - 490)/2, yOffset = (yMax - 190)/2;	
    MM_openBrWindow(fname,'info','width=400,height=150,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
}



//Currency List



// javascript for header drop down

function CurrencySelection(loc)
{

        if (loc=="EUR")
        {
        document.getElementById('EUR').style.backgroundColor='#cccccc';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';
        
        }
        else if (loc=="GBP")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#cccccc';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';
        }
        else if (loc=="CAD")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#cccccc';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';
        }
        else if (loc=="AUD")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#cccccc';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';

        }
        else if (loc=="INR")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#cccccc';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';

        }
        else if (loc=="USD")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#cccccc';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';
        }
        else if (loc=="MYR")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#cccccc';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';
        }
        else if (loc=="NZD")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#cccccc';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';
        }
        else if (loc=="AED")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#cccccc';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';
        }
        else if (loc=="PKR")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#cccccc';
        document.getElementById('ZAR').style.backgroundColor='#ffffff';
        }
        else if (loc=="ZAR")
        {
        document.getElementById('EUR').style.backgroundColor='#ffffff';
        document.getElementById('GBP').style.backgroundColor='#ffffff';
        document.getElementById('CAD').style.backgroundColor='#ffffff';
        document.getElementById('AUD').style.backgroundColor='#ffffff';
        document.getElementById('INR').style.backgroundColor='#ffffff';
        document.getElementById('USD').style.backgroundColor='#ffffff';
        document.getElementById('MYR').style.backgroundColor='#ffffff';
        document.getElementById('NZD').style.backgroundColor='#ffffff';
        document.getElementById('AED').style.backgroundColor='#ffffff';
        document.getElementById('PKR').style.backgroundColor='#ffffff';
        document.getElementById('ZAR').style.backgroundColor='#cccccc';
        }
        
        

}

var CurrDropDown = 0;
function SetSecCurrlistDropDown(loc) {


	
	CurrDropDown = GetSetSecCurr();

	var checktt = 0;

checktt = new Date().getTime();

	if (CurrDropDown == null) {
		alert("Your browser does not support AJAX!");
		return;
	}

	var url = 0;
	if (loc == "HOME") {
		url = "store/CurrencyDropDown.aspx";
	}
	else if (loc == "CATEGORY") {
		url = "../store/CurrencyDropDown.aspx";
	}
	else if (loc == "GLOBAL") {
		url = "../../store/CurrencyDropDown.aspx";
	}
	else {
		url = "CurrencyDropDown.aspx";
	}
	url = url + "?loc=" + loc;
	url = url + "&chkt=" + checktt;

	CurrDropDown.onreadystatechange = stateChangedSetDropCur;

	CurrDropDown.open("GET", url, true);
	CurrDropDown.send(null);

}

function stateChangedSetDropCur() {
	if (CurrDropDown.readyState == 4) {
		document.getElementById('currencydropdown').innerHTML = CurrDropDown.responseText;
	}
}



var SetSecCurr;

function SetSecCurrlist(curname) {

	SetSecCurr = GetSetSecCurr();

	var checkt = 0;

	checkt = new Date().getTime();


	if (SetSecCurr == null) {
		alert("Your browser does not support AJAX!");
		return;
	}
	var url = "../../include/setothercurrency.aspx";
	url = url + "?currency=" + curname;
	url = url + "&loc=header";
	url = url + "&icode=nocode";
	url = url + "&chkt=" + checkt;

	SetSecCurr.onreadystatechange = stateChangedSetSecCurr;

	SetSecCurr.open("GET", url, true);
	SetSecCurr.send(null);

}

function stateChangedSetSecCurr() {
	if (SetSecCurr.readyState == 4) {
		document.getElementById('Shortcurrencylist').style.display = 'none';
		document.getElementById('currencyChangemsg').style.display = '';
		document.getElementById('currencyChangemsg').innerHTML = SetSecCurr.responseText;
		setTimeout("location.reload(true);", 3000);
	}
}


function GetSetSecCurr() {
	var SetSecCurr = null;
	try {
		// Firefox, Opera 8.0+, Safari
		SetSecCurr = new XMLHttpRequest();
	}
	catch (e) {
		// Internet Explorer
		try {
			SetSecCurr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			SetSecCurr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return SetSecCurr;
}


//Currency List

function ShowCurrencylisting(mouse) {
	if (mouse == "OVER") {
		document.getElementById('currencyChangemsg').style.display = 'none'
		document.getElementById('Shortcurrencylist').style.display = ''
	}
	else {
		document.getElementById('Shortcurrencylist').style.display = 'none'
	}

}

//Currency List end

// javascript for currency dropdown end
function submitLetterindexaspx(){  

    if(document.newsletter.Email.value=="")
   		{alert("Please Enter Email ID");
   		document.newsletter.Email.focus();}
    else if (checkmail(document.newsletter.Email.value)){
       val=document.newsletter.Email.value 
       centerWindowX('../store/submit.aspx?Email='+val+'&mode=letter');
       document.newsletter.Email.value=''}}
       
function verifysearchkeyword()
{

var keyword="";
keyword = document.search.q.value;

        if (keyword=="" || keyword=="Enter Keyword or Item Code")
        {

        alert("Please enter keyword for search!");

        }
        else
        {
      
                window.location.href='store/search.aspx?q='+keyword;
                            
        }

}

function changebuttoncolor(e, mouse) // change button color
{

var color="";
if (mouse == "OVER")
{
color="#C13100";
}
else
{
color="#CC6600";
}
var el=window.event? event.srcElement: e.target
if (el.tagName=="INPUT"&&el.type=="submit" || el.tagName=="INPUT"&&el.type=="button" )
el.style.backgroundColor=color
}




//--




////////////////////////////////////

// Setting "onlyOnImages" to "true" will disable right-clicking only for
// images
var onlyOnImages = false;

// Detect the browser
var isIE5 = document.all && document.getElementById;  // IE 5 or higher
var isMoz = !isIE5 && document.getElementById;  // Mozilla/Firefox

function cancelContextMenu(e) {
	// Here you can add additional code that is executed when the context menu
	// is blocked. For instance, you can use the following code to display a
	// message to the user:
	// alert("Right-click disabled!");

	return false;
}

/* This function is fired every time a user clicks the right mouse button to
open the browser's context menu. */
function onContextMenu(e) {
	// Depending on the "onlyOnImages" variable the context menu is either
	// blocked for the complete page or only for <img> tags.
	if (onlyOnImages = false
     || (isIE5 && event.srcElement.tagName == "IMG")
     || (isMoz && e.target.tagName == "IMG")) {
		return cancelContextMenu(e);
	}
}

if (document.getElementById) {
	// Register event handler
	document.oncontextmenu = onContextMenu;
	document.onkeyup = disallowspecialchars;
}



function disallowspecialchars(e) {

	var el = window.event ? event.srcElement : el.target

	if ((isIE5 && el.tagName == "INPUT" && el.type == "text" || el.tagName == "TEXTAREA") || (isMoz && el.tagName == "INPUT" && el.type == "text" || el.tagName == "TEXTAREA")) {
		
	}


}



////////////////////////////////////////////

function showmain_menu(id)
{ 
document.getElementById('MAINMENU'+id).style.display=""; 
document.getElementById('col'+id).style.background="background-image: url('images/red.gif') repeat";
}

function hidemain_menu(id)
{ 
document.getElementById('MAINMENU'+id).style.display="none";
document.getElementById('col' + id).style.background = "background-image: url('images/top-bg.gif') no-repeat";
}


function verifysearchkeywords(pageloc)
{

var keyword="";
keyword = document.search.q.value;

        if (keyword=="" || keyword=="Enter Keyword or Item Code")
        {

        alert("Please enter keyword for search!");

        }
        else
        {
            if(pageloc=='search') {   window.location.href='../store/search.aspx?q='+keyword ;}
            else if(pageloc=='adsearch') {   window.location.href='../store/advancedsearch.aspx?cx=006683068870264856926:db-jn-vpts4&cof=FORID:11&q='+keyword ;}
            else if(pageloc=='tag') {   window.location.href='../store/tagging.aspx?q='+keyword ;}
        }

}



function restedivsize() { // function to reset the div size

	var pageHeight;

	pageHeight = document.documentElement.scrollHeight;

	document.getElementById("mainouterdiv").style.height = pageHeight + 'px';

}





function cstimedivshow()
{
document.getElementById('cstimediv').style.display=""; 
}

function cstimedivhide()
{
document.getElementById('cstimediv').style.display='none'; 
}



var cstime;

function showcstimediv() {

	cstime = checkajax();
	
	if (cstime == null) {
		alert("Your browser does not support AJAX!");
		return;
	}
	var url;

	url = "store/cstime.aspx" ;

	cstime.onreadystatechange = fetchCStimediv;
	cstime.open("GET", url, true);
	cstime.send(null);
}

function fetchCStimediv() {
	if (cstime.readyState == 4) {
	    document.getElementById('cstimediv').style.display=""; 
		document.getElementById("cstimediv").innerHTML = cstime.responseText;
	}

	else {
		  document.getElementById('cstimediv').style.display=""; 
		 document.getElementById('cstimediv').innerHTML = "<table cellpadding=0 cellspacing=0 width=200 border=0 style='background:#ffffff;padding-left:5px' class='darkgreyborder'><tr><td width=200 class='carttext'><img src='images/loadingstatus.gif' / alt=''><b> Loading. Please wait.....</b></td></tr></table>"
	}
}



function checkajax() {
	var check = null;
	try {
		// Firefox, Opera 8.0+, Safari
		check = new XMLHttpRequest();
	}
	catch (e) {
		// Internet Explorer
		try {
			check = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			check = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return check;

}
 /// live chat code
 var lpMTagConfig ;

function chat()
 {
 var lpButtonCTTUrl ;
 lpButtonCTTUrl = 'http://server.iad.liveperson.net/hc/39756636/?cmd=file&amp;file=visitorWantsToChat&amp;site=39756636&amp;imageUrl=http://www.utsavsarees.com/images/chat&amp;referrer='+escape(document.location); lpButtonCTTUrl = (typeof(lpAppendVisitorCookies) != 'undefined' ? lpAppendVisitorCookies(lpButtonCTTUrl) : lpButtonCTTUrl); lpButtonCTTUrl = ((typeof(lpMTag)!='undefined' && typeof(lpMTag.addFirstPartyCookies)!='undefined')?lpMTag.addFirstPartyCookies(lpButtonCTTUrl):lpButtonCTTUrl);window.open(lpButtonCTTUrl,'chat39756636','width=475,height=400,resizable=yes');return false;
 }
 
 function chatfunc()
 {
 
  lpMTagConfig = {'lpServer' : "server.iad.liveperson.net",'lpNumber' : "39756636",'lpProtocol' : "http"}; 
 
 }
function lpAddMonitorTag(src){if(typeof(src)=='undefined'||typeof(src)=='object'){src=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:'/hcp/html/mTag.js';}if(src.indexOf('http')!=0){src=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+src+'?site='+lpMTagConfig.lpNumber;}else{if(src.indexOf('site=')<0){if(src.indexOf('?')<0)src=src+'?';else src=src+'&';src=src+'site='+lpMTagConfig.lpNumber;}};var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('charset','iso-8859-1');s.setAttribute('src',src);document.getElementsByTagName('head').item(0).appendChild(s);} if (window.attachEvent) window.attachEvent('onload',lpAddMonitorTag); else window.addEventListener("load",lpAddMonitorTag,false);
 /// end of live chat code
 function DisAllowApostrophe(e,id)
{     
    var val1=DisAllowSpaceAsFirstChar(e,id);
    if(val1==false)return false;
    
    var browserchk = window.event ? e.keyCode : e.which;
	if(browserchk ==39)return false;  //apostrophe(39)
}

function DisAllowSpaceAsFirstChar(e,id)
{
    var browserchk = window.event ? e.keyCode : e.which;
    var chkfirstchar = document.getElementById(id).value;
    
    if(chkfirstchar.length < 1)
    {
        if(browserchk ==32)
        return false; //space(32)
        
    }
}
 
function DisAllowSplCharacters(e,id)
{     
    var val1=DisAllowApostrophe(e,id);
    var val2=DisAllowSpaceAsFirstChar(e,id);
    if(val1==false)return false;
    if(val2==false)return false;
    
    var browserchk = window.event ? e.keyCode : e.which;
	if(browserchk ==39)return false;  // apostrophe(39)
	if(browserchk >=65 && browserchk <=90)
    {
         return true;
    }
    if(browserchk >=97 && browserchk <=122)
    {
         return true;
    }
    if(browserchk == 46 || browserchk == 44 || browserchk == 47)
    {
    return true;
    }
	
	if(browserchk >=48 && browserchk <=57)
    {
         return true;
    }
    if(browserchk >=33 && browserchk <=255)
    {
        return false;
    }
}
