

function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}

window.onbeforeprint=function ()
{
/*
if (document.all) 
  { 
  document.mapRestaurant.focus(); 
  document.mapRestaurant.print(); 
  window.print();
  } 
else 
  { 
  window.frames["mapRestaurant"].focus(); 
  window.frames["mapRestaurant"].print(); 
  }
*/
}

var req;

function loadXMLDoc(url) {
	req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		req = false;
        	}
		}
    }
	if(req) {
		req.onreadystatechange = processReqChange;
		req.open("GET", url, true);
		req.send("");
		
	}
}

function processReqChange() {
    // only if req shows "loaded"
    if (req.readyState == 4) {
        // only if "OK"

        if (req.status == 200) {
	        	       		
       		  document.getElementById("divCounter").innerHTML="<span class='hyperlinkPrivacyPolicy'> Visits: "+req.responseText+"</span>";
            // ...processing statements go here...
        } else {
            //alert("There was a problem retrieving the XML data:\n" + req.statusText);
        }
        
	//alert(req.responseText);
         
    }
}



	function changecolor1()
		{
		
			document.getElementById('imagewrapperTD').className="changecolor1";
		}
		
		function changecolor2()
		{
		
			document.getElementById('imagewrapperTD').className="changecolor1";
		}
		
		

var setGradient = (function(){

//private variables;
var p_dCanvas = document.createElement('canvas');
var p_useCanvas = !!( typeof(p_dCanvas.getContext) == 'function');
var p_dCtx = p_useCanvas?p_dCanvas.getContext('2d'):null;
var p_isIE = /*@cc_on!@*/false;


//test if toDataURL() is supported by Canvas since Safari may not support it

try{ p_dCtx.canvas.toDataURL() }catch(err){
p_useCanvas = false ;
};

if(p_useCanvas){

return function (dEl , sColor1 , sColor2 , bRepeatY ){

if(sColor1 == sColor2)
{
//alert(sColor1);
document.body.bgColor =sColor1 ;
}

if(typeof(dEl) == 'string')
{
	if(dEl=='tdBodyGradiant')
	{
	dEl='DivLoaded';

	document.getElementById('DivLoaded').style.height= getDocHeight(document);
//alert(document.getElementById('DivLoaded').style.height= getDocHeight(document));
	}	


 dEl = document.getElementById(dEl);
}



if(!dEl) return false;
var nW = dEl.offsetWidth;
var nH = dEl.offsetHeight;//+200;
p_dCanvas.width = nW;
p_dCanvas.height = nH;

var dGradient;
var sRepeat;
// Create gradients
if(bRepeatY){
dGradient = p_dCtx.createLinearGradient(0,0,nW,0);
sRepeat = 'repeat-y';
}else{
dGradient = p_dCtx.createLinearGradient(0,0,0,nH);
sRepeat = 'repeat-x';
} 

dGradient.addColorStop(1,sColor1);
dGradient.addColorStop(0,sColor2); 

p_dCtx.fillStyle = dGradient ; 
p_dCtx.fillRect(0,0,nW,nH);
var sDataUrl = p_dCtx.canvas.toDataURL('image/png');

with(dEl.style){
backgroundRepeat = sRepeat;
backgroundImage = 'url(' + sDataUrl + ')';
backgroundColor = sColor2; 
};
}
}else if(p_isIE){

p_dCanvas = p_useCanvas = p_dCtx = null; 
return function (dEl , sColor1 , sColor2 , bRepeatY){

if(typeof(dEl) == 'string')
{
if(dEl=='tdBodyGradiant')
	{
	dEl='DivLoaded';
	document.getElementById('DivLoaded').style.height= getDocHeight(document);
//alert(document.getElementById('DivLoaded').style.height= getDocHeight(document));
	}
 dEl = document.getElementById(dEl);
}
if(!dEl) return false;
dEl.style.zoom = 1;
var sF = dEl.currentStyle.filter;
dEl.style.filter += ' ' + ['progid:DXImageTransform.Microsoft.gradient( GradientType=', +(!!bRepeatY ),',enabled=true,startColorstr=',sColor2,', endColorstr=',sColor1,')'].join('');

};

}else{

p_dCanvas = p_useCanvas = p_dCtx = null;
return function(dEl , sColor1 , sColor2 ){

if(typeof(dEl) == 'string')
{
if(dEl=='tdBodyGradiant')
	{
	dEl='DivLoaded';
	document.getElementById('DivLoaded').style.height= getDocHeight(document);
//alert(document.getElementById('DivLoaded').style.height= getDocHeight(document));
	}
 dEl = document.getElementById(dEl);
}
if(!dEl) return false;
with(dEl.style){
backgroundColor = sColor2; 
};
//alert('your browser does not support gradient effet');
}
}
})();









	
	function showhideloadimageroot()
		{

			if (document.images) 
				document.ProgBar.src='Images/Spacer.gif';			
			document.getElementById('loadtext').style.display='none';


		}


function ResizeIframe()
		{
		setIframeHeight("iframePreview");
		
				
		}
		
		function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}
 








function setIframeHeight(iframeName) 
   {
   
   if( window.parent.frames[iframeName]!=null)
     {
    
     var iframeWin = window.parent.frames[iframeName];
    
     var iframeEl = document.getElementById? window.parent.document.getElementById(iframeName): window.parent.document.all? window.parent.document.all[iframeName]: null;
   
     if ( iframeEl && iframeWin ) 
        {
        
        iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous  
        var docHt = "";
        var a=navigator.userAgent;	
		if(a.indexOf("Chrome")>-1)
		{
		    try
		    {
		        
                docHt = getDocHeight(iframeWin.document);
            }
            catch(ert)
            {
                
                docHt = getDocHeight(iframeWin.contentDocument);
            }
        }
        else
        {
            docHt = getDocHeight(iframeWin.document);
        }
        //alert(iframeEl.id);alert(iframeWin.id);
        // need to add to height to be sure it will all show
        if (docHt) 
             {
                if(a.indexOf("Chrome")>-1)
		        {
		            iframeEl.style.height = (docHt + 900) + "px";
		            //window.parent.parent.frames["IFrmaddscoupons"].style.height = (docHt + 1500) + "px";
		        }
		        else
		        {
                    iframeEl.style.height = (docHt + 900) + "px";
                }
             }
        }
     }
   }
 
function loadIframe(iframeName, url) {
  if ( window.frames[iframeName] ) {
    window.frames[iframeName].location = url;   
    return false;
  }
  else return true;
}

var strtindx ;
var JqueryGallery;





$(function() {
    //alert($("#strtindx").val());
    //try {
        strtindx = $("#strtindx").val();
        var animationspeed =  $("#HTransTime").val()*1000;
        var Delayspeed =  $("#HTransDelayTime").val()*1000;
        var galleries = $('#divHeaderGallery').adGallery({ start_at_index: 0 , effect: $("#HeaderEffect").val(), animation_speed:  animationspeed , 
                        width: $("#HHeaderWidth").val(), 
                        height: $("#HHeaderHeight").val(), 
                        display_next_and_prev: false,
                         
        slideshow: {
                        autostart: true,
                        speed: Delayspeed
                   }
        });
        var Headergalleries = $('.ad-gallery').adGallery({ display_next_and_prev: true });
         
  //  }
    //catch (ea) { }
});

 function SetSRC()
 {
 
//  loadXMLDoc2('http://'+document.domain+'/GetVisiteAlert.aspx?RestaurantInfoID='+document.getElementById('hdnRestaurantInfoID').value);
  
  if(document.getElementById('divCounter')!= null)
  {


  loadXMLDoc('http://'+document.domain+'/GetVisiteCount.aspx?RestaurantInfoID='+document.getElementById('hdnRestaurantInfoID').value);
  }
 
/*
if( document.getElementById('divContainer')!=null)
{ 
if(document.all)
	 {
	 document.getElementById('divContainer').style.height="410px";
	// document.write("<style>#divContainer {	height:410px;}</style>");
	 }
	 else
	 {
 	 document.getElementById('divContainer').style.minHeight="410px";
	 //document.write("<style>#divContainer {	min-height:410px;}</style>");
	 }
}	*/ 
  if(document.getElementById('IframePhoto')!=null)
   {
 
   var abc=document.getElementById('IframePhoto');
   
    var RestaurantInfoID=document.getElementById('hdnRestaurantInfoID').value;
   
    //abc.src="http://"+document.domain+"/BusinessDetails/RestaurantImageBlistNew.aspx?RestaurantInfoID="+RestaurantInfoID;   
  abc.src=abc.src;

  }

 if(document.getElementById('mapRestaurant')!=null)
	   {
	     
		      var src= document.getElementById('hdnMapSrc').value;
		    //alert(src);
		    
		    if((document.domain=="www.premiumlocallisting.com")||(document.domain=="www.premiumlocallistings.com")||(document.domain=="www.pll411.com"))
		    {
		    document.getElementById('mapRestaurant').src=src;//.replace('business/','http://'+document.domain+'/business/');
		    }
		    else
		    {
		    document.getElementById('mapRestaurant').src=src;//.replace('../','http://www.premiumlocallisting.com/');
		    }
		    
		    
		    document.getElementById('mapRestaurant').style.display='block';
	    }  
}

function initArray() {
    this.length = initArray.arguments.length;
    for (var i = 0; i < this.length; i++)
        this[i] = initArray.arguments[i];
}

		function from10toradix(value,radix){
    var retval = '';
    var ConvArray = new initArray(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F');
    var intnum;
    var tmpnum;
    var i = 0;

    intnum = parseInt(value,10);
    if (isNaN(intnum)){
        retval = 'NaN';
    }else{
        if (intnum < 1){
            retval ="0";
        }else{
            retval = "";
        }
        while (intnum > 0.9){
            i++;
            tmpnum = intnum;
            // cancatinate return string with new digit:
            retval = ConvArray[tmpnum % radix] + retval;  
            intnum = Math.floor(tmpnum / radix);
            if (i > 100){
                // break infinite loops
                retval = 'NaN';
                break;
            }
        }
    }
    return retval;
}

		function GetLightColor(DarkColor,Ratio)
		{
		DarkColor=new String(DarkColor);
			//var =1.5;
			
			
			LightColor =new String('');
			Red=new String('');
			Green=new String('');
			Blue=new String('');
			
			DarkColor=DarkColor.replace('#','');

			if(DarkColor.length==6)
			{
				Red=DarkColor.substring(0,2);
				Green=DarkColor.substring(2,4);
				Blue=DarkColor.substring(4,6);
			
			
				iRed=parseInt(parseFloat(parseInt(Red,16)) * Ratio);

				iGreen=parseInt(parseFloat(parseInt(Green,16)) * Ratio); 
				iBlue=parseInt(parseFloat(parseInt(Blue,16)) * Ratio); 

				if(iRed>255 ||iGreen>255||iBlue>255)
				{
					iRed=255;
					iGreen=255;
					iBlue=255;
					if(Ratio==1.5)
					{
						
						GetLightColor(DarkColor,0.8);
					}
				}

				Red=from10toradix(iRed, 16); 
			
				Green=from10toradix(iGreen, 16);
				Blue=from10toradix(iBlue, 16);

				if(Red.length==1)
				{
					Red="0"+Red;
				}
				if(Green.length==1)
				{
					Green="0"+Green;
				}
				if(Blue.length==1)
				{
					Blue="0"+Blue;
				}


				LightColor="#"+Red+Green+Blue;
			}

			return LightColor;
		}





//garima 7th june

var MaxChar="";

function GetHeaderMaxValue()
{
	var HeadingFont=window.parent.document.getElementById('hdnHeadingFont').value;
	var HeadingFontSize=window.parent.document.getElementById('hdnHeadingFontSize').value;
	var HeaderMaxValue=window.parent.document.getElementById('hdnHeaderMaxSize').value;
       var BizListingWidth=window.parent.document.getElementById('hdnBizListingWidth').value;

	//alert("DBMax="+window.parent.document.getElementById('hdnHeaderMaxSize').value);
	//alert("DBFONT="+window.parent.document.getElementById('hdnDBHeadingFont').value);
	//alert("DBFONTSIZE="+window.parent.document.getElementById('hdnDBHeadingFontSize').value);
	//alert("drpFONT="+window.parent.document.getElementById('drpHeadingFont').value);
	//alert("drpFONTSize="+window.parent.document.getElementById('drpHeadingFontSize').value);
	//alert(window.parent.document.getElementById('hdnDBHeadingFont').value==window.parent.document.getElementById('drpHeadingFont').value && window.parent.document.getElementById('hdnDBHeadingFontSize').value==window.parent.document.getElementById('drpHeadingFontSize').value);

       if(BizListingWidth==780)
      {
	if((window.parent.document.getElementById('hdnDBHeadingFont').value==window.parent.document.getElementById('drpHeadingFont').value) && (window.parent.document.getElementById('hdnDBHeadingFontSize').value==window.parent.document.getElementById('drpHeadingFontSize').value))
	{
		MaxChar=HeaderMaxValue;
		//alert("garima=" +MaxChar);
	}
	else
	{
		var HeaderMaxSize780=
		{
		"lucidaconsole_14pt":63,
		"lucidaconsole_19pt":50,
		"lucidaconsole_24pt":40,
		"lucidaconsole_36pt":23,

		"verdana_14pt":67,	
		"verdana_19pt":51,
		"verdana_24pt":38,	
		"verdana_36pt":26,

		"arial_14pt":79,
		"arial_19pt":63,
		"arial_24pt":46,
		"arial_36pt":31,

		"comicsansms_14pt":73,
		"comicsansms_19pt":60,
		"comicsansms_24pt":44,
		"comicsansms_36pt":31,

		"courier_14pt":73,
		"courier_19pt":57,
		"courier_24pt":38,
		"courier_36pt":30,

		"georgia_14pt":72,
		"georgia_19pt":57,
		"georgia_24pt":45,
		"georgia_36pt":27,

		"impact_14pt":82,
		"impact_19pt":64,
		"impact_24pt":49,
		"impact_36pt":29,

		"tahoma_14pt":78,
		"tahoma_19pt":57,
		"tahoma_24pt":44,
		"tahoma_36pt":34,

		"timesnewroman_14pt":87,
		"timesnewroman_19pt":69,
		"timesnewroman_24pt":52,
		"timesnewroman_36pt":36,


		"copperplategothiclight_14pt":87,
		"copperplategothiclight_19pt":69,
		"copperplategothiclight_24pt":52,
		"copperplategothiclight_36pt":36
		}


	


	
	     if(HeadingFont=="lucida console")
	     {
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.lucidaconsole_14pt; 
			//alert(MaxChar);
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.lucidaconsole_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.lucidaconsole_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.lucidaconsole_36pt;
		}
					
					
	   }
	  if(HeadingFont=="arial")
	  {
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.arial_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.arial_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.arial_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.arial_36pt;
		}
					
					
	  }
	   if(HeadingFont=="verdana")
	   {
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.verdana_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.verdana_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.verdana_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.verdana_36pt;
		}
					
					
	 }
	 if(HeadingFont=="comic sans ms")
	 {
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.comicsansms_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.comicsansms_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.comicsansms_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.comicsansms_36pt;
		}
					
					
	}
	if(HeadingFont=="courier")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.courier_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.courier_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.courier_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.courier_36pt;
		}
					
					
	}
	if(HeadingFont=="georgia")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.georgia_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.georgia_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.georgia_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.georgia_36pt;
		}
					
					
	}
	if(HeadingFont=="impact")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.impact_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.impact_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.impact_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.impact_36pt;
		}
					
					
	}
	if(HeadingFont=="tahoma")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.tahoma_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.tahoma_19pt;
		}	
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.tahoma_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.tahoma_36pt;
		}
					
					
	}
	if(HeadingFont=="times new roman")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.timesnewroman_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.timesnewroman_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.timesnewroman_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.timesnewroman_36pt;
		}
					
					
	}
	if(HeadingFont=="copperplate gothic light")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize780.copperplategothiclight_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize780.copperplategothiclight_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize780.copperplategothiclight_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize780.copperplategothiclight_36pt;
		}
					
					
	}
	//alert(MaxChar);
     }
   }	


  if(BizListingWidth==780)
      {
	if((window.parent.document.getElementById('hdnDBHeadingFont').value==window.parent.document.getElementById('drpHeadingFont').value) && (window.parent.document.getElementById('hdnDBHeadingFontSize').value==window.parent.document.getElementById('drpHeadingFontSize').value))
	{
		MaxChar=HeaderMaxValue;
		//alert("garima=" +MaxChar);
	}
	else
	{
		var HeaderMaxSize980 =
		{
			"lucidaconsole_14pt":78,	
			"lucidaconsole_19pt":65,
			"lucidaconsole_24pt":55,	
			"lucidaconsole_36pt":38,

			
			"verdana_14pt":82,	
			"verdana_19pt":65,
			"verdana_24pt":53,	
			"verdana_36pt":41,

			
			"arial_14pt":104,
			"arial_19pt":78,
			"arial_24pt":61,
			"arial_36pt":46,

			
			"comicsansms_14pt":88,
			"comicsansms_19pt":75,
			"comicsansms_24pt":59,
			"comicsansms_36pt":46,


		
			"courier_14pt":88,
			"courier_19pt":72,
			"courier_24pt":53,
			"courier_36pt":45,
			
			
			"georgia_14pt":92,
			"georgia_19pt":72,
			"georgia_24pt":60,
			"georgia_36pt":42,

			
			"impact_14pt":97,
			"impact_19pt":79,
			"impact_24pt":64,
			"impact_36pt":44,

			
			"tahoma_14pt":93,
			"tahoma_19pt":72,
			"tahoma_24pt":59,
			"tahoma_36pt":50,

			
			"timesnewroman_14pt":102,
			"timesnewroman_19pt":84,
			"timesnewroman_24pt":67,
			"timesnewroman_36pt":51,
			
			
			"copperplategothiclight_14pt":102,
			"copperplategothiclight_19pt":84,
			"copperplategothiclight_24pt":67,
			"copperplategothiclight_36pt":51

		}


	


	
	     if(HeadingFont=="lucida console")
	     {
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.lucidaconsole_14pt; 
			//alert(MaxChar);
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.lucidaconsole_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.lucidaconsole_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.lucidaconsole_36pt;
		}
					
					
	   }
	  if(HeadingFont=="arial")
	  {
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.arial_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.arial_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.arial_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.arial_36pt;
		}
					
					
	  }
	   if(HeadingFont=="verdana")
	   {
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.verdana_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.verdana_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.verdana_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.verdana_36pt;
		}
					
					
	 }
	 if(HeadingFont=="comic sans ms")
	 {
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.comicsansms_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.comicsansms_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.comicsansms_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.comicsansms_36pt;
		}
					
					
	}
	if(HeadingFont=="courier")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.courier_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.courier_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.courier_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.courier_36pt;
		}
					
					
	}
	if(HeadingFont=="georgia")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.georgia_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.georgia_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.georgia_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.georgia_36pt;
		}
					
					
	}
	if(HeadingFont=="impact")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.impact_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.impact_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.impact_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.impact_36pt;
		}
					
					
	}
	if(HeadingFont=="tahoma")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.tahoma_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.tahoma_19pt;
		}	
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.tahoma_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.tahoma_36pt;
		}
					
					
	}
	if(HeadingFont=="times new roman")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.timesnewroman_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.timesnewroman_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.timesnewroman_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.timesnewroman_36pt;
		}
					
					
	}
	if(HeadingFont=="copperplate gothic light")
	{
					
		if(HeadingFontSize=="14")
		{
			MaxChar=HeaderMaxSize980.copperplategothiclight_14pt; 
		}
		if(HeadingFontSize=="19")
		{
			MaxChar=HeaderMaxSize980.copperplategothiclight_19pt;
		}
		if(HeadingFontSize=="24")
		{
			MaxChar=HeaderMaxSize980.copperplategothiclight_24pt;
		}
		if(HeadingFontSize=="36")
		{
			MaxChar=HeaderMaxSize980.copperplategothiclight_36pt;
		}
					
					
	}
	//alert(MaxChar);
     }
   }




	if(window.parent.document.getElementById('drpHeadingMaxChar') != null)
	{
		if(window.parent.document.getElementById('drpHeadingMaxChar').value != '')
		{
			MaxChar = window.parent.document.getElementById('drpHeadingMaxChar').value;
		}
		else
		{
			MaxChar = window.parent.document.getElementById('hdnHeaderMaxSize').value;
		}
	}

}





