
var divStatus = 'close';
var testwindow = null;

var currLinks = new Object;  
function toggleActive(elm) 
{
  var group = document.getElementById(elm).className;  
  var old = currLinks[group]; 
  if(old)
    old.className = document.getElementById(elm).className.replace(/\bactive\b/,''); 
 
  currLinks[group] = document.getElementById(elm); 
  document.getElementById(elm).className += "current"; 
} 


function setSession(hdnValue)
{  
//   document.getElementById('ctl00_hdnSet').value=hdnValue;
//   
//   alert(document.getElementById('ctl00_hdnSet').value);
//    ImageProcess.SetTabImageSession(hdnValue);
}



function PageLoadSelect(id)
{
 var elm = document.getElementById(id);
  var group = elm.className; 
 elm.className += "active";  
 currLinks[group] =elm ; 
}


//- - --  ----------- Pop windows-------------------------------------
function popNewsonclick()
        {
         var w= 540;
        var h= 400;
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
        testwindow= window.open ("ShowNews.aspx" , 'mywindow',winprops);

        }
function popHFonclick()
        {
         var w= 540;
        var h= 400;
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
        testwindow= window.open ("ShowOffers.aspx" , 'mywindow',winprops);

        }

function popUCEonclick()
        {
         var w= 540;
        var h= 400;
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
        testwindow= window.open ("ShowEvents.aspx" , 'mywindow',winprops);

        }
        
 function poponclick(path)
        {
      //  alert('javasript');
         var w= 540;
        var h= 400;
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
         if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
        testwindow= window.open ("RatingAndReviesDetails.aspx?RestaurantID=" + path, 'mywindow',winprops);

        }

function poponclick1(path)
        {
        var w= 540;
        var h= 400;
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
         if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
        testwindow= window.open ("Offer Details.aspx?OfferID=" + path, 'mywindow',winprops);
   
        }
        
        function poponclickNews(path)
        {
         var w= 418;
    var h= 400;
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
        testwindow= window.open ("NewsandGossipDeatails.aspx?newsid=" + path, 'mywindow',winprops);
 
        }
        
function poponclickEvent(path)
        {
       
         var w= 540;
         var h= 400;
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
        testwindow= window.open ("EventDesc.aspx?eventid=" + path, 'mywindow',winprops);
  
        }
        
        
        

function popAboutUs()
        {
         var w= 418;
        var h= 400;
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
         if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
        testwindow= window.open ("static.aspx?pg=AboutUs", 'mywindow',winprops);
        
        }
        
function popContactUs()
{
//alert(testwindow);
    var w= 540;
     var h= 400;
     var winl = (screen.width - w) / 2;
     var wint = (screen.height - h) / 2;
     winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
      if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
     testwindow= window.open ("static.aspx?pg=ContactUs", 'mywindow',winprops);
 
}

function popPrivacy()
{
    var w= 540;
     var h= 400;
     var winl = (screen.width - w) / 2;
     var wint = (screen.height - h) / 2;
     winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
     testwindow= window.open ("static.aspx?pg=Privacy", 'mywindow',winprops);
 
}

function popFeedback()
{
    var w= 540;
     var h= 400;
     var winl = (screen.width - w) / 2;
     var wint = (screen.height - h) / 2;
     winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
     testwindow= window.open ("static.aspx?pg=Feedback", 'mywindow',winprops);
 
}

function popTerms()
{
    var w= 540;
     var h= 400;
     var winl = (screen.width - w) / 2;
     var wint = (screen.height - h) / 2;
     winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
     testwindow= window.open ("static.aspx?pg=terms", 'mywindow',winprops);
 
}

function popAdvertise()
{
    var w= 540;
     var h= 400;
     var winl = (screen.width - w) / 2;
     var wint = (screen.height - h) / 2;
     winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
      if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
     testwindow= window.open ("static.aspx?pg=advertise", 'mywindow',winprops);
 
}



function poponclickEventCust(path)
{
    var w= 540;
    var h= 400;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
    testwindow= window.open ("../EventPopUp.aspx?eventid=" + path, 'mywindow',winprops);     
}
 
 
 
 function popUserProfile(id)
{  
     var w= 440;
    var h= 190;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
    testwindow= window.open ("UserProfile.aspx?id="+id, 'mywindow',winprops);
     
}
 
 
 function popAdvertise()
{
     var w= 540;
    var h= 400;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
     if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
    testwindow= window.open ("static.aspx?pg=Advertise", 'mywindow',winprops);
     
}



function poponclickReview(resturantID,reviewID)
{  
     var w= 418;
    var h= 400;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
     if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
    testwindow= window.open ("../ShowReview.aspx?RestaurantID="+resturantID+"&ReviewID="+reviewID+"", 'mywindow',winprops);

}

function poponclickChef(resturantID)
{  
     var w= 418;
    var h= 400;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
     if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
    testwindow= window.open ("../ShowChef.aspx?RestaurantID="+resturantID+"", 'mywindow',winprops);

}

function poponclickDrink(resturantID)
{  
     var w= 418;
    var h= 400;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
     if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
    testwindow= window.open ("../ShowDrink.aspx?RestaurantID="+resturantID+"", '',winprops);

}


function poponclickFood(resturantID)
{  
     var w= 418;
    var h= 400;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
     if(testwindow != null)
    {
        if(!testwindow.closed)
        {
            testwindow.close();
        }        
    }
    testwindow= window.open ("../ShowFood.aspx?RestaurantID="+resturantID+"", '',winprops);

}


function openCat(Cat)
{
    var w= 418;
    var h= 400;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
    testwindow= window.open ("ShowCategory.aspx?Category="+Cat+"", 'mywindow',winprops);
}

function saveCat(CatId,CatName)
{  
   opener.document.getElementById('ctl00_ContentPlaceHolder1_hdnSet').value=CatId;
   opener.document.getElementById('ctl00_ContentPlaceHolder1_txtCategory').value=CatName.replace('_',' ');   
   window.close();
}


function opencolorPlatter()
{
   
    
    // alert ('sd');
    
    //alert(document.getElementById('ctl00$customerPlaceorder$ColorPicker1').value);
    var colorCode=document.getElementById('ctl00$customerPlaceorder$ColorPicker1').value.split('#');
    var colorcode1= colorCode[1];
    
    window.open('rest-owner/samplePage.aspx?sth='+colorcode1);
    //alert(colorcode1);
    
    //return false;

}

function opencolorPlatterUpdate()
{ 

    var colorCode=document.getElementById('ctl00$ContentPlaceHolder1$ColorPicker1').value.split('#');
    var colorcode1= colorCode[1];    
    window.open('rest-owner/samplePage.aspx?sth='+colorcode1);
}


function openRestDesc(path)
{
    var w= 418;
    var h= 400;
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=1,scrollbars=1'
    testwindow= window.open ("../RestDescriptionPopUp.aspx?restid=" + path, 'mywindow',winprops);
 //testwindow= window.open ("../RestDescriptionPopUp.aspx?restid=" + path, 'mywindow','location=0,status=0,scrollbars=1,width=500,height=500');                     
}
	 function confirmDelete(msg)
				  {
						if(msg=='')
						  {
								msg='Are you sure you want to delete';
						  }

						 return confirm(msg);
				  }