function GetHeader()
{
 //alert(1);
 var ADD="";
 var part="";

var HeaderName = document.getElementsByTagName('h1');
//alert(HeaderName.length);

        for (i = 0; i < HeaderName.length; i++) 
        {
		var Extra=HeaderName[i].innerHTML;
		//alert(Extra);
       
           	 var IDName = "";
	   	if(document.all)
	   	{
			IDName = HeaderName [i].id;
		
		}
		else
		{
			IDName = HeaderName [i].getAttribute('h1');
			IDName = HeaderName [i].id;

								
		}
		//alert(IDName);
		
            	if( IDName.toLowerCase().indexOf("bizheader")>-1)
           	{
			//alert(1);
            	
            		var ADD1=HeaderName[i].innerHTML;
			
		   	if(ADD=="")
		   	{
		   		 ADD=ADD1;
		   	}
		   	else
		   	{
		  		ADD +=" "+ADD1
		    	}
		   
		   
			//HeaderName[i].style.display = 'none';
           	 }
		else if(Extra.indexOf("lblHeaderName")>-1)
		{
			//alert(3);
			var ADD1=HeaderName[i].innerHTML;
			
		   	if(ADD=="")
		   	{
		   		 ADD=ADD1;
		   	}
		   	else
		   	{
		  		ADD +=" "+ADD1
		    	}
			
		}
		

		
 			
       }
			

		ADD=RemoveExtras(ADD);		   
		 // alert(part);		   		
		FeedCharAtFixedPosition(ADD,"</span></h1><h1 id='bizheader'><span  class='MainHeader'>",MaxChar);
		
		   
           
 }


function FeedCharAtFixedPosition(strInputString,SeperatingCharacter,FixedPosition)
  {
		//alert(strInputString);
		//alert(SeperatingCharacter);
		//alert(FixedPosition);

 
			var strOutputString= new String();
			var Count=0;
			var LastSpacePos=-1;

			if(strInputString.length==FixedPosition)
			{
				strOutputString=strInputString;
			}
			else
			{
				//alert(1);
				 var ArrChar=new Array();

				 ArrChar=strInputString.split('');
				//alert(ArrChar.length);
		
			
				for(var i=0;i<ArrChar.length;i++)
				{
					if(ArrChar[i].toString()==" ")
					{
						LastSpacePos=i;
					}

				
					
					Count++;
					strOutputString+= ArrChar[i];
					//alert(strOutputString);
					//alert(Count);
					if(Count==FixedPosition)
					{
					
						if(strOutputString.lastIndexOf(" ")!=-1)
						{
								//alert(strOutputString);

							Count=strOutputString.substring(strOutputString.lastIndexOf(" ")).length-1;
							strOutputString = splice(strOutputString,strOutputString.lastIndexOf(" "),'0',SeperatingCharacter);

							//alert("garima=" + strOutputString);

							//strOutputString=strOutputString.splice(strOutputString.lastIndexOf(" "),'0',SeperatingCharacter);
							//alert(strOutputString);
							
							
		
					
						}
						else
						{
							Count=0;
							strOutputString+=SeperatingCharacter;
						}
					}
				
			
				}
				
			}
			



			var HeaderName = document.getElementsByTagName('h1');
			//HeaderName.innerHTML=strOutputString;
			 var Hdr= HeaderName[0].parentNode;
			//alert("garima="+Hdr.innerHTML);
			Hdr.innerHTML= "<h1 id='bizheader'><span class='MainHeader' id='lblHeaderName'>" + strOutputString + "</span></h1>";
			//alert(strOutputString);

			return strOutputString;
			//alert(strOutputString);
   }



/*String.prototype.splice = function( idx, rem, s ) 
		{

    return (this.slice(0,idx) + s + this.slice(idx + Math.abs(rem)));
};*/


 function splice( strOutputString,idx, rem, s ) 
{


    return (strOutputString.slice(0,idx) + s + strOutputString.slice(idx + Math.abs(rem)));
}







function RemoveExtras(str)
{
	
	while( (str.indexOf("&nbsp;")!=-1) || (str.indexOf("\n")!=-1) || (str.indexOf("\r")!=-1) || (str.indexOf("\t")!=-1) || (str.indexOf(">")!=-1 && str.indexOf("<")!=-1))
	{
		str=str.replace("&nbsp;"," ");
		str=str.replace('\n',' ');
		str=str.replace('\r',' ');
		str=str.replace('\t',' ');
			
		str=str.replace(/<[^>]*>/,' ');	
	}
			
		str=RemoveExtraSpaces(str);
		return trim(str);			
			
}
function RemoveExtraSpaces(str)
{
	while(str.indexOf("  ")!=-1)
	{
		str=str.replace('  ',' ');
	}
	return str;
}

function trim(str)
{
            
      if(!str || typeof str != 'string')
          return '';

     return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');
}



//end




		    
 function AddCss()
    {
  

    SetSRC();
  
ResizeIframe();





  

	
	/*var FID = getElementsByClass('FooterBackground');
	if(FID.length )
	alert(FID[0].id);
	if(document.getElementById('chkRemoveFooter').checked)
        {
		FID[0].style.display = "none";
	}
	else
	{
		FID[0].style.display = "";
	}
*/

var Alltrs = document.getElementsByTagName('tr');

        for (i = 0; i < Alltrs.length; i++) 
        {
            var className = "";
		if(document.all)
		{
			className = Alltrs[i].className;
		}
		else
		{
			className = Alltrs[i].getAttribute('class');
		}
		
            if( className == "FooterBackground")
            {
                
		if(parent.document.getElementById('chkRemoveFooter').checked)
        	{
			Alltrs[i].style.display = 'none';
			
		}
		else
		{
			Alltrs[i].style.display = '';
			
		}
            }
           
        }

/*garima for footer address 8/2/2011*/
         
        var Alltrs = document.getElementsByTagName('span');

        for (i = 0; i < Alltrs.length; i++) 
        {
            var className = "";
			className = Alltrs[i].id;
				
            if( className == "lblftrCompany")
            {
                
				if(parent.document.getElementById('chkFtrCompany').checked==false)
		        	{
					Alltrs[i].style.display = 'none';
					
				}
				else
				{
					Alltrs[i].style.display = '';
					
				}
            }
            if( className == "lblftrAddress")
            {
               		if(parent.document.getElementById('chkFtrAddress').checked==false)
		        	{
					Alltrs[i].style.display = 'none';
					
				}
				else
				{
					Alltrs[i].style.display = '';
					
				}
            }
             if( className == "lblftrPhone")
            {
               		if(parent.document.getElementById('chkFtrPhone').checked==false)
		        	{
					Alltrs[i].style.display = 'none';
					
				}
				else
				{
					Alltrs[i].style.display = '';
					
				}
            }


           
        }
      

        /*end*/

        
        
        
        /*div footer remove*/
        var Alltrs = document.getElementsByTagName('div');

        for (i = 0; i < Alltrs.length; i++) 
        {
            var className = "";
		if(document.all)
		{
			className = Alltrs[i].className;
		}
		else
		{
			className = Alltrs[i].getAttribute('class');
		}
		
            if( className == "DivPllBizFooter")
            {
                
		if(parent.document.getElementById('chkRemoveFooter').checked)
        	{
			Alltrs[i].style.display = 'none';
			
		}
		else
		{
			Alltrs[i].style.display = '';
			
		}
            }
           
        }
        /*end*/
        
        /*for page border*/
        
          var Alltrs = document.getElementsByTagName('table');

        for (i = 0; i < Alltrs.length; i++) 
        {
            var className = "";
			if(document.all)
			{
				className = Alltrs[i].className;
			}
			else
			{
				className = Alltrs[i].getAttribute('class');
			}
		
            if( className == "tblPllBizFooter")
            {
                
				if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!="")
        		{
        			//alert(parent.document.getElementById('chkRemoveFooter').checked);
        			if(parent.document.getElementById('chkRemoveFooter').checked)
        			{
						Alltrs[i].style.display = 'none';
			
					}
					else
					{
					Alltrs[i].style.display = '';
			
					}
				}
            }
           
        }

        
        var Alltrs = document.getElementsByTagName('tr');

        for (i = 0; i < Alltrs.length; i++) 
        {
            var className = "";
			if(document.all)
			{
				className = Alltrs[i].className;
			}
			else
			{
				className = Alltrs[i].getAttribute('class');
			}
		
            if( className == "FooterBackgroundImage")
            {
                
				if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!="")
        		{
        			//alert(parent.document.getElementById('chkRemoveFooter').checked);
        			if(parent.document.getElementById('chkRemoveFooter').checked)
        			{
					Alltrs[i].style.display = 'none';
					}
					else
					{
					Alltrs[i].style.display = '';
					}
				
				}
				else
				{
					Alltrs[i].style.display = 'none';
			
				}
            }
           
        }

	 //garima for footer PMP
        var Alltds = document.getElementsByTagName('td');

        for (i = 0; i < Alltds .length; i++) 
        {
            var className = "";
		if(document.all)
		{
			
			className = Alltds [i].className;
		}
		else
		{
			className = Alltds [i].getAttribute('class');
			//alert(className);
		}
		
              if( className == "hyperlinkPrivacyPolicy")
             {
                //alert(1);
				if(parent.document.getElementById('chkRemovePMPFromFooter').checked)
		        	{
					Alltds [i].style.display = 'none';
					
				}
				else
				{
					Alltds [i].style.display = '';
					
				}
            }

            
           
        }

        //end

  

  
  
    if (document.images) 
				document.ProgBar.src='Images/Spacer.gif';			
	document.getElementById('loadtext').style.display='none';
	
    var hdnPath=document.getElementById('hdnpath').value;

    if(getQueryVariable("preview")==null)
	{
    var lnknew=document.createElement('LINK');
    
    document.getElementById('myhead').insertBefore(lnknew,document.getElementById('Parentlnk'));

    }
    else
    {
    
   var Opacity=window.parent.document.getElementById('hdnOpacity').value;

var BizListingWidth=window.parent.document.getElementById('hdnBizListingWidth').value;
if(BizListingWidth == "")
{
	BizListingWidth = 980;
}

var CloudTagColor=window.parent.document.getElementById('hdnCloudTagclr').value;
var HeadingTextAlignment=window.parent.document.getElementById('hdnHeadingTextAlignment').value;
var HeaderOffset=window.parent.document.getElementById('hdnHeaderOffset').value;
var ButtonFontColor=window.parent.document.getElementById('hdnButtonFontColor').value;
/*garima for menu padding*/
var MenuPaddingTop=window.parent.document.getElementById('hdnMenuPaddingTop').value;
var MenuPaddingBelow=window.parent.document.getElementById('hdnMenuPaddingBottom').value;

/*end*/
/*garima for Page padding*/
var PagePaddingTop=window.parent.document.getElementById('hdnPagePaddingTop').value;
var PagePaddingBottom=window.parent.document.getElementById('hdnPagePaddingBottom').value;

/*end*/


var FooterOffset=window.parent.document.getElementById('hdnFooterOffset').value;


				
   
    var HeaderHeight=window.parent.document.getElementById('hdnHeaderHeight').value;
    var bgCol=window.parent.document.getElementById('hdnbg').value;
     var InnerPageBG=window.parent.document.getElementById('hdnInnerPageBG').value;
     var HeaderBottomColor=window.parent.document.getElementById('hdnHeaderBottom').value;
          var HeaderBottomHeight=window.parent.document.getElementById('hdnHeaderBottomHeight').value;
    var textCol=window.parent.document.getElementById('hdnFtrClr').value;//hdnFtrClr
var FontFtrClr=window.parent.document.getElementById('hdnFontFtrClr').value;
var FooterBackgroundColor=window.parent.document.getElementById('hdnFooterBackgroundColor').value;
    
   var ButtonBackGround=window.parent.document.getElementById('hdnButtonBackGround').value;//hdnFtrClr
   var MenuColor=window.parent.document.getElementById('hdnMenuColor').value; 
   var MenuFontColor=window.parent.document.getElementById('hdnMenuFontColor').value;
      
  
var AddressFont=window.parent.document.getElementById('hdnAddressFont').value;
var AddressFontColor=window.parent.document.getElementById('hdnAddressFontColor').value;
var AddressFontSize=window.parent.document.getElementById('hdnAddressFontSize').value + "pt";
var AddressFontStyle=window.parent.document.getElementById('hdnAddressFontStyle').value;
var BodyFontStyle=window.parent.document.getElementById('hdnBodyFontStyle').value;
var MenuFontStyle=window.parent.document.getElementById('hdnMenuFontStyle').value;
var CloudTagFont=window.parent.document.getElementById('hdnCloudTagFont').value;
var MenuFont=window.parent.document.getElementById('hdnMenuFont').value;

var ButtonFont=window.parent.document.getElementById('hdnButtonFont').value;
var ButtonFontStyle=window.parent.document.getElementById('hdnButtonFontStyle').value;

var SubHeadingFont=window.parent.document.getElementById('hdnSubHeadingFont').value;
var SubHeadingFontStyle=window.parent.document.getElementById('hdnSubHeadingFontStyle').value;
var SubHeadingFontColor=window.parent.document.getElementById('hdnSubHeadingFontColor').value;


var HeadingFontStyle=window.parent.document.getElementById('hdnHeadingFontStyle').value;
var HeadingFontSize=window.parent.document.getElementById('hdnHeadingFontSize').value + "pt";
var HeadingFont=window.parent.document.getElementById('hdnHeadingFont').value;

var AddressTextAlignment=window.parent.document.getElementById('hdnAddressFontAlignment').value;
var FooterFontStyle=window.parent.document.getElementById('hdnFooterFontStyle').value;
//footer
	var FooterBGCol=window.parent.document.getElementById('hdnFooterBackgroundColor').value;
//footer

var PageBorder=window.parent.document.getElementById('hdnPageBorder').value;
var MenuPaddingBG=window.parent.document.getElementById('hdnMenuPaddingBG').value;
var MainFooterHeight=window.parent.document.getElementById('hdnMainFooterHeight').value;

/*for rounded menu*/
var IsRoundedMenu=window.parent.document.getElementById('hdnIsRoundedMenu').value;
var MenuAlignment=window.parent.document.getElementById('hdnMenuAlignment').value;

if(parseInt(window.parent.document.getElementById('hdnMenuRadiusValue').value)>0)
{
    IsRoundedMenu = 1;
}
else
{
    IsRoundedMenu = 0;
}
var MenuRadiusValue= window.parent.document.getElementById('txtMenuRadiusValue').value;
/*end*/

/*Lead Gen*/
var LGFontColor=window.parent.document.getElementById('hdnLGFontColor').value;
var LGFieldColor=window.parent.document.getElementById('hdnLGFieldColor').value;
/*End*/
var PageRadiusValue=parent.document.getElementById('txtPageRadiusValue').value;
var VOSRadiusValue=parent.document.getElementById('txtVOSRadiusValue').value;

/*Menu select value*/
   var MenuSelectColor=window.parent.document.getElementById('hdnMenuSelectColor').value; 
/*end*/


//7th june 2011 garima
GetHeaderMaxValue();
GetHeader();
//end

var strFooterFontStyle = "";

if(FooterFontStyle == 0)
{
	strFooterFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:normal;";
}
else if(FooterFontStyle == 1)
{
	strFooterFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:normal;";
}
else if(FooterFontStyle == 2)
{
	strFooterFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:italic;";
}
else if(FooterFontStyle == 3)
{
	strFooterFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:italic;";
}


var strHeadingFontStyle = "";

if(HeadingFontStyle == 0)
{
	strHeadingFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:normal;";
}
else if(HeadingFontStyle == 1)
{
	strHeadingFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:normal;";
}
else if(HeadingFontStyle == 2)
{
	strHeadingFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:italic;";
}
else if(HeadingFontStyle == 3)
{
	strHeadingFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:italic;";
}


var strSubHeadingFontStyle = "";

if(SubHeadingFontStyle == 0)
{
	strSubHeadingFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:normal;";
}
else if(SubHeadingFontStyle == 1)
{
	strSubHeadingFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:normal;";
}
else if(SubHeadingFontStyle == 2)
{
	strSubHeadingFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:italic;";
}
else if(SubHeadingFontStyle == 3)
{
	strSubHeadingFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:italic;";
}


var strButtonFontStyle = "";

if(ButtonFontStyle == 0)
{
	strButtonFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:normal;";
}
else if(ButtonFontStyle == 1)
{
	strButtonFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:normal;";
}
else if(ButtonFontStyle == 2)
{
	strButtonFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:italic;";
}
else if(ButtonFontStyle == 3)
{
	strButtonFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:italic;";
}


var strAddressFontStyle = "";

if(AddressFontStyle == 0)
{
	strAddressFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:normal;";
}
else if(AddressFontStyle == 1)
{
	strAddressFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:normal;";
}
else if(AddressFontStyle == 2)
{
	strAddressFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:italic;";
}
else if(AddressFontStyle == 3)
{
	strAddressFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:italic;";
}

var strMenuFontStyle = "";

if(MenuFontStyle == 0)
{
	strMenuFontStyle= "\nfont-weight:bold;"+
				"\nfont-style:normal;";
}
else if(MenuFontStyle == 1)
{
	strMenuFontStyle= "\nfont-weight:normal;"+
				"\nfont-style:normal;";
}
else if(MenuFontStyle == 2)
{
	strMenuFontStyle= "\nfont-weight:normal;"+
				"\nfont-style:italic;";
}
else if(MenuFontStyle == 3)
{
	strMenuFontStyle= "\nfont-weight:bold;"+
				"\nfont-style:italic;";
}

var strBodyFontStyle = "";

if(BodyFontStyle == 0)
{
	strBodyFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:normal;";
}
else if(BodyFontStyle == 1)
{
	strBodyFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:normal;";
}
else if(BodyFontStyle == 2)
{
	strBodyFontStyle = "\nfont-weight:normal;"+
				"\nfont-style:italic;";
}
else if(BodyFontStyle == 3)
{
	strBodyFontStyle = "\nfont-weight:bold;"+
				"\nfont-style:italic;";
}

    
  var obtn=window.parent.document.getElementById('rdbgrd');
    var rdbTile=window.parent.document.getElementById('rdbTile');
     //garima 21 nov
    var rbtnFooterImage=window.parent.document.getElementById('rdbFooterUploadImage');
       
    //end


    //garima 21 nov
    var rbtnCLTile=window.parent.document.getElementById('rbtnCLTile');
    //end

  var hdnImage=window.parent.document.getElementById('hdnImage');
    var strTileImagePath=window.parent.document.getElementById('hdnTileImagePath').value;
    
     var  strFooterImagePath=window.parent.document.getElementById('hdnUploadFooterImage').value;

var HeaderRadValue = window.parent.document.getElementById('hdnHeaderRadiusValue').value;//harshesh for header radius curve
var ServiceAreaColor=window.parent.document.getElementById('hdnServiceArea').value;
var FontValue =window.parent.document.getElementById('drpFont').value;
var Font='arial';
if(FontValue!='0')
{
//Font = window.parent.document.getElementById('drpFont').options[FontValue].text;
Font = FontValue;
}
var FontSizeValue =window.parent.document.getElementById('drpFontSize').value;
var FontSize='10pt';
if(FontSizeValue!='0')
{
//FontSize = window.parent.document.getElementById('drpFontSize').options[FontSizeValue].text;
FontSize =FontSizeValue;
}

//setGradient("indentmenu",GetLightColor(textCol,1.5),textCol,0);
//if(document.getElementById('rdbMenuGradient') != null && document.getElementById('rdbMenuGradient').checked)
//{
//setGradient("indentmenu",GetLightColor(MenuColor,1.5),MenuColor,0);   
//}


//setGradient("imagewrapper",GetLightColor(textCol,1.5),textCol,0);
//if(parent.document.getElementById('rdbButtonGradient') != null && document.getElementById('rdbButtonGradient').checked)
//{
//setGradient("imagewrapper",GetLightColor(ButtonBackGround,1.5),ButtonBackGround,0);
//}


//9thdec
var FooterImageSize=window.parent.document.getElementById('hdnfooterHeight').value;

//end

  
var strImageName =hdnImage.value.split("'").join("%27");
hdnImage.value =strImageName ;
//alert(hdnImage.value);

    var ss1 = document.createElement('style');
    //var def = ".bgimage {  background-image : url('Header.gif'); height:60px;	 }";
     var def =  " .hyperlinkPrivacyPolicy "+
                " { "+
				" font-family:  Arial; "+
				" font: Tahoma; "+
				" font-size: 7pt; "+
				" vertical-align: middle; "+
				" text-decoration:none; "+
				" } "+
				//garima for privacy policy color 25th nov
				 ".PrivacyPolicy "+
                " { "+
				" font-family:  Arial; "+
				" font: Tahoma; "+
				" font-size: 7pt; "+
				" vertical-align: middle; "+
				" text-decoration:none; "+
				" color:"+FontFtrClr+";"+
				" } "+

				//end

                " .hyperlink "+
                " { "+
	            " font-family: Verdana, Arial; "+
	            " font: Tahoma; "+
	            " font-size: 8pt; "+
	            " vertical-align: middle; "+
	
                " } "+ 

                
                " .bgimage "+ 
				" {" ;
				//" background-image : url('../Headers/Header.gif');"+
				if(hdnImage.value=='Header.gif')
				{
				def +=((document.domain=="tablenow.pbhllc.com")?
				" background-image : url('http://tablenow.pbhllc.com/BusinessListing/D928BusinessListing/StyleEditor/Temp/"+hdnImage.value +"'); ":
				" background-image : url('http://tablenow.pbhllc.com/BusinessListing/D928BusinessListing/StyleEditor/Temp/newHeader.gif'); "
				)
				}
				else if(hdnImage.value=='980Header.gif')
				{
				def +=((document.domain=="tablenow.pbhllc.com")?
				" background-image : url('http://tablenow.pbhllc.com/BusinessListing/D928BusinessListing/StyleEditor/Temp/"+hdnImage.value +"'); ":
				" background-image : url('http://tablenow.pbhllc.com/BusinessListing/D928BusinessListing/StyleEditor/Temp/980Header.gif'); "
				)
				}
				else
				{
				def +=" background-image : url('http://tablenow.pbhllc.com/BusinessListing/D928BusinessListing/StyleEditor/Temp/"+hdnImage.value +"'); ";
				}
				
				
				def +=
				" height:"+HeaderHeight+"px;"+
				" background-repeat:no-repeat;"+
				" background-position:center;"+
				" }" +
				" .SubHeaderOrangeDay"+
				" {"+
				" font-family: "+SubHeadingFont+";"+
				" font-size: 9pt;"+
				strSubHeadingFontStyle +
				" vertical-align :baseline;"+
				//" color:"+textCol+";"+
				" color:"+SubHeadingFontColor+";"+
				" }";
			
			if(rdbTile.checked!=true)
			{	
				def+=
				" .BodyGradiant"+
				" {";
				
				//BG grd value
				
			var ratio = 0;
			ratio = parent.document.getElementById("txtBGGrdValue").value;
			//ratio = ratio/50;
			var bgCl = GetLightColorNew(bgCol,ratio);
			var strtClr = '';
			var endClr = '';
			if(parent.document.getElementById("drpbgGradientDirection").value == "0")
			{				
				//setGradient("DivLoaded","#FFFFFF",bgCol,0); 
				strtClr = bgCol;
				endClr = bgCl ;
			}
			else
			{
				strtClr = bgCl ;
				endClr = bgCol;
			}





			
				if(obtn.checked==true)
				{
				def+=
				" filter:progid:DXImageTransform.Microsoft.Gradient( startColorstr="+strtClr+",endColorstr="+endClr+");"+
				" margin-top:0px;"+
				" margin-left:5px;"+
				" margin-right:5px;"+
				" text-align:center;";
				}
				else
				{
				def+=
				" background-color:"+ bgCol + ";";
				}
				
				def+=" }"+
				" .BodyGradiant1"+
				" {";
				
				if(obtn.checked==true)
				{
				def+=
				" filter:progid:DXImageTransform.Microsoft.Gradient( startColorstr="+strtClr+",endColorstr="+endClr+");"+
				" margin-top:0px;"+
				" margin-left:5px;"+
				" margin-right:5px;"+
				" text-align:center;";
				}
				else
				{
				def+=
				" background-color:"+ bgCol + ";";
				}
				
				def+=
				" }";
			}
					def+=
				" .tableMain"+
				" {";
				var PageRadiusValue=parent.document.getElementById('txtPageRadiusValue').value;

				if(PageBorder==1)
				{
					if(PageRadiusValue>0)
					{
					
						if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "775":"975")+"px;";//garima for page border

		        		}
		        		else
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border

		        		}

						//def+=" width:"+((BizListingWidth=="780")? "771":"971")+"px;";//garima for page border
						/*"\nborder-top:gray solid 2px;" +
						"\nBORDER-left: gray  Solid 2px;" +
						"\nBORDER-right: gray  Solid 2px;" ;*/

						
					}
					else
					{
						def+=" width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
	
					}
				}
				else
				{
					if(IsRoundedMenu==1)
					{
						if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "772":"972")+"px;";//garima for page border

		        		}
		        		else
		        		{

						def+=" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border
						}
					}
					else
					{
							def+=" width:"+((BizListingWidth=="780")? "776":"960")+"px;";//garima for page border

					}

				}
				def+=" margin-top:0px;"+
				" margin-bottom:0px;"+
				" background-color:White;"+
				" }"+
				".labeltextBold"+
				"{"+
				"font-family: "+AddressFont+";"+
				"font-size: "+AddressFontSize+";"+
				"vertical-align :middle;"+
				"text-align:justify;"+
				//"font-weight:bold;"+
				strAddressFontStyle +
				"color:"+AddressFontColor+";"+
				"}"+
				".tdInside"+
				"{"+
				"font-family: Verdana,Arial;"+
				"font-size: 8pt;"+
				"vertical-align :middle;"+
				"text-align:justify;"+
				"padding-left:15px;"+
				"}"+
				".MainHeader"+
				"{"+
				"font-family: "+HeadingFont+";"+
				"font-size:"+HeadingFontSize+";"+
				strHeadingFontStyle+
				"height:8px;"+
				"vertical-align :middle;"+
				"color:"+textCol+";"+

				"}"+
                                 
                                  
				" h1"+
				" {"+
				" font-family: Verdana,Arial;"+
				" font-size:25px;"+
				" font-weight:bold;"+
				//" height:50px;"+
				//" line-height:50px;"+
				" line-width:"+BizListingWidth+"px;"+
				" vertical-align :baseline;"+
				" color:"+textCol+";"+
				" margin-bottom: 0px;"+
				" margin-top: 0px;"+
				" }"+
				".linkButton"+
				"{"+
				"font-family:"+SubHeadingFont+";"+
				"font-size: 12px;"+
				strSubHeadingFontStyle +
				"text-align:center;"+
				"COLOR: "+SubHeadingFontColor+";"+
				"VERTICAL-ALIGN: super;"+
				"}"+
				".linkButtonBig"+
				"{"+
				"font-family:Verdana;"+
				"font-size: 14px;"+
				"font-weight:bold;"+
				"text-align:center;"+
				"COLOR: "+textCol+";"+
				"VERTICAL-ALIGN: super;"+
				"}"+

				".SubHeaderBlack"+
				"{"+
				"font-family: Verdana,Arial;"+
				"font-size:small;"+
				"font-weight:bold;"+
				"vertical-align :baseline;"+
				"color:Black;"+
				"+}"+
				".dottedborder"+
				"{"+
				"border-style: dashed;"+
				"border-width: 1px;"+
				"width:97%;"+
				"}"+
				".SubHeaderOrange"+
				"{"+
				"font-family: "+SubHeadingFont+";"+
				"font-size:16px;"+
				strSubHeadingFontStyle+
				"vertical-align :baseline;"+
				"color:"+SubHeadingFontColor+";"+
				"margin-top:5px;"+
				"}"+

                                ".HeadingColor"+
				"{"+
				"font-family: "+SubHeadingFont+";"+
				strSubHeadingFontStyle+
				"color:"+SubHeadingFontColor+";"+
				"}"+
      
				".SubHeaderOrangePhoto"+
				"{"+
				"font-family: "+SubHeadingFont+";"+
				"text-align:justify;"+
				"font-size:16px;"+
				strSubHeadingFontStyle+
				"vertical-align :baseline;"+
				"color:"+SubHeadingFontColor+";"+
				"margin-top:5px;"+
				"}"+

				" h2"+
				" {"+
				" font-family: Verdana,Arial;"+
				" font-size:16px;"+
				" font-weight:bold;"+
				" line-height:20px;"+
				" vertical-align :baseline;"+
				" color:#a50053;"+
				" margin-top:5px;"+
				" margin-bottom: 0;"+
				" }"+
				".SubHeaderOrangeTime"+
				"{"+
				"font-family: "+SubHeadingFont+";"+
				"font-size:16px;"+
				strSubHeadingFontStyle +
				"vertical-align :baseline;"+
				"color:"+SubHeadingFontColor+";"+
				"margin-top:5px;"+
				"height:8px;"+
				"}"+
				".labeltext"+
				"{"+
				"font-family: Verdana,Arial;"+
				"font-size: 10pt;"+
				"vertical-align :middle;"+
				"text-align:justify;"+
				"}"+
				".labeltext"+
				"{"+
				"font-family: '"+Font+"';"+
				"font-size: "+FontSize+";"+
                                 strBodyFontStyle +
				"}"+
				".td"+
				"{"+
				"font-family: Verdana,Arial;"+
				"font-size: 8pt;"+
				"vertical-align :middle;"+
				"text-align:justify;"+
				"}"+
				".tdTime"+
				"{"+
				"font-family: "+SubHeadingFont+";"+
				"font-size: 8pt;"+
				"vertical-align :middle;"+
				"}"+
				".FooterBackground"+
				"{"+
				//"background-color:#EEEEEE;"+
				
				
				//"filter:progid:DXImageTransform.Microsoft.Gradient( startColorstr=#9F0039,endColorstr=#6A0026);"+
				//"background-color:"+FooterBackgroundColor+";"+
				"width:"+BizListingWidth+"px;"+
				//"height:"+FooterImageSize+"px;"+
				//"height:30px;"+
				"}"+
				".FooterText"+
				"{"+
				"font-family: Verdana,Arial;"+
				"font-size: 8pt;"+
				"vertical-align :middle;"+
				"text-align:justify;"+
				//"font-weight:bold;"+
				strFooterFontStyle  +
				"color:"+FontFtrClr+";"+
				"}"+

				".PageBackground"+
				"{"+
				"background-color:Silver;"+
				"}"+
				
				
				"#imagewrapper"+
			    "{"+
				"width:344px;"+
				"position: relative;"+
				"BORDER-RIGHT: #000000 1px solid;"+
        		"BORDER-TOP: #000000 1px solid;"+
                "BORDER-LEFT: #000000 1px solid;"+
                "BORDER-BOTTOM: #000000 1px solid;"+
                 "background-color:"+ButtonBackGround+";";
                   
            	def+="-moz-border-radius:"+VOSRadiusValue+"px;"+
				"-webkit-border-radius:"+VOSRadiusValue+"px;"+
				" border-radius:"+VOSRadiusValue+"px;";

                    
				def+="}"+

				".changecolor1"+
				"{"+
				/*"color:#ffffff;"+*/
				"color:"+ButtonFontColor+";"+
				"font-family:"+ButtonFont+";"+
				"font-size:100%;"+
				"font-weight:bold;"+
				strButtonFontStyle +
				"height:28px;"+
				"vertical-align:middle;"+
				"}"+

				".changecolor2"+
				"{"+
				"color:"+ bgCol+";"+
				"font-family:'trebuchet ms',helvetica,sans-serif;"+
				"font-size:100%;"+
				"font-weight:bold;"+
				"height:28px;"+
				"vertical-align:middle;"+
				"}"+
				
				"#indentmenu"+
				"{"+
				"font: bold 13px Arial;"+
				/*"width: 100%;"+*/
				"overflow: hidden;"+
				"padding-left:0px;";
				
		          if(IsRoundedMenu==0)
				  {               
				 	def+="background-color:"+MenuColor+";"+ //garima for rounded corner
				 	"\n width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
				 	if(PageBorder==1 && PageRadiusValue>1)
				  	{
				  	    def+="border-left:2px solid gray;";
				  	    def+="border-right:2px solid gray;"
				  	}
				  }
				  else
				  {
				  	if(PageBorder==1 && PageRadiusValue<1)
				  	{
				  		def+="\n width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border

				  	}
				  	else
				  	{
				  		if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border

		        		}
		        		else
		        		{
						
				  		def+="\n width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
				  		}

				  	}
				  	
				  }                                   
				def+="}"+
				
				"#indentmenu ul"+
				"{"+
				"margin: 0;"+
				"padding: 0;"+
				"float: left;"+
				"width: 98%;"+
				"}"+
				
				"#indentmenu ul li"+
				"{"+
				"display: inline;"+
				"margin:2px;"+
				"}"+
				
				"#indentmenu ul li a"+
				"{"+
				"float: left;"+
				"color: white;"+
				"padding: 5px 11px;"+
				"text-decoration: none;"+
				"border-right: 1px solid #ffffff;"+
				"}"+
				"#indentmenu ul li a:visited"+
				"{"+
				"color: white;"+
				"}"+
				"#indentmenu ul li a:hover, .indentmenu ul li .current"+
				"{"+
				"color: white !important;"+
				"padding-top: 6px;"+
				"padding-bottom: 4px;"+
				"}"+
				"#divContainer"+
				"{"+
				"min-height:410px;"+
				"height:auto !important;"+
				"height:410px;"+
				"MARGIN-LEFT: 15px;"+
				"MARGIN-RIGHT: 15px;"+
				"FONT-SIZE: "+FontSize+";"+
				"FONT-FAMILY: '"+Font+"';"+
                                 strBodyFontStyle + 

				"}"+
				".textboxright"+
				"{"+
				"font-weight: normal;"+
				"font-family: Verdana,Arial;"+
				"font-size: 8pt;"+
				"text-align:right;"+
				"color: #000000;	"+
				"background-color: white;"+
				"border-color: Black;"+
				"border-width: 1px;"+
				"border-style: solid;"+
				"width: 122px;"+
				"height:18px;"+
				"}"+

				".textboxcenter"+
				"{"+
				"font-weight: normal;"+
				"font-family: Verdana,Arial;"+
				"font-size: 8pt;"+
				"text-align:center;"+
				"color: #000000;	"+
				"background-color: white;"+
				"border-color: Black;"+
				"border-width: 1px;"+
				"border-style: solid;"+
				"width: 122px;"+
				"height:18px;"+
				"}"+

				".textbox"+
				"{"+
				"font-weight: normal;"+
				"font-family: Verdana,Arial;"+
				"font-size: 8pt;"+
				"color: #000000;	"+
				"background-color: white;"+
				"border-color: Black;"+
				"border-width: 1px;"+
				"border-style: solid;"+
				"width: 122px;"+
				"height:18px;"+
				"}"+

				".dropdown"+
				"{"+
				"font-weight: normal;"+
				"font-family: Verdana,Arial;"+
				"font-size: 8pt;"+
				"color: #000000;"+
				"background-color: white;"+
				"border-color: Black;"+
				"border-width: 1px;"+
				"border-style: solid;"+
				"width:122px;"+
				"}"+

				".button"+
				"{"+
				"background-color:Olive"+
				"font-family: Verdana,Arial;"+
				"font-size: 8pt;"+
				"font-weight:bold;  	"+
				"}"+
				
				".InnerPageBackGround"+
				"{"+
				//"background-color: "+InnerPageBG+";"+
				"background-color: transparent;"+

				"}";
				var HeaderRADValue;
				var HdrRadiusOption;
				    HeaderRADValue = parent.document.getElementById('txtHeaderRadiusValue').value;
				    HdrRadiusOption = parent.document.getElementById('hdnHdrRadiusOption').value;
				    def += ".ad-galleryH, .ad-galleryH * {" +
                       "\n margin: 0;" +
                        "\n padding: 0;" +
                        "\n overflow:hidden;";
				    if (HdrRadiusOption == 1) {
				        def += "\n border-radius :" + HeaderRADValue + "px;" +
                        "\n}";
				    }
				    else {
				        def += "\n border-radius :" + HeaderRADValue + "px " + HeaderRADValue + "px 0px 0px;"+
                        "\n}";

				    }
				
				def+=".tableMainForHeader"+
				"{";
								
				if(PageBorder==1)
						{
							def+=/*"border-top:gray solid 2px;"+*/"";
//							"BORDER-left: gray  Solid 2px;"+
//							"BORDER-right: gray  Solid 2px;";
							
                              var styleHeaderCurv ="background-color:"+InnerPageBG+"; margin-bottom: 0; margin-top: 0; ";
                              styleHeaderCurv+="-webkit-border-radius: "+HeaderRADValue+"px;-moz-border-radius: "+HeaderRADValue+"px;border-radius: "+HeaderRADValue+"px; ";
                              styleHeaderCurv+="border:2px solid gray; overflow:hidden; ";
//                              //alert($("div.ad-galleryH").html());
                               //$("div.tablemainforheaderimage").attr("style",styleHeaderCurv);
//                               $("div.ad-galleryH *").css("border-radius",HeaderRADValue+"px");
//		                       $("div.ad-galleryH *").css("-webkit-border-radius",HeaderRADValue+"px"); 
		                       //alert($("div.ad-galleryH *").css("border-radius"));  
							if(MenuPaddingTop!="0px")
								{
//								def+="BORDER-bottom: gray  Solid 2px;";
								}
							if(IsRoundedMenu==1)
							{
								def+="\n width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
								
							}
							else
							{
								def+="\n width:"+((BizListingWidth=="780")? "784":"984")+"px;";//garima for page border

							}
						}
						else
						{
							
							if(IsRoundedMenu==1)
							{

							def+="\n width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
							}
							else
							{
								def+="\n width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border

							}

		
						}
					if(IsRoundedMenu==1)
					{	//alert(1);
						def+="\nmargin-bottom:0px;";

					
					}
					else
					{
						def+="\nmargin-bottom:0px;";
					}
					def+="\nmargin-top:0px;"+
				
				"}"+
				".tableMainForHeaderImage"+
				"{";
					if (PageBorder == 1) {
					    def+="border-top:gray solid 2px;"+
					    "BORDER-left: gray  Solid 2px;"+
					    "BORDER-right: gray  Solid 2px;";
					    if (MenuPaddingTop != "0px") {
					        			def+="BORDER-bottom: gray  Solid 2px;";
					    }
					}
				
					var strHdrRadOption;
					if (HdrRadiusOption == 1) {

					    strHdrRadOption = HeaderRadValue+"px;" ;
					}
					else {
					    //strHdrRadOption = HeaderRadValue + "px;";
					    strHdrRadOption = HeaderRadValue + "px " + HeaderRADValue + "px 0px 0px ;";
					}
				
				def+=
				//" width:"+((BizListingWidth=="780")? "784":"984")+"px;"+
				"margin-top:0px;"+
				"margin-bottom:0px;"+
				"Background-color:"+InnerPageBG+";"+
                "-webkit-border-radius: " + strHdrRadOption + "" +
                "-moz-border-radius: " + strHdrRadOption + "" +
                " border-radius: " + strHdrRadOption + "" +
                 "overflow:hidden;"+
				"}"+
				".HeaderBottom"+
				"{"+
				" border-bottom:"+HeaderBottomColor+" solid "+HeaderBottomHeight+"px;"+				
				"}"+
				".ServiceAreaColor"+
				"{"+
				" color: "+ServiceAreaColor+";"+
				"}"+
				"body"+
				"{"+
				" color: "+ServiceAreaColor+";"+
				"}"
				;
				//alert(def);
				
				def+="div.title" +
				"{"+
"color: #000066;"+
"padding-left: 1px;"+ 
"font-family: monospace;"+ 
"letter-spacing: 2px;"+ 
"font-size: 12px;"+ 
"line-height: 9px;"+ 
"height: 9px;"+ 
"margin-bottom: 1px;"+ 
"}"+
 
"div.main"+
"{"+ 
"border: 1px solid #000066;"+ 
"}"+ 

/*5 jan*/
"div.domMenu_menuBar"+
"{"+
"border: solid #7E7E7E;";

if(IsRoundedMenu==1)
{
	
  //var indentCl = GetLightColor(MenuColor,1.5);
  	var ratio = 0;
	ratio = parent.document.getElementById("txtMenuGrdValue").value;
	//ratio = ratio/50;
	var indentCl = GetLightColorNew(MenuColor,ratio);
	parent.document.getElementById("hdnMenuLightColor").value=indentCl ;
  	 def+="-webkit-border-radius: "+MenuRadiusValue+"px;"+    
	"-moz-border-radius: "+MenuRadiusValue+"px;"+ 
	"border-radius: "+MenuRadiusValue+"px;";
		
	//"filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+indentCl+", endColorstr="+MenuColor+"); ";//for IE 
	if(parent.document.getElementById('rdbMenuGradient') != null && parent.document.getElementById('rdbMenuGradient').checked)
	{
	
	def+="background: -webkit-gradient(linear, left top, left bottom, from(" + MenuColor+ "), to(" + indentCl + "));"+ // for webkit browsers 
	"background: -moz-linear-gradient(top,  " + MenuColor+ ",  " + indentCl + ");"+ // for firefox 3.6+ 
	"background-image: -o-linear-gradient(top,rgb(25,87,167),rgb(6,19,77));"+
	"background: -moz-linear-gradient(center top , " + MenuColor+ ", " + indentCl + ") repeat scroll 0 0 transparent;"+// repeat scroll 0 0 transparent;
	"padding-left:10px;"+
	"padding-right:10px;";
	
	}
	else
	{
		
		def+="background: -webkit-gradient(linear, left top, left bottom, from("+MenuColor+"), to("+MenuColor+"));"+ // for webkit browsers 
	"background: -moz-linear-gradient(top,  "+MenuColor+",  "+MenuColor+");"+ // for firefox 3.6+ 
	"background-image: -o-linear-gradient(top,rgb(25,87,167),rgb(6,19,77));"+
	"background: -moz-linear-gradient(center top , "+MenuColor+", "+MenuColor+");"+// repeat scroll 0 0 transparent;
	"padding-left:10px;"+
	"padding-right:10px;";


	}
	if(PageBorder==1)//garima for page border
	{
	
		 def+="border-width: 1px 2px 1px 2px;"; //rounded border
	}
	else
	{
		 def+="border-width: 0px 0 0px 0;";
	}
/*rounded menu*/
  
}
else
{
	var ratio = 0;
	ratio = parent.document.getElementById("txtMenuGrdValue").value;
	//ratio = ratio/50;
	var indentCl = GetLightColorNew(MenuColor,ratio);
	parent.document.getElementById("hdnMenuLightColor").value=indentCl ;

	if(parent.document.getElementById('rdbMenuGradient') != null && parent.document.getElementById('rdbMenuGradient').checked)
	{

	def+="background: -webkit-gradient(linear, left top, left bottom, from(" + MenuColor+ "), to(" + indentCl + "));"+ // for webkit browsers 
	"background: -moz-linear-gradient(top,  " + MenuColor+ ",  " + indentCl + ");"+ // for firefox 3.6+ 
	"background-image: -o-linear-gradient(top,rgb(25,87,167),rgb(6,19,77));";
	"background: -moz-linear-gradient(center top , " + MenuColor+ ", " + indentCl + ") repeat scroll 0 0 transparent;";// repeat scroll 0 0 transparent;
	}
	else
	{
		def+="background: -webkit-gradient(linear, left top, left bottom, from("+MenuColor+"), to("+MenuColor+"));"+ // for webkit browsers 
	//"background: -moz-linear-gradient(top,  "+MenuColor+",  "+MenuColor+");"+ // for firefox 3.6+ 
	"background-image: -o-linear-gradient(top,rgb(25,87,167),rgb(6,19,77));";
	//"background: -moz-linear-gradient(center top , "+MenuColor+", "+MenuColor+");";// repeat scroll 0 0 transparent;

	}
	if(PageBorder==1)//garima for page border
	{
	
		 def+="border-width: 1px 0px 1px 0px;"; //rounded border
	}
	else
	{
		 def+="border-width: 0px 0 0px 0;";
	}


	
}

/*end*/


 def+="}"+


"div.domMenu_menuElement"+
"{"+ 
"border-left:0px solid #7E7E7E; border-right:1px solid #7E7E7E; border-top:0 solid #7E7E7E; border-bottom:0px solid #7E7E7E; font-family: Arial, sans-serif;"+ 
"font-size: 13px ;"+
"font-family:"+MenuFont+";"+ 
strMenuFontStyle +
/*"color: #FFFFFF;"+ */
"color:"+MenuFontColor+";"+
"text-align: center;"+ 
"height: 28px;"+ 
"line-height: 28px;"+ 
"padding: 0px 12px;"+ 
"vertical-align: middle"+ 
"}"+
 
"#domMenu_main0-1"+ 
"{";

if(MenuAlignment==0 && IsRoundedMenu==1)//rounded menu
{
def+="border-left:0px solid #7E7E7E; border-right:0 solid #7E7E7E; border-top:0 solid #7E7E7E; border-bottom:0 solid #7E7E7E; font-family: Arial, sans-serif;"; 
}
else
{
	//def+="border-left:1px solid #7E7E7E; border-right:0 solid #7E7E7E; border-top:0 solid #7E7E7E; border-bottom:0 solid #7E7E7E; font-family: Arial, sans-serif;"; 
	def+="border-left:0px solid #7E7E7E; border-right:0 solid #7E7E7E; border-top:0 solid #7E7E7E; border-bottom:0 solid #7E7E7E; font-family: Arial, sans-serif;"; 

}
def+= "font-family: Arial, sans-serif;"+ 
"font: bold 13px Arial;"+ 
"color: #FFFFFF;"+ 
"text-align: center;"+ 
"height: 28px;"+ 
"line-height: 28px;"+ 
"padding: 0px 12px;"+ 
"vertical-align: middle"+ 
"}"+
 
"#domMenu_main1-1"+ 
"{";
if(MenuAlignment==0 && IsRoundedMenu==1)//rounded menu
{ 
	def+="border-left:0px solid #7E7E7E; border-right:0 solid #7E7E7E; border-top:0 solid #7E7E7E; border-bottom:0 solid #7E7E7E; font-family: Arial, sans-serif;"; 
}
else
{
	//def+="border-left:1px solid #7E7E7E; border-right:0 solid #7E7E7E; border-top:0 solid #7E7E7E; border-bottom:0 solid #7E7E7E; font-family: Arial, sans-serif;"; 
	def+="border-left:0px solid #7E7E7E; border-right:0 solid #7E7E7E; border-top:0 solid #7E7E7E; border-bottom:0 solid #7E7E7E; font-family: Arial, sans-serif;"; 
}
def+="font-family: Arial, sans-serif;"+ 
"font: bold 13px Arial;"+ 
"color: #FFFFFF;"+ 
"text-align: center;"+ 
"height: 28px;"+ 
"line-height: 28px;"+ 
"padding: 0px 12px;"+ 
"vertical-align: middle"+ 
"}"+
 
"div.domMenu_menuElementHover"+ 
"{"; 
if(IsRoundedMenu==1)//Rounded corner
{
	if(parent.document.getElementById('rdbMenuGradient') != null && parent.document.getElementById('rdbMenuGradient').checked && MenuAlignment!=1)
	{
    	def+="background-color: "+MenuColor+";";
    	/*"-webkit-border-radius: "+MenuRadiusValue+"px;"+    
		"-moz-border-radius: "+MenuRadiusValue+"px; "+
		"border-radius: "+MenuRadiusValue+"px;";*/
	}
	else
	{
		def+="background-color: "+MenuColor+";";

	}
    

}
else
{
	def+="background-color: "+MenuColor+";";
}
def+="}";

		/*var Count=0;
	  var ss = document.getElementById('indentmenu').innerHTML;
	   var divEls = document.getElementsByTagName("td");
	   var Style="cursor: pointer;padding: 10px 10px 10px 10px;vertical-align: top;";
		    var i = 0;
		    for(i=0;i<divEls.length;i++)
		    {				
		        if(divEls[i].id.indexOf("domMenu")!=-1)
				{
									
					var MenuID=divEls[i].id.substring(divEls[i].id.indexOf("-")+1);
					if(MenuID==1)
					{
						
						Count++;
					}
		        	
		        }
		      }  */

	//alert(ss);


/*for(var k=0;k<=Count;k++)
{
		//alert(Count);
	def+="#domMenu_main"+k+"-1 div.domMenu_menuElementHover:hover"  +
		"{ "+
		"background-color: "+MenuColor+";"+
		"-webkit-border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;"+
		"-moz-border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px; "+
		"border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;"+
		"} ";
}	*/
	
	/*def+="#domMenu_main1-1 div.domMenu_menuElementHover:hover"  +
	"{ "+
	"background-color: "+MenuColor+";"+
	"-webkit-border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;"+
	"-moz-border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px; "+
	"border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;"+
	"} ";
	
		def+="#domMenu_main2-1 div.domMenu_menuElementHover:hover"  +
	"{ "+
	"background-color: "+MenuColor+";"+
	"-webkit-border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;"+
	"-moz-border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px; "+
	"border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;"+
	"} ";*/
	
	
	
	
	
	

 
def+="div.domMenu_subMenuBar"+ 
"{"+ 
"border: solid #7E7E7E 1px;"+ 
"background-color: "+MenuColor+";"+ 
"padding-bottom: 1px;"+ 
"opacity: "+(Opacity)/100+";"+ 
"filter: alpha(opacity="+Opacity+");"+ 
"}"+
 
"div.domMenu_subMenuElement"+ 
"{"+ 
"font-family: Arial, sans-serif;"+  
"font-size: 12px ;"+ 
"font-family:"+MenuFont+";"+
strMenuFontStyle +
"border: solid #CCCCCC 1px;"+ 
"margin: 1px 1px 0 1px;"+ 
/*"color: #FFFFFF;"+ */
"color:"+MenuFontColor+";"+
"padding: 2px 7px;"+ 
"}"+
 
"div.domMenu_subMenuElementHover"+ 
"{"+ 
"background-color: "+MenuColor+";"+ 
"color: #CCCCCC;"+  
"}"+


"\n.Small0"+
							"\n{"+
							"\nfont-size:12px;"+
							"\nfont-family:"+CloudTagFont+";"+
							"\ncolor:"+CloudTagColor+";"+
							"\nmargin-right:10px; "+
							"\n}"+
							"\n.Medium0"+
							"\n{"+
							"\nfont-size:17px;"+
							"\nfont-family:"+CloudTagFont+";"+
							"\nfont-style:normal;"+
							"\ncolor:"+CloudTagColor+";"+
							"\nmargin-right:10px; "+
							"\n}"+
							"\n.Large0"+
							"\n{"+
							"\nfont-size:22px; "+
							"\nfont-family:"+CloudTagFont+";"+
							"\ncolor:"+CloudTagColor+";      "+
							"\nmargin-right:10px; "+
							"\n}"+

							"\n.Small1"+
							"\n{"+
							"\nfont-size:12px;"+
							"\nfont-family:"+CloudTagFont+";"+
							"\ncolor:"+CloudTagColor+";"+
							"\nfont-weight:bold;"+
							"\nmargin-right:10px; "+
							"\n}"+
							"\n.Medium1"+
							"\n{"+
							"\nfont-size:17px;"+
							"\nfont-family:"+CloudTagFont+";"+
							"\nfont-style:normal;"+
							"\ncolor:"+CloudTagColor+";"+
							"\nfont-weight:bold;"+
							"\nmargin-right:10px; "+
							"\n}"+
							"\n.Large1"+
							"\n{"+
							"\nfont-size:22px; "+
							"\nfont-family:"+CloudTagFont+";"+
							"\ncolor:"+CloudTagColor+";    "+ 
							"\nfont-weight:bold; "+
							"\nmargin-right:10px; "+
							"\n}"+
				"\n.HeadingTextAlignment"+
				"\n{"+
				"\ntext-align:"+HeadingTextAlignment+";"+
				"\npadding-right:15px;"+
				"\n}"+
 				
				"\n.AddressTextAlignment"+
				"\n{"+
				"\ntext-align:"+AddressTextAlignment+";"+
				"\npadding-right:15px;"+
				"\n}"+	
							
				/*5 jan*/								
				"\n.MenuPadding"+
				"\n{"+
				"\npadding-top:"+MenuPaddingTop +";"+
				"\npadding-bottom:"+MenuPaddingBelow +";";
                var PageRadiusValue = parent.document.getElementById('txtPageRadiusValue').value;
                var strPageRadCurveTop; var strPageRadCurveBottom;
                var PageRadiusOption = parent.document.getElementById('hdnPageRadiusOption').value;
                if (PageRadiusOption == 1) {

                    strPageRadCurveTop = " " + PageRadiusValue + "px " + PageRadiusValue + "px 0px 0px ;"
                    strPageRadCurveBottom = " 0px 0px " + PageRadiusValue + "px " + PageRadiusValue + "px ; ";

                }
                else {
                    strPageRadCurveTop = " 0px ;"
                    strPageRadCurveBottom = " 0px 0px " + PageRadiusValue + "px " + PageRadiusValue + "px ; ";
                }
				if(PageBorder==1)
				{
					if(IsRoundedMenu==0 && PageRadiusValue<1)
					{
						def+=" \nBORDER-left: gray  Solid 2px;"+
							" \nBORDER-right: gray  Solid 2px;";
					}
				}
				if(MenuPaddingBG==0)
				{
					//alert(2);
					def+="background-color: "+InnerPageBG+";"
				}
					
				/*Pratigya 30/09/2011*/
				def+="\n}"+
				/*page padding*/
				"\n.PagePadding"+
				"\n{"+
				"\npadding-top:"+PagePaddingTop +";"+
				"\npadding-bottom:"+PagePaddingBottom +";";
				if(PageBorder==1 && IsRoundedMenu==0)
				{
					//def+=" \nBORDER-left: gray  Solid 2px;"+
					//	" \nBORDER-right: gray  Solid 2px;";
					

				}
				/*if(MenuPaddingBG==0)
				{*/
					//alert(2);
					//def+="background-color: "+InnerPageBG+";"
				/*}*/

				/*Pratigya 30/09/2011*/
				def+="\n}"+

				
				"\n.TDBodyGradient"+
				"\n{"+
  				"\npadding-top:"+HeaderOffset +";"+
                                "\npadding-bottom:"+FooterOffset+";"+
				"\n}"+
"\n.LeadGenBox"+
				"\n{"+
				"\n	border-color:Silver;"+
				
				"\nbackground-color: White;"+
				"\nborder:2px solid silver;"+
				
				"\n-moz-border-radius: 20px;"+
				"\nborder-radius: 20px;"+
				"\nborder-style:Solid;"+				
				"\n-webkit-border-radius: 20px;"+
				"\n	width:310px; "+
				
				"\n	margin-top:20px;"+
				"\n	padding:10px 10px 10px 10px;"+				
				"\n MIN-HEIGHT: 110px;"+
				"\n}"+

				"\n.LeadGenTable"+
				"\n{"+
				"\n	font-size:13px; "+
				"\n	font-family:Verdana;"+
				/*"\n	color:#747474;"+	*/	
				"\n	color:"+LGFontColor+";"+	

				"\n	width=100%;"+
				"\n}"+
				"\n.textboxleadgen"+
				"\n{"+		
				"\nwidth:230px;"+
				"\nfont-weight: normal;"+
				"\nfont-family: Verdana,Arial;"+
				"\nfont-size: 8pt;"+
				//"\ncolor: #000000;	"+
				"\n	color:"+LGFontColor+";"+
				/*"\nbackground-color: white;"+*/
				"\nbackground-color: "+LGFieldColor+";"+
				"\nborder-color: gray;"+
				"\nborder-width: 1px;"+
				"\nborder-style: solid;"+
				"\nheight:18px;"+
				"\n}"+
				
				"\n.roundedCornersCoupon"+
				"\n{"+
				"\npadding: 10px 10px 10px 10px;"+
				"\nborder:5px dashed black;"+
				"\nposition:relative;"+
				"\nborder-style:dashed;"+
				"\n-webkit-border-radius: 20px;"+
				"\n-moz-border-radius: 20px;"+
				"\nbackground-color: white;"+
				"\n}";

				def+=
				"\n .DivPllBizMID"+
				"\n{";
				var PageRadiusValue=parent.document.getElementById('txtPageRadiusValue').value;
				if(PageBorder==1)
				{
						 if(PageRadiusValue>0)
						  {
						  	
						  		if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1)
		        				{
		        					def+="\n width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border


		        				}
		        				else
		        				{
		        				def+="\n width:"+((BizListingWidth=="780")? "775":"975")+"px;";//garima for page border

		        				}

								
								def+=//"\n width:"+((BizListingWidth=="780")? "770":"970")+"px;"+//garima for page border
								"\nborder-color: gray;"+
										"\npadding:2px 2px 2px 2px;"+
									
									"\nborder-style:solid;"+
									"\nborder-width: 2px 2px 0px 2px;"+
									 "\nbackground-color: "+InnerPageBG+";";
									 if(parent.document.getElementById('chkRemoveFooter').checked)
									 {
									 	def+="\n-moz-border-radius:"+strPageRadCurveTop+
										"\n-webkit-border-radius:" + strPageRadCurveTop +
										"\n border-radius:" + strPageRadCurveTop;	
									 }
									 else
									 {
									     def += "\n-moz-border-radius:" + strPageRadCurveTop +
										"\n-webkit-border-radius:" + strPageRadCurveTop +
										"\n border-radius:"+strPageRadCurveTop;
									 }
						 }
						else
						{
							def+="\nbackground-color: "+InnerPageBG+";";
							
									if(PageRadiusValue>0)
									{
										def+=" \nBORDER-top: gray  Solid 2px;";

									}
									if(MenuPaddingBelow!="0px")
									{
									    def+=" \nBORDER-top: 2px solid gray;";
									}
							
									if(PagePaddingTop!="0px" || MenuPaddingTop!="0px")
									{
										def+=" \nBORDER-left: gray  Solid 2px;"+
										" \nBORDER-right: gray  Solid 2px;";
									}
									if(PagePaddingTop!="0px")
									{
										def+="\n width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
									}
									else
									{
										def+="\n width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
	
										def+="\nBORDER-left: gray  Solid 2px;" +
										"\nBORDER-right: gray  Solid 2px;" ;
									
									}


						}
					
				}
				else
				{
					def+="\nborder-color: "+InnerPageBG+";";
								//"\npadding:2px 2px 2px 2px;"+
								 if(parent.document.getElementById('chkRemoveFooter').checked)
									 {
									     def += "\n-moz-border-radius:" + strPageRadCurveTop +
										"\n-webkit-border-radius:"+strPageRadCurveTop+
										"\n border-radius:"+strPageRadCurveTop;	
									 }
									 else
									 {
									     def += "\n-moz-border-radius:" + strPageRadCurveTop +
										"\n-webkit-border-radius:" + strPageRadCurveTop +
										"\n border-radius:" + strPageRadCurveTop;
									 }
	
								def+="\nborder-style:solid;"+
								"\nborder-width: 2px;"+
								"\nbackground-color: "+InnerPageBG+";";
					if(IsRoundedMenu==1)
					{
						if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1)
		        		{
		        			if(PageRadiusValue>1)
		        			{
		        				def+=" width:"+((BizListingWidth=="780")? "778":"978")+"px;";//garima for page border
		        			}
		        			else
		        			{
		        				def+=" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border

		        			}

		        		}
		        		else
		        		{
		        				def+=" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border

		        		}


						
					}
					else
					{
						if(PageRadiusValue<1)
						{
							def+="\n width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border

						}
						else
						{
							def+="\n width:"+((BizListingWidth=="780")? "776":"980")+"px;";//garima for page border
						}
								"\nbackground-color: "+InnerPageBG+";";

					}


				}
			def+="}";
				
				/*end*/
				/*5 jan*/
			 
					def+=
					"\n .DivPllBizFooter"+
					"\n{";
						var PageRadiusValue=parent.document.getElementById('txtPageRadiusValue').value;
												

						if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1 || IsRoundedMenu==0)
		        		{
			        			if(PageBorder==1)
			        			{
			        				def+=" \nBORDER-left: gray  Solid 2px;"+
										" \nBORDER-right: gray  Solid 2px;"+
										" \nBORDER-bottom: gray  Solid 2px;";
										if(PageRadiusValue>0)
										{
											def+="\n-moz-border-radius:"+strPageRadCurveBottom +
												"\n-webkit-border-radius:" + strPageRadCurveBottom +
												"\n border-radius:" + strPageRadCurveBottom +
												"\nborder-style:solid;"+
												"\npadding-bottom:8px;";
												if(PageBorder==1)
												{
													def+="\nborder-color:gray;";
												}
												else
												{
													def+="\nborder-color:"+FooterBackgroundColor+";";
								
												}
												def+="\nborder-width: 0px 2px 2px 2px;";
										}
										
								}
								else
								{



								    def += "\n-moz-border-radius:" + strPageRadCurveBottom +
												"\n-webkit-border-radius:" + strPageRadCurveBottom +
												"\n border-radius:" + strPageRadCurveBottom +	
												"\nborder-style:solid;"+
												"\npadding-bottom:8px;";											
												if(PageBorder==1)
												{
													def+=" \nBORDER-left: gray  Solid 2px;"+
													" \nBORDER-right: gray  Solid 2px;"+
													" \nBORDER-bottom: gray  Solid 2px;";
												}
												else
												{
													//def+="\nborder-color:transparent;";
													def+=" \nBORDER-left: "+FooterBackgroundColor+" Solid 2px;"+
													" \nBORDER-right: "+FooterBackgroundColor+" Solid 2px;"+
												" \nBORDER-bottom: "+FooterBackgroundColor+" Solid 2px;";
													//def+="\nborder-color:"+FooterBackgroundColor+";";
								
												}
												def+="\nborder-width: 0px 2px 2px 2px;";
										
														
												
								}
			
			        			
			        		}
		        		else
		        		{
		        			def+="\npadding:2px 2px 2px 2px;"+
								"\n-moz-border-radius:" + strPageRadCurveBottom +
								"\n-webkit-border-radius:" + strPageRadCurveBottom +
								"\n border-radius:0px 0px " + strPageRadCurveBottom +
								"\nborder-style:solid;";
								if(PageBorder==1)
								{
									def+="\nborder-color:gray;";
								}
								else
								{
									//def+="\nborder-color:transparent;";
									def+="\nborder-color:"+FooterBackgroundColor+";";
				
								}
							def+="\nborder-width: 0px 2px 2px 2px;";	        
						}

						 def+="\nbackground-color: "+FooterBackgroundColor+";";
						if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1 && PageBorder==1)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border

		        		}
		        		else if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1 && PageBorder==0)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "778":"978")+"px;";//garima for page border

		        		}
		        		else if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==0 && PageBorder==0)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "777":"977")+"px;";//garima for page border

		        		}



						/*else if(PageBorder == 0 && PageRadiusValue>0)
						{
								def+=" width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
						}*/
						else if(PageBorder == 1 && PageRadiusValue > 0 && IsRoundedMenu==0)
						{
							def+=	" width:"+((BizListingWidth=="780")? "779":"979")+"px;";//garima for page border
						}
						else if(PageBorder == 1 && PageRadiusValue > 0 && IsRoundedMenu==1)
						{
							def+=	" width:"+((BizListingWidth=="780")? "775":"975")+"px;";//garima for page border
						}

						else if(PageBorder == 1 && PageRadiusValue < 1 && IsRoundedMenu==0)
						{
							def+=	" width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border

						}
						else if(PageBorder == 0 && IsRoundedMenu==0 && PageRadiusValue<1)
						{
							def+=" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border

						}
						else if(PageBorder == 0 && IsRoundedMenu==1 && PageRadiusValue<1)
						{
							def+=" width:"+((BizListingWidth=="780")? "772":"972")+"px;";//garima for page border

						}
						else if(PageBorder == 0 && IsRoundedMenu==1 && PageRadiusValue>1)
						{
							
							def+=" width:"+((BizListingWidth=="780")? "772":"972")+"px;";//garima for page border

						}


						else
						{
							def+=	" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border
						}	
	
				def+="}";
			
			/*end*/

				
				/*5 jan*/
				def+="\n .tblPllBizFooter"+
				"\n{";
				//"\nbackground-color:"+FooterBackgroundColor+";";		/*for Page round*/
					if(PageBorder==1)
					{
							/*def+=" \nBORDER-left: gray  Solid 2px;"+
							" \nBORDER-right: gray  Solid 2px;"+
							" \nBORDER-bottom: gray  Solid 2px;";*/
						
							if(IsRoundedMenu==1)
							{
								def+=" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border
							}
							else
							{
								def+=" width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border
									
							}
						if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "780":"980")+"px;";//garima for page border

		        		}

							
					}
					
					else
					{
						if(IsRoundedMenu==1)
						{
	
						def+=" width:"+((BizListingWidth=="780")? "772":"972")+"px;";//garima for page border
						}
						if(parent.document.getElementById('rdbFooterUploadImage').checked && parent.document.getElementById('hdnUploadFooterImage').value!=""  && IsRoundedMenu==1)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border

		        		}
		        		if(IsRoundedMenu==0)
		        		{
		        			def+=" width:"+((BizListingWidth=="780")? "776":"976")+"px;";//garima for page border

		        		}

						
					}
	
				
				
				def+="}";
				/*end*/
				
				/*5 jan*/
									
				def+=".FooterBackgroundImage"+
				"{"+
				//"background-color:#EEEEEE;"+
				//"filter:progid:DXImageTransform.Microsoft.Gradient( startColorstr=#9F0039,endColorstr=#6A0026);"+
				"\nbackground-color:"+FooterBackgroundColor+";"+
				" width:"+((BizListingWidth=="780")? "780":"980")+"px;"+//garima for page border

				//"height:"+FooterImageSize+"px;"+
				//"height:30px;"+
				"}";

				//garima for menu color change
				def += ".MenuColorChangeRound" +
				"{" ;
					//"filter:progid:DXImageTransform.Microsoft.Gradient( startColorstr=#9F0039,endColorstr=#6A0026);"+
						if(MenuAlignment==0)
						{
						
					    		def+="-webkit-border-radius: "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;" +
								"-moz-border-radius:  "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;" +
								"border-radius:  "+MenuRadiusValue+"px 0 0 "+MenuRadiusValue+"px;" ;
						}
						
					
					
					def+="\nbackground-color:" + MenuSelectColor+ ";" +
				"}";
				//end
				//garima for menu color change
				def += ".MenuColorChange" +
				"{" ;
					//"filter:progid:DXImageTransform.Microsoft.Gradient( startColorstr=#9F0039,endColorstr=#6A0026);"+
					def+="\nbackground-color:" + MenuSelectColor+ ";" +
				"}";
				//end


				def+=
					"#tdFooter"+
					"{"+
					//"background-image : url('"+strFooterImagePath+"');"+
					//" background-repeat:no-repeat;"+
					//" background-color:"+FooterBGCol+";"+
					//" background-position:center;"+
					"height:"+MainFooterHeight+"px;"+

					"}";

				
					

				if(rbtnFooterImage.checked==true)
				{
				//alert(1);
				def+=
					"#tdFooterForImage"+
					"{"+
					"background-image : url('"+strFooterImagePath+"');"+
					" background-repeat:no-repeat;"+
					//" background-color:"+FooterBGCol+";"+
					" background-position:center;"+
					"width:"+BizListingWidth+"px;"+
				    "height:"+(parseInt(FooterImageSize)-5)+"px;"+
					
					"}";


					
				}

				if(rdbTile.checked==true)
			{	
				
			/*	"table"+
			    "{"+
			    "background-color:Transparent;"+
				"}"+
				"table td"+
			    "{"+
			    "background-color:Transparent;"+
				"}"+
			    "#tblBody td"+
			    "{"+
			    "background-color:Transparent;"+
				"}"+
				"table"+
				"{"+
				"background : url('"+strTileImagePath+"');"+
				"}"+
				"#imagewrapper table"+
			    "{"+
			    "background : url('');"+
				"}";
				*/
				def+=
				"body"+
				"{"+
				"background-image : url('"+strTileImagePath+"');"+
				"}";
				if(rbtnCLTile.checked==true)
				{
					//alert(1);
					def+=
					"#tdBodyGradiant1"+
					"{"+
					"background-image : url('"+strTileImagePath+"');"+
					"}"+
					"#tdBodyGradiant2"+
					"{"+
					"background-image : url('"+strTileImagePath+"');"+
					"}";
					SetSeperatorGradient(strTileImagePath,strTileImagePath);

				}	
			}	


    
    ss1.setAttribute("type", "text/css");
    
    //ss1.styleSheet.cssText = def;
    
    
    if (ss1.styleSheet) 
       {   // IE
       ss1.styleSheet.cssText = def;
       } 
   else 
       {                // the world
       var tt1 = document.createTextNode(def);
       ss1.appendChild(tt1);
       }

    
    
       
    var hh1 = document.getElementsByTagName('head')[0];
     
    hh1.appendChild(ss1);



if(rdbTile.checked!=true)
	{
//alert(1);

	//setGradient("DivLoaded","#FFFFFF",bgCol,0); 	
		if(parent.document.getElementById("rdbgrd").checked)
		{
		var ratio = 0;
					ratio = parent.document.getElementById("txtBGGrdValue").value;
					//ratio = ratio/50;
					var bgCl = GetLightColorNew(bgCol,ratio);
					parent.document.getElementById("hdnBGLightColor").value=bgCl ;

			if(parent.document.getElementById("drpbgGradientDirection").value == "0")
			{

				
				setGradient("DivLoaded",bgCl ,bgCol,0); 
			}
			else
			{
				//alert(3);
				setGradient("DivLoaded",bgCol,bgCl,0); 
			}

		}		
    
    	}

}

  
	
		    if(getQueryVariable("preview")==null)
			{
			lnknew.setAttribute('href',hdnPath+'bizmain.css');
			lnknew.setAttribute('type','text/css');
            lnknew.setAttribute('rel','stylesheet');
			}
			else
			{
				
			}
   
   
    document.getElementById('DivLoaded').style.display='block';
    document.getElementById('loadtext').style.display='none';

	
   
	 //for map by piyush
	 
	  
	//     DISPLAY: none

 //var bgCol=window.parent.document.getElementById('hdnbg').value;
//alert(bgCol);
//alert(document.getElementById("tblWindowsize").offsetHeight);
//alert("p="+document.getElementById("DivLoaded").offsetHeight);

//alert(document.getElementById('DivLoaded').style.height= getDocHeight(document));
//alert("p1="+getDocHeight(document)+"p="+document.getElementById("tblWindowsize").offsetHeight);  //alert("p2="+document.getElementById("tblMain").offsetHeight);


//document.getElementById("DivLoaded").style.height = document.getElementById("tblWindowsize").offsetHeight+320;
//alert("p2="+document.getElementById("DivLoaded").offsetHeight);
//alert("p3="+document.getElementById("DivLoaded").style.height);


var bgCol=window.parent.document.getElementById('hdnbg').value;

if(parent.document.getElementById("rdbgrd").checked)
{
	//var bgCl = GetLightColor(bgCol,1.5);
		if(bgCol=="#AAAAAA")
		{
			var bgCl="#AAAAAA";
		}
		else if((bgCol.toLowerCase()=="#ffffff"))
		{
			var bgCl="#FFFFFF";

		}
		else
		{
			var bgCl = GetLightColor(bgCol,1.5);
		}


	
	if(parent.document.getElementById("drpbgGradientDirection").value == "0")
	{
		
		//setGradient("DivLoaded","#FFFFFF",bgCl,0); 
	}
	else
	{
		
		//setGradient("DivLoaded",bgCl,"#FFFFFF",0);
	}
}

	

	//garima 21 nov CL COlor
if(document.all)
{
	var CLCol=window.parent.document.getElementById('hdnCLColor').value;
	var PageBG=window.parent.document.getElementById('hdnInnerPageBG').value;
	var PageBgColor;
	if(parent.document.getElementById("rbtnCLGradient").checked)
	{
			/*if(CLCol!="#AAAAAA")
			{*/
			
			if(CLCol!="#AAAAAA")
			{
			
			var CL = CLCol;//GetLightColor(CLCol,1.5);
			}
			else
			{
				var CL="#AAAAAA";
			}
			//alert(window.parent.document.getElementById('hdnInnerPageBG').value);
			if(window.parent.document.getElementById('hdnInnerPageBG').value=="#ffffff")
			{
				PageBgColor="#FFFFFF";
			}
			else
			{
				//alert(1);
				PageBgColor= PageBG;//GetLightColor(PageBG,1.6);
			}
		   //var bgCl = GetLightColor(bgCol,1.5);

			//setGradient("DivLoaded",bgCl,"#FFFFFF",0);
			
			//alert(CL);
			//alert(PageBgColor);
			
			SetSeperatorGradient(CL,PageBgColor);

			
			setGradient("tdBodyGradiant1",CL,PageBgColor,0);
			setGradient("tdBodyGradiant2",PageBgColor,CL ,0);			
		
		
	}
	if(parent.document.getElementById("rbtnCLPlain").checked)
	{
		  // alert(document.getElementById('indentmenu').style.height);
			
			SetSeperatorGradient(CLCol,CLCol);
			document.getElementById("tdBodyGradiant1").style.backgroundColor = CLCol;
			document.getElementById("tdBodyGradiant2").style.backgroundColor = CLCol;
			
			setGradient("tdBodyGradiant1",CLCol,CLCol,0);
			setGradient("tdBodyGradiant2",CLCol,CLCol,0);
			
	}
}
//end




//setGradient("tdBodyGradiant","#FFFFFF",bgCl,0);
//document.getElementById("tdBodyGradiant1").style.height = document.getElementById("tblWindowsize").offsetHeight+10;
//document.getElementById("tdBodyGradiant2").style.height = document.getElementById("tblWindowsize").offsetHeight+10;

//document.getElementById("tdBodyGradiantM").style.backgroundColor=bgCol;

//setGradient("tdBodyGradiant1",bgCl,"#FFFFFF",0);
//setGradient("tdBodyGradiant2","#FFFFFF",bgCl,0);
if(!document.all)
{
//document.getElementById("tdBodyGradiant1").style.height="40%";
//document.getElementById("tdBodyGradiant2").style.height="60%";
}






if(parent.document.getElementById('rdbMenuGradient') != null && parent.document.getElementById('rdbMenuGradient').checked)
{
	var indentCl = GetLightColor(MenuColor,1.5);
		 if(document.all)
	    {
	    	//alert(1);
	    	//for menu grd value
	    	
	    	var ratio = 0;
			ratio = parent.document.getElementById("txtMenuGrdValue").value;
			//ratio = ratio/50;
			var indentCl = GetLightColorNew(MenuColor,ratio);
			parent.document.getElementById("hdnMenuLightColor").value=indentCl ;
			    	
	    	setGradient("indentmenu",indentCl,MenuColor,0);

	    }

}
else
{
	 if(document.all)
	    {
			setGradient("indentmenu",MenuColor,MenuColor,0);
		}

}

				
				 
if(parent.document.getElementById('rdbButtonGradient') != null && parent.document.getElementById('rdbButtonGradient').checked)
{
	//alert(2);
/*Visit Our Site grd Value*/
	var wrapperCl = GetLightColor(ButtonBackGround,1.5);
	  	var ratio = 0;
    	ratio = parent.document.getElementById("txtButtonGrdValue").value;
  	  //	ratio = ratio/50;
  	 // alert(parent.document.getElementById("txtButtonGrdValue").value);

  	parent.document.getElementById("hdnButtonLightColor").value=GetLightColorNew(ButtonBackGround,ratio);
  	//alert(parent.document.getElementById("hdnButtonLightColor").value);
  	setGradient("imagewrapper",GetLightColorNew(ButtonBackGround,ratio),ButtonBackGround,0); 	
  	//noPostBack(e);

}


//var MaxMenuChar = parent.document.getElementById("drpMenuMaxChar").value;
var MaxMenuChar = parent.document.getElementById("hdnCurrentMenuMaxChar").value;
//alert(parent.document.getElementById("hdnCurrentMenuMaxChar").value);
var RID = parent.document.getElementById("hdnRestaurantInfoID").value;
ChangeMenuPreview(RID, MaxMenuChar, MenuColor);






    }


function gradientCallInFF()
{ 

	var bgCol=window.parent.document.getElementById('hdnbg').value;
        var rdbTile=window.parent.document.getElementById('rdbTile');

	if(parent.document.getElementById("rdbgrd").checked)
	{
		if(bgCol=="#AAAAAA")
		{
			var bgCl="#AAAAAA";
		}
		else if((bgCol.toLowerCase()=="#ffffff"))
		{
			var bgCl="#FFFFFF";

		}
		else
		{
			var ratio = 0;
					ratio = parent.document.getElementById("txtBGGrdValue").value;
					//ratio = ratio/50;
					var bgCl = GetLightColorNew(bgCol,ratio);
					parent.document.getElementById("hdnBGLightColor").value=bgCl ;

		}

	
		if(parent.document.getElementById("drpbgGradientDirection").value == "0")
		{
		
			setGradient("DivLoaded",bgCl,bgCol,0);  
                       
             if(rdbTile !=null && rdbTile.checked==true)
			{
			//SetSeperatorGradient(bgCl,"#FFFFFF");
			}
			else
			{
			
			//SetSeperatorGradient("","");

			}
 
			//setGradient("tdBodyGradiant1",bgCl,"#FFFFFF",0);
			//setGradient("tdBodyGradiant2","#FFFFFF",bgCl,0);
		}
		else
		{
		
			setGradient("DivLoaded",bgCl,bgCol,0);
                        if(rdbTile !=null && rdbTile.checked==true)
			{
			//SetSeperatorGradient(bgCl,"#FFFFFF");
			}
			else
			{
			
			//SetSeperatorGradient("","");

			}
			//setGradient("tdBodyGradiant1",bgCl,"#FFFFFF",0);
			//setGradient("tdBodyGradiant2","#FFFFFF",bgCl,0);
		}
	}
	//garima 21 nov
	var CLCol=window.parent.document.getElementById('hdnCLColor').value;
	var PageBG=window.parent.document.getElementById('hdnInnerPageBG').value;
	var PageBgColor;
	if(parent.document.getElementById("rbtnCLGradient").checked)
	{
			/*if(CLCol!="#AAAAAA")
			{*/
			
			if(CLCol!="#AAAAAA")
			{
			
			var CL = CLCol;//GetLightColor(CLCol,1.5);
			}
			else
			{
				var CL="#AAAAAA";
			}
			//alert(window.parent.document.getElementById('hdnInnerPageBG').value);
			if(window.parent.document.getElementById('hdnInnerPageBG').value=="#ffffff")
			{
				PageBgColor="#FFFFFF";
			}
			else
			{
				//alert(1);
				PageBgColor= PageBG;//GetLightColor(PageBG,1.6);
			}
		   //var bgCl = GetLightColor(bgCol,1.5);

			//setGradient("DivLoaded",bgCl,"#FFFFFF",0);
			
			//alert(CL);
			//alert(PageBgColor);
			
			SetSeperatorGradient(CL,PageBgColor);

			
			setGradient("tdBodyGradiant1",CL,PageBgColor,0);
			setGradient("tdBodyGradiant2",PageBgColor,CL ,0);			
		
		
	}
	if(parent.document.getElementById("rbtnCLPlain").checked)
	{
		  // alert(document.getElementById('indentmenu').style.height);
			
			SetSeperatorGradient(CLCol,CLCol);
			document.getElementById("tdBodyGradiant1").style.backgroundColor = CLCol;
			document.getElementById("tdBodyGradiant2").style.backgroundColor = CLCol;
			
			//setGradient("tdBodyGradiant1",CLCol,CLCol,0);
			//setGradient("tdBodyGradiant2",CLCol,CLCol,0);
			
	}

	//end

	var FooterBGCol=window.parent.document.getElementById('hdnFooterBackgroundColor').value;
	if(parent.document.getElementById("rdbFooterGradient").checked)
	{
		//alert(2);
		var FooterCl = GetLightColor(FooterBGCol,1.5);
		//alert(FooterCl);
		//setGradient("tdFooter","#FFFFFF",FooterCl,0);
		//setGradient("tdFooter",FooterCl,FooterBGCol,0);
		setGradient("DivPllBizFooter",FooterCl,FooterBGCol,0);
	
	}
//MenuColorChangeInterval();
//ChangeMenuColorForStyleEditor();
}



function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
}
function ViewCoupons(e,RestaurantInfoID)
{
//alert(getQueryVariable("preview"));
if(getQueryVariable("preview")==null)
{
//window.open("../../dev/couponDetails.aspx","_self");
window.open("http://"+document.domain+"/BusinessDetails/couponDetails.aspx?RestaurantInfoID="+RestaurantInfoID,"_self");
}
else
{
window.open("http://"+document.domain+"/BusinessDetails/couponDetails.aspx?RestaurantInfoID="+RestaurantInfoID+"&preview=piyushnema","_self");
}
if(document.all)
  {
  event.returnValue=false;
  }
else
  {
 
  e.preventDefault();
  event.returnValue=false;  
  }


}
function ViewSpecials()
{
window.open("../../dev/GetSpecials.aspx","_self");
event.returnValue=false;
}

function ViewLargeImage(strImageUrlFile,UniqueName)
{
/*
alert(1);
var FileName=document.getElementById('image1').src;
alert("2"+FileName);
var strFileName=FileName.substring(FileName.lastIndexOf('/')+1 ,FileName.length);
alert("3"+strFileName);
window.open("http://"+document.domain+"/BusinessDetails/LargeView.aspx?strUniqueName="+UniqueName+"&strImageUrlFile="+strFileName);
*/


var FileName=document.getElementById('Image1').src;

FileName=FileName.replace("%5C",'/');

var strFileName=FileName.substring(FileName.lastIndexOf('/')+1 ,FileName.length);

window.open("http://"+document.domain+"/BusinessDetails/LargeView.aspx?strUniqueName="+UniqueName+"&strImageUrlFile="+strFileName);

}

var flag=0;

function TestFuction(ResturentInfoID,e)
{

if(flag==0)
{

document.getElementById('trvideo').style.display="";

if(document.getElementById('trPhoto')!=null)
{
document.getElementById('trPhoto').style.display="none";
}
document.getElementById('iframeVideo').style.display="";
//document.getElementById('iframeVideo').src="../../owners/DefaultVideoNew.aspx?RestaurantInfoID="+ResturentInfoID;
document.getElementById('iframeVideo').src="http://"+document.domain+"/BusinessDetails/DefaultVideoNew.aspx?RestaurantInfoID="+ResturentInfoID;
//alert(document.getElementById('iframeVideo').src);
//document.getElementById('iframeVideo').src="http://tablenow.pbhllc.com/owners/DefaultVideo.aspx?RestaurantInfoID="+ResturentInfoID;
document.getElementById('linkVideoGallery').innerHTML="View Photo";
flag=1;

}
else
{

document.getElementById('trvideo').style.height="0px";
document.getElementById('trvideo').style.display="none";
if(document.getElementById('trPhoto')!=null)
{
document.getElementById('trPhoto').style.display="";
}
document.getElementById('iframeVideo').style.display="none";
document.getElementById('iframeVideo').src="";

document.getElementById('linkVideoGallery').innerHTML="View Video";
flag=0;

}


if(document.all)
  {
  event.returnValue=false;
  }
else
  {

  e.preventDefault();
  event.returnValue=false;  
  }

}

/*
function TestFuction(ResturentInfoID)
{

if(flag==0)
{

document.getElementById('trvideo').style.display="block";
document.getElementById('trPhoto').style.display="none";
document.getElementById('iframeVideo').style.display="block";
document.getElementById('iframeVideo').src="../../owners/DefaultVideo.aspx?RestaurantInfoID="+ResturentInfoID;
//document.getElementById('iframeVideo').src="http://tablenow.pbhllc.com/owners/DefaultVideo.aspx?RestaurantInfoID="+ResturentInfoID;
document.getElementById('linkVideoGallery').innerText="View Photo";
flag=1;
}
else
{
document.getElementById('trvideo').style.height="0px";
document.getElementById('trvideo').style.display="none";
document.getElementById('trPhoto').style.display="block";

document.getElementById('iframeVideo').style.display="none";
document.getElementById('iframeVideo').src="";

document.getElementById('linkVideoGallery').innerText="View Video";
flag=0;
}

event.returnValue=false;

}
*/

function PrintPage()
{ 
  //if(confirm('To print this page, click OK'))
    //  {
    //getElementById("imgNorth")
//alert(document.all.mapRestaurant.src);
    window.print();

 //   }

event.returnValue=false;    
}

var flg=0;
function GetPhotoGallery(DetailFrame,e)
{
var FrameName=document.getElementById(DetailFrame);
if(flg==0)
{
		
		FrameName.src="RestaurantImagesBlist.aspx";
		FrameName.style.height="80px";
		if(document.all)
				{
				document.getElementById('tdPhoto').style.display="block";
				FrameName.style.display="block";
				}
				else
				{
				document.getElementById('tdPhoto').style.display="";
				FrameName.style.display="";
				e.preventDefault(); 

				
				}
		
		event.returnValue=false;
		document.getElementById('lnkPhotoGallery').innerText="Hide Photo Gallery";
		flg=1;
}
else
{
flg=0;

		FrameName.src="";


document.getElementById('lnkPhotoGallery').innerText="Photo Gallery";
document.getElementById('tdPhoto').style.display="none";

		event.returnValue=false;


}
		
}

function ShowLargerMap(strAddress,strCityState)
	{
		//var uri = "";
		//var mapAddress=document.getElementById("hdn1").value;
		
		// Source = 1: To directions
		//uri = "http://maps.google.com/maps?longitude=" + longitude + "&latitude=" + latitude;
		uri = "http://maps.google.com/maps?saddr=" + strAddress + "%2c+" + strCityState;
		
		//uri = "http://www.ll247.com/go.aspx?site=437&ver=1.0&act=getmapdirections&cat=profile&cs=2&cid=4357ec03-ae8b-4c09-be7d-e1e9bc2ea8f8&sid=007c5226-64fd-4899-b900-f6da12d881a3&step=1&to=" + escape(uri);
		window.open(uri, "googlemap");
		event.returnValue=false;

	}

function Send2Friend(DetailFrame,RestaurantInfoID,e)
{
		
		document.getElementById('tdframe').style.display="block";
		var FrameName=document.getElementById(DetailFrame);
		FrameName.style.display="block";
		FrameName.style.height="300px"
		FrameName.src="SendtoFriend.aspx";
		event.returnValue=false;
		
}


function GetSend2Cell(DetailFrame,RestaurantInfoID,CSSPath,e)
{
//alert(CSSPath);
	var FrameName=document.getElementById(DetailFrame);
	FrameName.style.height="100px";
	//alert(document.domain);

	FrameName.src="http://"+document.domain+"/BusinessDetails/send.aspx?RestaurantInfoID="+RestaurantInfoID+"&CSSPath="+CSSPath;
	//alert(FrameName.src);
		if(document.all)
				{	
		
		document.getElementById('tdframe').style.display="block";
		
		FrameName.style.display="block";
		}
		else
		{
		document.getElementById('tdframe').style.display="";
		
		FrameName.style.display="";
		e.preventDefault(); 
		}
		
		event.returnValue=false;
		
		
}

function SendEmail(DetailFrame,RestaurantInfoID,CSSPath,e)
{
		var FrameName=document.getElementById(DetailFrame);
		FrameName.style.height="190px"
		FrameName.src="http://"+document.domain+"/BusinessDetails/EmailUs.aspx?CSSPath="+CSSPath;
		
		if(document.all)
				{	

		document.getElementById('tdframe').style.display="block";
		
		FrameName.style.display="block";
		}
		else
		{
		document.getElementById('tdframe').style.display="";
		
		FrameName.style.display="";
		e.preventDefault(); 


		}
		
		event.returnValue=false;
		
}


function GetMap(ResturentInfoID,longitude,latitude)
{
		
		//document.getElementById('tdframe').style.display="block";
		//var FrameName=document.getElementById(DetailFrame);
		//FrameName.src="http://tablenow.pbhllc.com/tablenowinfo-map-iframe.aspx?&amp;longitude="+longitude+"&amp;latitude="+latitude+"&amp;radius=2&amp;RestaurantInfoID="+ResturentInfoID;
		window.open("http://tablenow.pbhllc.com/tablenowinfo-map-iframe.aspx?&amp;longitude="+longitude+"&amp;latitude="+latitude+"&amp;radius=2&amp;RestaurantInfoID="+ResturentInfoID);
		//FrameName.src="http://tablenow.pbhllc.com/tablenowinfo-map-iframe.aspx?&amp;longitude="+longitude+"&amp;latitude="+latitude+"&amp;radius=2&amp;RestaurantInfoID="+ResturentInfoID;
		event.returnValue=false;
		//event.returnValue=false;
	
}

function GetDirection(DetailFrame,RestaurantInfoID,e,color)
{
		if(color==null)
		{
		color="ffffff";
		}
		//document.getElementById('tdframe').style.display="block";
		var FrameName=document.getElementById(DetailFrame);
		
		FrameName.style.height="100px"
		FrameName.src="http://"+document.domain+"/BusinessDetails/DrivingDirection.aspx?RestaurantInfoID="+RestaurantInfoID+"&color="+color;
		if(document.all)
				{	

				FrameName.style.display="block";
				}
				else
				{
				FrameName.style.display="";
				e.preventDefault(); 



				}
		event.returnValue=false;
	
}



function get()
{
	var FrameName=document.getElementById('map');
	//alert(FrameName);	
	document.getElementById('map').style.display="block";
	document.getElementById('map').style.height="120px"
//		window.open("DrivingDirection.aspx?RestaurantInfoID="+123); 
	document.getElementById('map').src="DrivingDirection.aspx?RestaurantInfoID="+123;
		//alert(FrameName.src);
		event.returnValue=false;
}
function openurl(url)
{
	//var website="http:\\"+url;
	window.open('http://'+url);
	event.returnValue=false;
}

function ShowCommentsMessage()
{
	var Ref = window.location.href;

	if(Ref.toLowerCase().indexOf('sm=1')>-1)
	{
		alert('Thank you for your comment!\nYour Comment will be published after reviewing.');
	}
}

function validateBlogComment(AuthorCtrlID,EmailCtrlID,CommentCtrlID,e)
{
	var strError = "";
	var author = trim(document.getElementById(AuthorCtrlID).value);
	var email = trim(document.getElementById(EmailCtrlID).value);
	var comment = trim(document.getElementById(CommentCtrlID).value);

	if(author == "")
	{
		strError += "Please enter name\n";
	}

	if(email == "")
	{
		strError += "Please enter email\n";
	}
	else if(!fnCheckValidEmail(EmailCtrlID))
	{
		strError += "Please enter valid email\n";
	}

	if(comment == "")
	{
		strError += "Please enter comment\n";
	}

	if(strError != "")
	{
		alert(strError);
		noPostBack(e);
	}

}

function fnCheckValidEmail(objFormFieldID)
			{
				var obj=document.getElementById(objFormFieldID);
				var regMail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/
				if(regMail.test(obj.value)==false)
					return(false);
				else
					return(true);
			}
			
			function noPostBack(e)
			{
				if(document.all)
				{
					event.returnValue = false;
				}
				else
				{
					e.preventDefault();
					event.returnValue = false;
				}
		
			}
			
	function trim(str)
            {
             
                if(!str || typeof str != 'string')
                    return '';

                return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');
            }

function checkMaxLength(textBox,e, length)
{
		var val = "";

if(textBox == 'Comments')
{
	val = document.getElementById(textBox).value;
}
else
{
val = textBox.value;
}
    if(val.length>length)
    {
	if(textBox == 'Comments')
	{
	document.getElementById(textBox).value=val.substring(0,length);
	}
	else
	{
    	textBox.value = val.substring(0,length);
	}
    }    
       
}

/*function validateLeadGenForm(frmID,e)
{
	var strError = "";
	
	var ofrm = document.forms[frmID];
	var nameCtrl = ofrm.elements["Name"];
	var emailCtrl = ofrm.elements["Email"];
	var phoneCtrl = ofrm.elements["Phone"];		
	

	if(nameCtrl != null && trim(nameCtrl.value) == "")
	{
		strError += "Please enter name\n";
	}
    if(emailCtrl != null)
    {
        var email = trim(emailCtrl.value);
	    if(email == "")
	    {
		    strError += "Please enter email\n";
	    }
	    else if(!fnCheckValidEmail2(email))
	    {
		    strError += "Please enter valid email\n";
	    }
    }
    if(phoneCtrl != null)
    {
        var phone = trim(phoneCtrl.value);
	    if(phone == "")
	    {
		    strError += "Please enter phone\n";
	    }
	    else
	    {
	        if ((CheckValidPhoneNumber('Phone')== false)||(phone.length<10 ))
							{
							
								strError +="Please enter a valid Phone Number\n";	
								phoneCtrl.value = "";
							}

	    }
    }
	if(strError != "")
	{
		alert(strError);
		noPostBack(e);
	}

}*/

/* * */

function validateLeadGenForm(frmID, e) {
    var strError = "";
    var ofrm = document.forms[frmID];
    var nameCtrl = ofrm.elements["Name"];
    var emailCtrl = ofrm.elements["Email"];
    var phoneCtrl = ofrm.elements["Phone"];
var captchaCtrl = ofrm.elements["txtCaptcha"];


    if (nameCtrl != null && trim(nameCtrl.value) == "") {
        strError += "Please enter name\n";
    }
    if (emailCtrl != null) {
        var email = trim(emailCtrl.value);
        if (email == "") {
            strError += "Please enter email\n";
        }
        else if (!fnCheckValidEmail2(email)) {
            strError += "Please enter valid email\n";
        }
    }
    if (phoneCtrl != null) {
        var phone = trim(phoneCtrl.value);
        if (phone == "") {
            strError += "Please enter phone\n";
        }
        else {
            if ((CheckValidPhoneNumber('Phone') == false) || (phone.length < 10)) {

                strError += "Please enter a valid Phone Number\n";
                phoneCtrl.value = "";
            }

        }
    }

if (captchaCtrl != null && trim(captchaCtrl.value) == "") {
        strError += "Please enter security code\n";
    }

    if (strError != "") {
        alert(strError);
        noPostBack(e);
    }
    else{
    //Added by Pratigya 16/12/2010 Start
        
        var hdnEmailTo = trim(document.getElementById('hdnEmailTo').value);
        var hdnRestaurantInfoID  = trim(document.getElementById('hdnRestaurantInfoID').value);

        var Name = ((document.getElementById('Name')!=null)?trim(document.getElementById('Name').value):"");
        var Phone = ((document.getElementById('Phone')!=null)?trim(document.getElementById('Phone').value):"");
        var Email = ((document.getElementById('Email')!=null)?trim(document.getElementById('Email').value):"");
        var Comments = ((document.getElementById('Comments')!=null)?trim(document.getElementById('Comments').value):"");
        var txtCaptcha = trim(document.getElementById('txtCaptcha').value);
        

        var postData = "hdnEmailTo=" + hdnEmailTo + "&hdnRestaurantInfoID=" + hdnRestaurantInfoID + ( (document.getElementById('Name') != null)?"&Name=" + Name:"" ) + ( (document.getElementById('Phone') != null)?"&Phone=" + Phone:"" ) + ( (document.getElementById('Email') != null)?"&Email=" + Email:"" ) + ( (document.getElementById('Comments') != null)?"&Comments=" + Comments:"" ) + "&txtCaptcha=" + txtCaptcha;

			var xmlHttp;
			if(navigator.appName == "Microsoft Internet Explorer") 
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			else
			{
				xmlHttp = new XMLHttpRequest();
			}

			var url="http://"+document.domain+"/BusinessDetails/SendLeadGenEmail.aspx";              // Live Path

        	xmlHttp.open("POST",url,false);
        	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        	xmlHttp.send(postData);

			pause(2000);


        	     if(xmlHttp.responseText=="2")
			{
					//document.getElementById('trMessage').style.display="";
					document.getElementById('lblMessage').innerHTML = "Sorry, invalid verification.<br> Please retry.";
					document.getElementById('txtCaptcha').value = "";
	            }
	            else
	            {
	            //document.getElementById('trMessage').style.display = "";
				document.getElementById('lblMessage').innerHTML = "Thank you!";
				if(document.getElementById('Name') != null)
				{
					document.getElementById('Name').value = "";
				}
				if(document.getElementById('Phone') != null)
				{
					document.getElementById('Phone').value = "";
				}
				if(document.getElementById('Email') != null)
				{
					document.getElementById('Email').value = "";
				}
				if(document.getElementById('Comments') != null)
				{
	            			document.getElementById('Comments').value = "";
				}
				document.getElementById('txtCaptcha').value = "";
	            }

setDivHeight(0);
				
		document.getElementById('imgCaptcha').src="../BusinessDetails/LeadGenCaptcha.aspx?" +Math.random();
			    
			
      }	
      

}

function pause(millisecondi)
    {
        var now = new Date();
        var exitTime = now.getTime() + millisecondi;

        while(true)
        {
            now = new Date();
            if(now.getTime() > exitTime) return;
        }
    }

/* * */

function CheckValidPhoneNumber(id)
			{
				var	nIndex;
				var	sString = new String('');
				var	bError = false;
				var objFormField=document.getElementById(id);
				if(objFormField.value.length > 0 )
				{
					for( nIndex = 0; nIndex < objFormField.value.length; ++nIndex )
					{
						if( ( objFormField.value.charAt(nIndex) >= '0' ) && ( objFormField.value.charAt(nIndex) <= '9' ) )
							{
							sString = sString + objFormField.value.charAt(nIndex);
							}
						
							
					}
					
					objFormField.value =sString;
					
					if( sString.length < 10 )
					{					
					//p	objFormField.value = "";
					//p	objFormField.focus();	
						return(false);
					}

					// Format the phone number
					if( sString.length >= 10 )
						objFormField.value = '(' + sString.substring(0,3) + ') ' + sString.substring(3,6) + '-' + sString.substring(6,10);
						
				}
				return(true);
		}

function fnCheckValidEmail2(objFormFieldVal)
			{
				//var obj=document.getElementById(objFormFieldID);
				var regMail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/
				if(regMail.test(objFormFieldVal)==false)
					return(false);
				else
					return(true);
			}

function initCornersCoupon() {
			var setting = {
			tl: { radius: 20 },
			tr: { radius: 20 },
			bl: { radius: 20 },
			br: { radius: 20 },
			antiAlias: true
			}
			curvyCorners(setting, ".roundedCornersCoupon");
UnHideAllDiv('roundedCornersCoupon');
			}


function initCorners() {
			var setting = {
			tl: { radius: 20 },
			tr: { radius: 20 },
			bl: { radius: 20 },
			br: { radius: 20 },
			antiAlias: true
			}
			try
			{
			curvyCorners2(setting, ".LeadGenBox");
			document.getElementById('divLeadGen').style.display = '';
			//UnHideAllDiv('LeadGenBox');
			}
			catch(ex)
			{}
			}

function UnHideAllDiv(CssClass) {
var arrayOfDivs = document.getElementsByTagName('div');
var howMany = arrayOfDivs.length;

for (var i=0; i < howMany; i++) {
var thisDiv = arrayOfDivs[i];
var styleClassName = thisDiv.className;
if (styleClassName == CssClass) {
thisDiv.style.display='';

}
}
}

function setDivHeight(flag)
		{
		
			if(document.getElementById('divLeadGen') != null)
			{
				var ht = document.getElementById('divLeadIn').offsetHeight;
								
				var htmlp = document.getElementById('divLeadIn').innerHTML;					
				
				/*if(document.getElementById('divLeadGen').offsetHeight < ht || flag==1)
				{
				
			ht = ht+5;*/
				
				document.getElementById('divLeadOut').innerHTML = "";				
					
				var htmlPre = "<div id=\"divLeadGen\" class=\"LeadGenBox\" align=\"center\" style=\"display:none;\">"+
				"<div id=\"divLeadIn\" style=\"width:322px;\">"+
				htmlp +
				"</div>"+
				"</div>";				
				document.getElementById('divLeadOut').innerHTML =htmlPre;
				
				initCorners();
				
				/*}*/
			}
		}
		var MColor = "", RInfoID = "", MaxMenuCharLmt = "";
function ChangeMenuPreview(RID, MaxMenuChar, MenuColor)
{
//alert(1);
MColor = MenuColor;
RInfoID = RID;
MaxMenuCharLmt = MaxMenuChar;
    if(document.getElementById('indentmenu') != null)
    {
        document.getElementById('indentmenu').innerHTML = "";
        loadXMLDocMenu2("http://"+document.domain+"/BusinessOwners/MenuForPreview.aspx?option=0&RestaurantInfoID="+RID+"&MaxMenuChar="+MaxMenuChar,"0");
        //pause(3000);
        //loadXMLDocMenu("http://"+document.domain+"/BusinessOwners/MenuForPreview.aspx?option=1&RestaurantInfoID="+RID+"&MaxMenuChar="+MaxMenuChar,"1", MenuColor);
        //pause(7000);
    /*    var jsname = findMenuJS();
       // alert(jsname);
        jsname = jsname.replace(".js","_preview.js");
        
        loadjscssfile(jsname,"js");*/
               
    }
}

function findMenuJS() 
{     
    var scripts = document.getElementsByTagName('script');
  
 var i=0;

 var index = scripts.length - 1;

 for(i=0;i<scripts.length;i++)
    {
    if(scripts[i].src.indexOf('MenuScript_')!=-1)
      {
      index =i;
      break;
      }
    }
 
 var myScript = scripts[index];  

 return myScript.src;
}

function loadjscssfile(filename, filetype){
 if (filetype=="js"){ //if filename is a external JavaScript file
  var fileref=document.createElement('script')
  fileref.setAttribute("type","text/javascript")
  fileref.setAttribute("src", filename)
 }
 else if (filetype=="css"){ //if filename is an external CSS file
  var fileref=document.createElement("link")
  fileref.setAttribute("rel", "stylesheet")
  fileref.setAttribute("type", "text/css")
  fileref.setAttribute("href", filename)
 }
 if (typeof fileref!="undefined")
    document.getElementById('myhead').insertBefore(fileref,document.getElementById('stylesheet0'));
  //document.getElementsByTagName("head")[0].appendChild(fileref)
      
}


var req;
var req2;

function loadXMLDocMenu(url, option) 
{
	req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest && !(window.ActiveXObject)) 
    {
    	try 
    	{
			req = new XMLHttpRequest();
        } 
        catch(e) 
        {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } 
    else if(window.ActiveXObject) 
    {
       	try 
       	{
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} 
      	catch(e) 
      	{
        	try 
        	{
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} 
        	catch(e) 
        	{
          		req = false;
        	}
		}
    }
	if(req) 
	{
	    if(option == "1")
	    {
	    
		    req.onreadystatechange = processReqChangeMenu;
		       
		}
		else
		{
		
		    req.onreadystatechange = processReqChangeMenu2;
		    
		}
		req.open("GET", url, true);
		req.send("");
	}
}

function loadXMLDocMenu2(url, option) 
{
	req2 = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest && !(window.ActiveXObject)) 
    {
    	try 
    	{
			req2 = new XMLHttpRequest();
        } 
        catch(e) 
        {
			req2 = false;
        }
    // branch for IE/Windows ActiveX version
    } 
    else if(window.ActiveXObject) 
    {
       	try 
       	{
        	req2 = new ActiveXObject("Msxml2.XMLHTTP");
      	} 
      	catch(e) 
      	{
        	try 
        	{
          		req2 = new ActiveXObject("Microsoft.XMLHTTP");
        	} 
        	catch(e) 
        	{
          		req2 = false;
        	}
		}
    }
	if(req2) 
	{
	    
		req2.onreadystatechange = processReqChangeMenu2;
		
		req2.open("GET", url, true);
		req2.send("");
	}
}
/*GetLightCOlor function New End*/

function GetLightColorNew(DarkColor,Ratio)
		{
		DarkColor=new String(DarkColor);
			//var =1.5;
			
			
			LightColor =new String('');
			Red=new String('');
			Green=new String('');
			Blue=new String('');
			
			DarkColor=DarkColor.replace('#','');

			if(DarkColor.length==6)
			{
                Red=DarkColor.substring(0,2);
                Green=DarkColor.substring(2,4);
                Blue=DarkColor.substring(4,6);


                iRed=parseInt(parseFloat(parseInt(Red,16)));
                iGreen=parseInt(parseFloat(parseInt(Green,16))); 
                iBlue=parseInt(parseFloat(parseInt(Blue,16))); 

                var r = iRed%256;
                var g = iGreen%256;
                var b = iBlue%256;
                if(parseInt(Ratio)<50)
                {
                for(var i=50;i>=parseInt(Ratio);i--)
                {
                r-=5;
                g-=5;
                b-=5;
                }

                if(parseInt(r)<0)
                {
                r = 0;
                }

                if(parseInt(g)<0)
                {
                g = 0;
                }

                if(parseInt(b)<0)
                {
                b = 0;
                }
                }

                if(parseInt(Ratio)==50)
                {

                }
                if(parseInt(Ratio)>50)
                {
                for(var i=50;i<=parseInt(Ratio);i++)
                {
                r+=5;
                g+=5;
                b+=5;
                }

                if(parseInt(r)>255)
                {
                r = 255;
                }

                if(parseInt(g)>255)
                {
                g = 255;
                }

                if(parseInt(b)>255)
                {
                b = 255;
                }
                }



                iRed = r;
                iGreen = g;
                iBlue = b;

                Red=from10toradix(iRed, 16); 

                Green=from10toradix(iGreen, 16);
                Blue=from10toradix(iBlue, 16);

                if(Red.length==1)
                {
                Red="0"+Red;
                }
                if(Green.length==1)
                {
                Green="0"+Green;
                }
                if(Blue.length==1)
                {
                Blue="0"+Blue;
                }
                LightColor="#"+Red+Green+Blue;
              
              
			}

			return LightColor;
		}
/*GetLightCOlor function New End*/


function processReqChangeMenu() 
{   
    if (req.readyState == 4) 
    { 
        if (req.status == 200) 
        {        
           
           // alert(3);
            var kk = req.responseText;
            
            var jsname = findMenuJS();
       // alert(jsname);
        jsname = jsname.replace(".js","_preview.js");
        jsname = jsname + "?dt=" + Date()
        loadjscssfile(jsname,"js");
            pause(2000);
            
            var ss = document.getElementById('indentmenu').innerHTML;
        	  var ctr = 0;
        	while(ss.indexOf('</div>')>-1)
        	{
        		ctr++;
        		ss = ss.replace('</div>','');
        	}
        	
        	var ht =ctr*30;//change 29 to 30 garima because menu bottom line doesn't show in style editor;
        	if(parent.document.getElementById("hdnPageBorder").value == "1")
        	{
        	document.getElementById('indentmenu').style.height = ht;
        	}
        	  /*if(parent.document.getElementById('rdbMenuGradient') != null && parent.document.getElementById('rdbMenuGradient').checked)
				{
					var indentCl = GetLightColor(MColor,1.5);					
					setGradient("indentmenu",indentCl,MColor,0);
				}    */  
            
            if(parent.document.getElementById('rdbMenuGradient') != null && parent.document.getElementById('rdbMenuGradient').checked)
				{
					var MColor=window.parent.document.getElementById('hdnMenuColor').value;
					var indentCl = GetLightColor(MColor,1.5);		
					var IsRoundedMenu=window.parent.document.getElementById('hdnIsRoundedMenu').value;
					if(parseInt(window.parent.document.getElementById('hdnMenuRadiusValue').value)>0)
                    {
                        IsRoundedMenu = 1;
                    }
                    else
                    {
                        IsRoundedMenu = 0;
                    }
					if(IsRoundedMenu==0)
					{
					    	
					var ratio = 0;
					ratio = parent.document.getElementById("txtMenuGrdValue").value;
					//ratio = ratio/50;
					var indentCl = GetLightColorNew(MColor,ratio);
					parent.document.getElementById("hdnMenuLightColor").value=indentCl ;
					setGradient("indentmenu",indentCl,MColor,0);
					}
					else
					{
						if(document.all)
	   					 {
	   					 	var MColor=window.parent.document.getElementById('hdnMenuColor').value;

	   					 	var ratio = 0;
							ratio = parent.document.getElementById("txtMenuGrdValue").value;
							//ratio = ratio/50;
							var indentCl = GetLightColorNew(MColor,ratio);
							parent.document.getElementById("hdnMenuLightColor").value=indentCl ;
	   					 	
	   					 	setGradient("indentmenu",indentCl,MColor,0);

	   					 }

					}

				}
				
				gradientCallInFF();
				
           // alert(kk);
          
			// ...processing statements go here...
        } 
    }
    
}



function processReqChangeMenu2() 
{   
    if (req2.readyState == 4) 
    {
        // only if "OK"        
        if (req2.status == 200) 
        {              
        	  document.getElementById('indentmenu').innerHTML = req2.responseText ;   //alert(MColor);
        	  loadXMLDocMenu("http://"+document.domain+"/BusinessOwners/MenuForPreview.aspx?option=1&RestaurantInfoID="+RInfoID+"&MaxMenuChar="+MaxMenuCharLmt,"1");
        	  var ss = document.getElementById('indentmenu').innerHTML;
        	  var ctr = 0;
        	while(ss.indexOf('</div>')>-1)
        	{
        		ctr++;
        		ss = ss.replace('</div>','');
        	}
        	
        	var ht =ctr*30;//change 29 to 30 garima because menu bottom line doesn't show in style editor;
        	
        	/*document.getElementById('indentmenu').style.height = ht;
        	
        	  if(parent.document.getElementById('rdbMenuGradient') != null && parent.document.getElementById('rdbMenuGradient').checked)
				{
					var indentCl = GetLightColor(MColor,1.5);					
					setGradient("indentmenu",indentCl,MColor,0);
				}    */    	 
			// ...processing statements go here...
        } 
    }




    
}



function SetSeperatorGradient( ColorCodetdBodyGradiant1,ColorCodetdBodyGradiant2)
	{

		var a=navigator.userAgent;

		if (a.indexOf("Chrome") > -1) {

		    var offh = document.getElementById("table2").offsetHeight;
		    var OffHtdBodyGradiant = offh / 2;
		    if (document.getElementById("tdSeperator") != null) {
		        document.getElementById("tdSeperator").style.height = "100" + "px";
		        //document.getElementById("tblSeperator").style.height="100"+"px";				
		        document.getElementById("tdBodyGradiant2").style.height = (OffHtdBodyGradiant) + "px";
		        document.getElementById("tdBodyGradiant1").style.height = OffHtdBodyGradiant + "%";


		        if ((ColorCodetdBodyGradiant1 != '') && (ColorCodetdBodyGradiant2 != '')) {
		            document.getElementById("tdBodyGradiant1").style.backgroundColor = ColorCodetdBodyGradiant1;
		            document.getElementById("tdBodyGradiant2").style.backgroundColor = ColorCodetdBodyGradiant1;
		            document.getElementById("tdBodyGradiant2").style.background = ColorCodetdBodyGradiant1;
		            document.getElementById("tdBodyGradiant1").style.background = ColorCodetdBodyGradiant1;
		        }
		    }


		}
		else
		{
		//document.getElementById("tdSeperator").style.height="100"+"%";	

			//var offh=document.getElementById("table2").offsetHeight;				
		//	var OffHtdBodyGradiant=offh/2;			
			//document.getElementById("tdSeperator").style.height="100"+"%";	
			//document.getElementById("tblSeperator").style.height="100"+"%";				
			//document.getElementById("tdBodyGradiant2").style.height=(OffHtdBodyGradiant+1)+"%";
			//document.getElementById("tdBodyGradiant1").style.height=OffHtdBodyGradiant+"%";	
			//document.getElementById("tdSeperator").style.height="100%";
			//setGradient("tdBodyGradiant1",ColorCodetdBodyGradiant1,ColorCodetdBodyGradiant2,0); 
			//setGradient("tdBodyGradiant2",ColorCodetdBodyGradiant2,ColorCodetdBodyGradiant1,0);


		}
		
	}

function ApplyGradient(MenuColor,indentCl)
	{
		//alert(MenuColor);
		//alert(indentCl);
	    if(document.all)
	    {	    
	        //setGradient("indentmenu",indentCl,MenuColor,0);
	        var divEls = document.getElementsByTagName("div");
				    var i = 0;
				    for(i=0;i<divEls.length;i++)
				    {				
				        if(divEls[i].id.indexOf("domMenu")!=-1)
				        {
				            setGradient(divEls[i].id,indentCl,MenuColor,0);	
				        }
			        }
	    }
	}

		
		

	//added for privay policy mail
		function validatePrivacyPolicyForm(frmID, e) 
{
	
    var strError = "";
    var ofrm = document.forms[frmID];
    var PrivacyPolicyMail = ofrm.elements["PrivacyPolicyMail"];   
	if(PrivacyPolicyMail != null && (trim(PrivacyPolicyMail.value) == ""))
	{
		strError += "Please enter email\n";
	}
	else if(trim(PrivacyPolicyMail.value) != "")
	{
		if (!fnCheckValidEmail2(PrivacyPolicyMail.value)) 
		{
		 strError += "Please enter valid email\n";
		}
	}
	if(strError!="")
	{
		 alert(strError);
		 noPostBack(e);
	}
	else
	{
		var flag=confirm('Are you sure to unsubscribe ?');
		
		  var PrivacyPolicyMail = ((document.getElementById('PrivacyPolicyMail')!=null)?trim(document.getElementById('PrivacyPolicyMail').value):"");
		  var RestaurantInfoID= ((document.getElementById('hdnRestaurantInfoID')!=null)?trim(document.getElementById('hdnRestaurantInfoID').value):"");
			if(PrivacyPolicyMail!="" && flag==true)
			{
			
				 var postData = "PrivacyPolicyMail="+PrivacyPolicyMail+"&hdnRestaurantInfoID="+RestaurantInfoID;
				 var xmlHttp;
				 if(navigator.appName == "Microsoft Internet Explorer") 
					{
						xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
					}
					else
					{
						xmlHttp = new XMLHttpRequest();
					}

				var url="http://"+document.domain+"/BusinessDetails/UnSubscribedEmail.aspx";              // Live Path

				xmlHttp.open("POST",url,false);
				xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
				xmlHttp.send(postData);
				pause(2000);
				//document.getElementById('lblMessage').innerHTML ="Mail sent Successfully for Unsubscription.";	
				//	alert(xmlHttp.responseText);
					//alert(document.getElementById('lblMessage').innerHTML);
				if(xmlHttp.responseText.indexOf('Successful')>-1)
				{
				//alert(2);

					document.getElementById('lblMessage').innerHTML ="Mail sent successfully for unsubscription.";	
					document.getElementById('PrivacyPolicyMail').value="";			
				
				}
			}
	
	}  
    



}

/*function to call all onload function again */
function parentOnLoad()
    {    
        var ss = window.onload;
        ss = ss.toString();
        var s = ss.split(';');
        var st = "";
        for(i=0; i<s.length; i++)
        {
            if(s[i].toLowerCase().indexOf("setgradient")>-1 || s[i].toLowerCase().indexOf("setseperatorgradient")>-1)
            {
                eval(s[i]);
                st += s[i] + "; ";

            }
       //alert(s[i]);
        }
        

    }
    
    var grm;

    function MenuColorChangeInterval() 
    {
    
       //alert(1);
        var BrowserURL = document.location.href;
        if(BrowserURL.indexOf("Preview_")!=-1)
        {
	        var a=navigator.userAgent;
	
	        if (a.indexOf("Chrome") > -1) {
	
	            grm = setInterval(ChangeMenuColor, 100);
	
	        }
	        else 
	        {
	            grm = setInterval(ChangeMenuColor, 500);
	        }
	     }
	     else
	     {
	     	//ChangeMenuColor();
	     	grm = setInterval(ChangeMenuColor, 200);

	     } 
    }
   
    function ChangeMenuColor() 
    {
   // alert(2);
   
   	// alert(document.getElementById('hdnPageName').value);
   	var CurrentPageName="";
   	 if (document.getElementById('hdnPageName')!=null) 
		 {
				    	
   			CurrentPageName=document.getElementById('hdnPageName').value;
   		}
        
        var ss = document.getElementById('indentmenu').innerHTML;
		// alert(document.getElementById('domMenu_main0').offsetWidth);
        var HomeSelect = 0;
        var HomePageID = 0;
     
       /* var BrowserURL = window.location.href;
         BrowserURL = BrowserURL.substring(BrowserURL.lastIndexOf("/") + 1);
        BrowserURL = BrowserURL.substring(0, BrowserURL.indexOf("_"))*/
       // alert(BrowserURL);
       
       var Title = document.title;
         Title = Title.substring(0, Title.indexOf("-"));
		//alert(Title);

                  
            var divEls = document.getElementsByTagName("td");
				    var i = 0;
				    for(i=0;i<divEls.length;i++)
				    {				
				        if(divEls[i].id.indexOf("domMenu")!=-1)
				        {
				       		 var PageName = divEls[i].innerHTML.toLowerCase().substring(0, divEls[i].innerHTML.toLowerCase().indexOf("</nobr>"));
     				            PageName = RemoveExtras(PageName);
  				            if (PageName.toLowerCase() == "home") 
				            {
				            
								HomePageID =divEls[i].id;				            	
				            	 //HomePageID=(divEls[i].id.substring((divEls[i].id).indexOf("-")+1));

				                //HomePageID = i;
				               // alert(HomePageID);

				            }
				          	//alert(trim(PageName.toLowerCase()));
				          	//alert(trim(Title.toLowerCase()));
				            if (trim(PageName.toLowerCase()) == trim(CurrentPageName.toLowerCase())) 
				            {
				               				            	
								var MenuID=divEls[i].id.substring(divEls[i].id.indexOf("-")+1);
								//alert(MenuID);		
								if(MenuID!=1)
								{		
				         		 	document.getElementById(divEls[i].id).className = "MenuColorChange";
				         		 	 HomeSelect = 1
				         		 }
				         		 else
				         		 {
				         		 	//alert(document.getElementById(divEls[i].id).style.padding-left);
				         		 	document.getElementById(divEls[i].id).className = "MenuColorChange";
				         		 	
				         		 	 HomeSelect = 1
				         		 }
				         		
				               // alert(document.getElementById('indentmenu').innerHTML);

				            }
                
				            
				            
				        }
				    }
				    if (document.getElementById('hdnPageName')==null) 
				    {
				    	
						   var MenuID=HomePageID.substring(HomePageID.indexOf("-")+1);
						   //alert(MenuID);
						   /*if(MenuID!=1)
							{*/
								//alert(MenuID);
								document.getElementById(HomePageID).className = "MenuColorChange";

							/*}*/
					  }
			        
        }
    



		//end 







