﻿function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//  function sifrcall()
//   {
//   
//if(typeof sIFR == "function"){

////sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"vandenkeere.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"}));

//sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"sifr/Calibri-bold.swf", sColor:"#102020", sLinkColor:null, sBgColor:"#E8E8E8", sHoverColor:null, nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sWmode:"transparent"}));

//sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"sifr/Calibri-bold.swf", sColor:"#102020", sLinkColor:null, sBgColor:"#E8E8E8", sHoverColor:null, nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sWmode:"transparent"}));


//sIFR.replaceElement(named({sSelector:"h2", sFlashSrc:"sifr/Calibri-bold.swf", sColor:"#102020", sLinkColor:null, sBgColor:"#E8E8E8", sHoverColor:null, nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sWmode:"transparent"}));


//sIFR.replaceElement(named({sSelector:"h3", sFlashSrc:"sifr/Calibri-bold.swf", sColor:"#102020", sLinkColor:null, sBgColor:"#E8E8E8", sHoverColor:null, nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sWmode:"transparent"}));

////sIFR.replaceElement(named({sSelector:"h4", sFlashSrc:"sifr/Calibri-bold.swf", sColor:"#102020", sLinkColor:null, sBgColor:"#E8E8E8", sHoverColor:null, nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sWmode:"transparent"}));

//}

//}

// JScript File
function movescroll()
{
window.scrollTo(0,0);
}
function getclearhid()
{
    
}


function dohideflashdiv()
{

   if (document.getElementById("divflash"))
   {
        // alert(document.getElementById("divflash").style.display);
        if (document.getElementById("divflash").style.display != 'block')
        {
         //alert("fgdfgdfg= " + document.getElementById("divflash").style.display);
             document.getElementById("divflash").style.display = "block";
             // thediv.style.visibility = 'hidden';
             // document.getElementById("divflash").className ="video-boxFalse";
            // document.getElementById("divflash").style.height="0px";
             document.getElementById("imgHideVideo").src="images/hide-video.gif";
        }
        else
        {
             document.getElementById("divflash").style.display  = 'none';
             //  document.getElementById("divflash").className ="video-box";
           //  document.getElementById("divflash").style.height="205px";
             document.getElementById("imgHideVideo").src="images/show-video.gif";
        }
    }
    
   
    if (document.getElementById("divHTMLHelp"))
    {
         document.getElementById('divHTMLHelp').style.display  = 'none';
    }
    if (document.getElementById("divHelpTerm"))
    {
         document.getElementById('divHelpTerm').style.display  = 'none';
    }
    
}
function cssapp(thectrlid)
{

    if (thectrlid==document.getElementById("ctl00_ContentPlaceHolder1_Categorysectionright1_imgourfavourates"))
    {
        
        document.getElementById("ctl00_ContentPlaceHolder1_Categorysectionright1_imgourfavourates").src="images/tab-ourfav-on.gif";
        document.getElementById("ctl00_ContentPlaceHolder1_Categorysectionright1_imgTopsession").src="images/tab-topsessions.gif";
    }
    else
    {
 
        document.getElementById("ctl00_ContentPlaceHolder1_Categorysectionright1_imgourfavourates").src="images/tab-ourfav.gif";
        document.getElementById("ctl00_ContentPlaceHolder1_Categorysectionright1_imgTopsession").src="images/tab-topsessions-on.gif";
   
    }
   // alert(document.getElementById("ctl00_ContentPlaceHolder1_Categorysectionright1_imgourfavourates").src);
    //alert(document.getElementById("ctl00_ContentPlaceHolder1_Categorysectionright1_imgTopsession").src);
    
}
function rememberpwd()
{
    if (document.getElementById('ctl00_Header1_SignIn1_hiddPassword').value != "")
    {
        document.getElementById('ctl00_Header1_SignIn1_lblPassword').value = document.getElementById('ctl00_Header1_SignIn1_hiddPassword').value;
        document.getElementById('ctl00_Header1_SignIn1_lblPassword').style.background="url(images/bg-pwd.gif) no-repeat";
     }
}

function doClear(theText) 
{
         //document.getElementById("hidsigntxt").value="textboxclick";
         if (theText.value == theText.defaultValue)
         {
         // alert('hello');
             theText.value = "";
            
             //return true;
         }
        
        
 }
 
 
 
 function doDefaultVal(theText)
 {
     
    
     
      if (theText != document.getElementById("ctl00_Header1_hdnSearchValue"))
    {
        document.getElementById("ctl00_Header1_hdnSearchValue").value = theText.value;
    }
    else
    {
      
        document.getElementById("ctl00_Header1_hdnSearchValue").value = theText.value;
    }
     //document.getElementById("ctl00_Header1_hdnSearchValue").value = theText.value;
     if (theText.value != "")
     {
        
     }
     else
     {
        theText.value = theText.defaultValue;
        if (theText.id=="ctl00_Header1_SignIn1_lblPassword")
        {
            theText.style.background="url(images/bg-pwd1.gif) no-repeat";
        }
    }
     //alert("sdfsd" + event.keyCode) ;
     
     //code for click event when enter text in search text box and press enter then go button's click event should be fier.
     if (theText.defaultValue =="search...")
     {
        //document.form1.lnkGo.click();
        
        document.getElementById('ctl00_Header1_lnkGo').click();
        //document.form1.myFile.click();
        //document.form1.submit();
     }

     
 }
 
 function playvideo()
 {
    so_v5568801639 = new SWFObject("gray_player.swf", "so_v5568801639", "375", "340", "8.0.0", "#000000");
    so_v5568801639.addParam("scale", "noscale");
    so_v5568801639.addParam("wmode", "transparent");
    so_v5568801639.addVariable("viewer_id", 601651639);
    so_v5568801639.addVariable("video_src", "video/[From www.metacafe.com] 419672.2958709.11.flv");
    so_v5568801639.addVariable("xml_src", "docs.xml");
     so_v5568801639.addVariable("allowFullScreen", "true");
    
    so_v5568801639.write("holder_v5568801639");
 }
 
 function clickpage()
 {
    //alert(document.getElementById("txtemailadd").value);
    var emailad=document.getElementById("ctl00_Header1_SignIn1_txtemailadd").value;
    if (emailad == "")// == document.getElementById("txtemailadd").defaultValue)
    {
          document.getElementById("ctl00_Header1_SignIn1_txtemailadd").value = "enter email address...";
    }
 }
 
 function checkPlan()
{
       
    if (document.getElementById("cdictl00_ContentPlaceHolder1_hdnOriginalPlanId").value == document.getElementById("ctl00_ContentPlaceHolder1_hdnChangedPlanId").value)
        {
            document.getElementById("ctl00_ContentPlaceHolder1_PPayPlan1").innerHTML="You have not selected any changes";
            document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").style.visibility = "hidden";
            document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").style.visibility = "hidden";
            document.getElementById("divDash").style.visibility = "hidden";
//          document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").innerHTML="You have not selected any changes";
            return false;
        }
    else
            return true;
 }
 
 
 //global declardation for storing regional currency values.
 
var Currency;

function getRegionalCurrency(strCurrency)
{
   Currency=strCurrency;
}

 function dohidedivline(str,textcheck)
 {
     
      
      
     
         
       if(str=="RadMonthly")
        { 
            document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").style.visibility = "visible";
            document.getElementById("divDash").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_hdnChangedPlanId").value= "1";
            if(textcheck==false)
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").innerHTML="You have changed to:";
            }
            document.getElementById(str).checked=true;
            var anmt1= document.getElementById('ctl00_ContentPlaceHolder1_hidamtM').value;
            var Paytest =document.getElementById('ctl00_ContentPlaceHolder1_hidmonth').value;
            
            if(Currency=="pounds")
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML= "£" +anmt1;
            }
            if(Currency=="euro")
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML= "&euro;" +anmt1;
            }
            if(Currency=="dollar")
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML= "$" +anmt1;
            }
            
            document.getElementById("ctl00_ContentPlaceHolder1_PPayPlan1").innerHTML = Paytest;
            document.getElementById("ctl00_ContentPlaceHolder1_hidPPlan").value=Paytest;
            document.getElementById("ctl00_ContentPlaceHolder1_divAnnual").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divOnceY").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divSixMon").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divQua").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divMon").className="bound"; 
           
        }
       else if(str=="RadQuarterly")
        {
             document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").style.visibility = "visible";
            document.getElementById("divDash").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_hdnChangedPlanId").value= "2";
            if(textcheck==false)
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").innerHTML="You have changed to:";
            }
            document.getElementById(str).checked=true;
            var text= document.getElementById('ctl00_ContentPlaceHolder1_hidlblQua').value;
            var amt =document.getElementById('ctl00_ContentPlaceHolder1_hidamtQu').value;
            
            if(Currency=="pounds")
            {
              document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="£" +amt;
            }
            if(Currency=="euro")
            {
               document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="&euro;" +amt;
            }
            if(Currency=="dollar")
            {
               document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="$" +amt;
            }  
            
            document.getElementById("ctl00_ContentPlaceHolder1_PPayPlan1").innerHTML = text;
            document.getElementById("ctl00_ContentPlaceHolder1_hidPPlan").value=text;
            document.getElementById("ctl00_ContentPlaceHolder1_divAnnual").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divOnceY").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divSixMon").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divQua").className="bound"; 
            document.getElementById("ctl00_ContentPlaceHolder1_divMon").className=""; 
            
        }
       else if(str=="RadPayEveSixMon")
        {  
             document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").style.visibility = "visible";
            document.getElementById("divDash").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_hdnChangedPlanId").value= "3";
            if(textcheck==false)
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").innerHTML="You have changed to:";
            }
            document.getElementById(str).checked=true;
            var text= document.getElementById('ctl00_ContentPlaceHolder1_hidlblSixMon').value;
            var amt =document.getElementById('ctl00_ContentPlaceHolder1_hidamESixM').value;
            
            if(Currency=="pounds")
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="£" +amt;
            }
            if(Currency=="euro")
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="&euro;" +amt;
            }
            if(Currency=="dollar")
            {
               document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="$" +amt;
            }
            
            
            
            document.getElementById("ctl00_ContentPlaceHolder1_PPayPlan1").innerHTML = text;
            document.getElementById("ctl00_ContentPlaceHolder1_hidPPlan").value=text;
            document.getElementById("ctl00_ContentPlaceHolder1_divAnnual").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divOnceY").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divSixMon").className="bound"; 
            document.getElementById("ctl00_ContentPlaceHolder1_divQua").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divMon").className="";  
            
        }
       else if(str=="RadPayOnce")
        {
             document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").style.visibility = "visible";
            document.getElementById("divDash").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_hdnChangedPlanId").value= "4";
            if(textcheck==false)
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").innerHTML="You have changed to:";
            }
            document.getElementById(str).checked=true;
            var text= document.getElementById('ctl00_ContentPlaceHolder1_hidlbloncey').value;
            var amt =document.getElementById('ctl00_ContentPlaceHolder1_hidamtOnceY').value;
           
            if(Currency=="pounds")
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="£" +amt;   
            }
            if(Currency=="euro")
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="&euro;" +amt;   
            }
            if(Currency=="dollar")
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="$" +amt;   
            }
            document.getElementById("ctl00_ContentPlaceHolder1_PPayPlan1").innerHTML = text;
            document.getElementById("ctl00_ContentPlaceHolder1_hidPPlan").value=text;
            document.getElementById("ctl00_ContentPlaceHolder1_divAnnual").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divOnceY").className="bound"; 
            document.getElementById("ctl00_ContentPlaceHolder1_divSixMon").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divQua").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divMon").className="";  
            
        }
       else if(str=="RadAnnualFee")
        {
            document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").style.visibility = "visible";
            document.getElementById("divDash").style.visibility = "visible";
            document.getElementById("ctl00_ContentPlaceHolder1_hdnChangedPlanId").value= "5";
            if(textcheck==false)
            {
                document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").innerHTML="You have changed to:";
            }
            document.getElementById(str).checked=true;
            var text= document.getElementById('ctl00_ContentPlaceHolder1_hidlblAnnual').value;
            var amt =document.getElementById('ctl00_ContentPlaceHolder1_hidamtAnnual').value;
            
            if(Currency=="pounds")
            {
               document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="£" +amt;
            }
            if(Currency=="euro")
            {
               document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="&euro;" +amt;
            }
            if(Currency=="dollar")
            {
               document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").innerHTML="$" +amt;
            }
            
            document.getElementById("ctl00_ContentPlaceHolder1_PPayPlan1").innerHTML = text;
            document.getElementById("ctl00_ContentPlaceHolder1_hidPPlan").value=text;
            document.getElementById("ctl00_ContentPlaceHolder1_divAnnual").className="bound"; 
            document.getElementById("ctl00_ContentPlaceHolder1_divOnceY").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divSixMon").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divQua").className=""; 
            document.getElementById("ctl00_ContentPlaceHolder1_divMon").className="";  
            
        }
     else if (document.getElementById("ctl00_ContentPlaceHolder1_hdnOriginalPlanId").value == document.getElementById("ctl00_ContentPlaceHolder1_hdnChangedPlanId").value)
        {
            document.getElementById("ctl00_ContentPlaceHolder1_PPayAmount").style.visibility = "hidden";
            document.getElementById("ctl00_ContentPlaceHolder1_PTextChange").style.visibility = "hidden";
            document.getElementById("divDash").style.visibility = "hidden";
        }
    
 }
 
 function dohideflashdiv_old()
 {
    //alert(thediv);
    //thediv.visibility=hidden;
    // alert(document.getElementById("divflash").style.visibility);
   if (document.getElementById("divflash"))
   {
        if (document.getElementById("divflash").style.visibility != 'hidden')
        {
         
              document.getElementById("divflash").style.visibility = "hidden";
              // thediv.style.visibility = 'hidden';
              document.getElementById("divflash").className ="video-boxFalse";
              document.getElementById("imgHideVideo").src="images/show-video.gif";
        }
        else
        {
             document.getElementById("divflash").style.visibility  = 'visible';
             document.getElementById("divflash").className ="video-box";
             document.getElementById("imgHideVideo").src="images/hide-video.gif";
        }
    }
    
   
  if (document.getElementById("divHTMLHelp"))
    {
         document.getElementById('divHTMLHelp').style.display  = 'none';
    }
    if (document.getElementById("divHelpTerm"))
    {
         document.getElementById('divHelpTerm').style.display  = 'none';
    }
    //divHTMLHelp
    //divHelpTerm
 }
 
 function dohideimgsrchOptdiv()
 {
 setPosDivsrchopt(document.getElementById("arv_searchOpt"),document.getElementById("divsrchopt"));
 //will enable it when will get div for that
 //alert("hello");
//    if (document.getElementById("divsrchopt").style.visibility != 'hidden')
//    {
//        document.getElementById("imgsrchOpt").src="images/arrow-up.gif";
//          if (document.getElementById("divsrchopt").style.visibility == '')//checking when click 1st time
//          {
//              document.getElementById("divsrchopt").style.visibility  = 'visible';
//          }
//          else
//          {
//               document.getElementById("divsrchopt").style.visibility  = 'hidden';
//          }
// 
//    }
//    else
//   {
//          document.getElementById("divsrchopt").style.visibility  = 'visible';

//       // document.getElementById("divsrchopt").src="images/arrow-down.gif";
//    }

      if (document.getElementById("divsrchopt").style.visibility != 'hidden')
      {
          if (document.getElementById("divsrchopt").style.visibility == '')//checking when click 1st time
          {
              document.getElementById("divsrchopt").style.visibility  = 'visible';
          }
          else
          {
               document.getElementById("divsrchopt").style.visibility  = 'hidden';
          }
      }     
      else
      {
               document.getElementById("divsrchopt").style.visibility  = 'visible';

      }

 }
 
 
 
 function dohideForgotPwddiv()
 {
       setPosDiv(document.getElementById("arv_caller"),document.getElementById("divFrgotPwd"));
       document.getElementById("divSignin").style.visibility  = 'hidden';

      if (document.getElementById("divFrgotPwd").style.visibility != 'hidden')
      {
          if (document.getElementById("divFrgotPwd").style.visibility == '')//checking when click 1st time
          {
              document.getElementById("divFrgotPwd").style.visibility  = 'visible';
          }
          else
          {
               document.getElementById("divFrgotPwd").style.visibility  = 'hidden';
          }
      }     
      else
      {
               document.getElementById("divFrgotPwd").style.visibility  = 'visible';

      }
}
 
 function dohidesignIndowndiv()
 {
     document.getElementById("divSignin").style.visibility  = 'hidden';
 }
 function doUPsignForPwddiv()
 {
     document.getElementById("divFrgotPwd").style.visibility  = 'hidden';
     document.getElementById("divSignin").style.visibility  = 'visible';
 }
 
 function dohideSrchOptdiv()
 {
     document.getElementById("divsrchopt").style.visibility  = 'hidden';
     //document.getElementById("divSignin").style.visibility  = 'visible';
 }
 
 function dohidsignFrdPwddiv()
 {
     document.getElementById("divFrgotPwd").style.visibility  = 'hidden';
     document.getElementById("divSignin").style.visibility  = 'hidden';
 }
 
 function docatclass(thehref)
 {
//    var allAnchors = document.getElementsByTagName("a");
//    for( var i = 0; i < allAnchors.length; i++ ) 
//    {  
//        if (allAnchors[i].className != 'selected')
//        {
//        }
//        else
//        {
//           // alert(allAnchors[i].className);
//            allAnchors[i].className='';
////            var thisLink = allAnchors[i].getAttribute("id");
////            if (!document.getElementById('Div' + thisLink))
////            {
////            }
////            else
////            {
////            //alert(document.getElementById('Div' + thisLink).style.visibility);
////            document.getElementById('Div' + thisLink).style.visibility  = 'hidden';
////            }
//            
//        }
//    } 
//    document.getElementById(thehref).className="selected";
//   //static we will assign this b/c when we will click into any of category ,these have lost their tab color(class)
//    document.getElementById("FitnessCategory").className="selected";
//    document.getElementById("Topsession").className="selected";
//     document.getElementById("hrfHome").className="selected";
//    
////   if (!document.getElementById('Div' + thehref)) 
////   {
////   
////   }
////   else
////   {
////   document.getElementById('Div' + thehref).style.visibility  = 'visible';
////   }
//  
  //alert(document.getElementById("hidcat").value);
  //alert(document.getElementById("hidcat").value);
 // alert(document.getElementById(thehref));
 
 if (document.getElementById("hidcat"))
 {
    if (document.getElementById("hidcat").value != "")
    {
   
    }
    else
    {
  // alert(document.getElementById("ctl00_ContentPlaceHolder1_DCatSecion1_DlCategory_ctl00_lnkbtn").className);
      //document.getElementById("ctl00_ContentPlaceHolder1_DCatSecion1_DlCategory_ctl00_lnkbtn").className="";
    }
    var catid=document.getElementById("hidcat").value;
    if (catid != "")
    {
        document.getElementById(catid).className="";
    }
    // document.getElementById("hidcat").value=document.getElementById(thehref).getAttribute("id");
    // document.getElementById(thehref).className="selected";
     }
 }
 
 
 
 function doHeadClass(thehref)
 { 
   
    if (document.getElementById("hidhead").value != "")
    {
      
    }
    else
    {
        document.getElementById("hrfHome").className="";
    }
    
    var catid=document.getElementById("hidhead").value;
    //alert("before if" + catid);
    if (catid != "")
    {
     
        document.getElementById(catid).className="";
    }
    

     document.getElementById("hidhead").value=document.getElementById(thehref).getAttribute("id");
     document.getElementById(thehref).className="selected";
//     if (document.getElementById(thehref).getAttribute("id")=="SESSION")
//     {
//        window.location="session-detail.aspx?sededuleid=3";
//     }
    
 }
 
 //making this function only for sitemaps
 
 function dohidesignIndivsitemap()
 {
        setPosDiv(document.getElementById("arv_caller"),document.getElementById("divSignin"));
        document.getElementById("divFrgotPwd").style.visibility  = 'hidden';
        document.getElementById("divSignin").style.visibility  = 'visible';
     
      if (document.getElementById("divSignin").style.visibility != ' nb  ')
      {
   // alert("if");
          
          if(document.cookie !=null )
          {
         // alert("if");
              if (document.cookie != "")
              {
             //    alert("inner if");
             //alert(document.cookie );
                //alert(document.cookie);
                eml_start=document.cookie.indexOf("eml=");
                pwd_start=document.cookie.indexOf("pwd=");
                stremail=document.cookie.substring(eml_start+4,pwd_start-1);
                strpwd=document.cookie.substring(pwd_start+4);
                
                if (stremail != "__u")
                {
                    alert("dohidesignIndivsitemap");
                    alert(strpwd);
                    document.getElementById("ctl00_Header1_SignIn1_txtemailadd").value= stremail ;
                    document.getElementById("ctl00_Header1_SignIn1_lblPassword").value= strpwd ;
                    
                    document.getElementById("ctl00_Header1_SignIn1_lblPassword").style.background="url(images/bg-pwd.gif) no-repeat";
                }
                else
                {
                     document.getElementById("ctl00_Header1_SignIn1_lblPassword").style.background="url(images/bg-pwd1.gif) no-repeat";
                    document.getElementById("ctl00_Header1_SignIn1_txtemailadd").style.background="url(images/bg-white.gif) no-repeat"; 
                }
                
                
                 }
                else
                {
               //  alert("inner else");
                    document.getElementById("ctl00_Header1_SignIn1_lblPassword").style.background="url(images/bg-pwd1.gif) no-repeat";
                     document.getElementById("ctl00_Header1_SignIn1_txtemailadd").value= document.getElementById("ctl00_Header1_SignIn1_txtemailadd").DefaultValue;
              
                }
                
               } 
               else
               {
               //alert("hi");
                     document.getElementById("ctl00_Header1_SignIn1_lblPassword").style.background="url(images/bg-pwd1.gif) no-repeat";
                     document.getElementById("ctl00_Header1_SignIn1_txtemailadd").value= document.getElementById("ctl00_Header1_SignIn1_txtemailadd").DefaultValue;
               }
          
      }     
//      else
//      {
//           // setaccordingtoscreen();
//           
//               document.getElementById("divSignin").style.visibility  = 'visible';

//      }
   
 }
 
 
function dohidesignIndiv()
 {
    // alert("sdfsdf");
    var strpwd_new;
      setPosDiv(document.getElementById("arv_caller"),document.getElementById("divSignin"));
      document.getElementById("divFrgotPwd").style.visibility  = 'hidden';
      // setaccordingtoscreen();
      //getposOffset(divSignin,"left");
      if (document.getElementById("divSignin").style.visibility != 'hidden')
      {
           
          if (document.getElementById("divSignin").style.visibility == '')//checking when click 1st time
          {
        // setaccordingtoscreen();
              document.getElementById("divSignin").style.visibility  = 'visible';
          }
          else
          {
               document.getElementById("divSignin").style.visibility  = 'hidden';
          }
          
            //alert("outer if");
             if(document.cookie !=null )
             {
               // alert("if");
                   if (document.cookie != "")
                   {
                     //alert("inner if");
                     //alert(document.cookie );
                        //alert(document.cookie);
                        eml_start=document.cookie.indexOf("eml=");
                        //alert(eml_start);
                        pwd_start=document.cookie.indexOf("pwd=");
                         // alert(pwd_start);
                        stremail=document.cookie.substring(eml_start+4,pwd_start-1);
                       // alert(stremail);
                        strpwd=document.cookie.substring(pwd_start+4);
                        //alert(strpwd);
                        //alert(stremail);
                        
                        strpwd_new = strpwd.split(";");
                        //alert(strpwd_new[0]);
                        if (stremail != "__u")
                        {
                       //// alert("checking");
                            
                            document.getElementById("ctl00_Header1_SignIn1_txtemailadd").value= stremail ;
                            document.getElementById("ctl00_Header1_SignIn1_lblPassword").value= strpwd_new[0];
                            
                            document.getElementById("ctl00_Header1_SignIn1_lblPassword").style.background="url(images/bg-pwd.gif) no-repeat";
                        }
                        else
                        {
                       // alert("checking else");
                         document.getElementById("ctl00_Header1_SignIn1_lblPassword").style.background="url(images/bg-pwd1.gif) no-repeat";
                         document.getElementById("ctl00_Header1_SignIn1_txtemailadd").style.background="url(images/bg-white.gif) no-repeat"; 
                   
                        }
                    }
                    else
                    {
                     //   alert("inner else");
                     document.getElementById("ctl00_Header1_SignIn1_lblPassword").style.background="url(images/bg-pwd1.gif) no-repeat";
                     document.getElementById("ctl00_Header1_SignIn1_txtemailadd").style.background="url(images/bg-white.gif) no-repeat"; 
                   
                    }
               } 
               else
               {
               //alert("outer else");
               //alert("else");
               
                    document.getElementById("ctl00_Header1_SignIn1_lblPassword").style.background="url(images/bg-pwd1.gif) no-repeat";
                     document.getElementById("ctl00_Header1_SignIn1_txtemailadd").value= document.getElementById("ctl00_Header1_SignIn1_txtemailadd").DefaultValue;
               
               }
          
      }     
      else
      {
           // setaccordingtoscreen();
           
               document.getElementById("divSignin").style.visibility  = 'visible';

      }
   
 }
 
 //*******************************************************

function GetAbsPosition(object)
{
	var position = new Object;
	position.x = 0;
	position.y = 0;
	
	if( object ) {
	position.x = object.offsetLeft;
	position.y = object.offsetTop;
	
	if( object.offsetParent ) {
	var parentpos = GetAbsPosition(object.offsetParent);
	position.x += parentpos.x;
	position.y += parentpos.y;
	}
	}
	
	position.cx = object.offsetWidth;
	position.cy = object.offsetHeight;
	
	return position;
}
function setPosDiv(sourceC , targetC){
	
	var pos=new Object();
	var source;
	var target;
	
	source=sourceC;
	target=targetC;
	
	pos=GetAbsPosition(source);
	
//////////	var n=navigator.appName
//////////var v=parseInt(navigator.appVersion)
//////////var browsok=((n=="Netscape")&&(v>=4))
//////////var browsok2=((n=="Microsoft Internet Explorer")&&(v>=4))

////////////fancy green for nice screens.
////////////alert(browsok2);
//////////    //fs = ((screen.width/2)-pos.x)/2;
//////////    fs = ((screen.width-960)/2);
//////////   
//////////    fs2 = pos.x-fs;
//////////	if(browsok2){ //for IE
//////////	    //target.style.left=pos.x-40;
//////////	    target.style.left = fs2-7;
//////////	    
//////////	    
//////////	}else{ //for mozila
//////////	    
//////////	    target.style.left = pos.x-40 + "px";
//////////	    /// alert(target.style.left);
//////////	    //target.style.left = fs2 + 120 + "px";
//////////	    //alert(target.style.posLeft) ;
//////////	    
//////////	}
	
	//alert("hello" + target.style.posLeft);
	//target.style.top=pos.y+20;
	 target.style.left = pos.x-40 + "px";
	target.style.top=pos.y+20;
	
}

function setPosDivsrchopt(sourceC , targetC){
	
	var pos=new Object();
	var source;
	var target;
	
	source=sourceC;
	target=targetC;
	
	pos=GetAbsPosition(source);
	
	//target.style.left=pos.x+20;
	target.style.left=pos.x-235 + "px";
	//target.style.top=pos.y+20;
	
	var n=navigator.appName;
    var v=parseInt(navigator.appVersion);
    var browsok=((n=="Netscape")&&(v>=4));
    var browsok2=((n=="Microsoft Internet Explorer")&&(v>=4));

    //fancy green for nice screens.
    //alert(browsok2);
    //fs = ((screen.width/2)-pos.x)/2;
    fs = ((screen.width-960)/2);
   
    fs2 = pos.x-fs;
	if(browsok2){ //for IE
	    //target.style.left=pos.x-40;
	   target.style.top=pos.y-72 + "px";
	    
	}else{ //for mozila
	    
	   target.style.top=pos.y-81 + "px";
	    
	    //target.style.left = fs2 + 120 + "px";
	}
	//target.style.top=pos.y-81 + "px";
	
}

function testtext(theref)
{
//alert(document.get);/images/bg-pwd.gif
//alert(document.getElementById(theref));
document.getElementById(theref).style.background="url(images/bg-pwd.gif) no-repeat";
}

  //*******************************************************
 
//function setaccordingtoscreen()
//{
////alert("div");

//    if ((screen.width == 800) || (screen.width > 800) && (screen.width <=1600) || (screen.width > 1600)) 
//    {
//        if (screen.width == 800) 
//        {
//      
//            document.getElementById("divSignin").classname="signin";
//            //alert("hello");

//        }
//        if ((screen.width > 800) && (screen.width <= 1000)) 
//        {
//        
//            document.getElementById("divSignin").classname="signin";
////            document.write('<div style="width:*%; height:100%; overflow:auto;
////            background-image:url(images/900/appropriate_filename_for_this_resolution.png);
////            background-repeat:no-repeat; background-position: 50% 50%; align:left;
////            text-align:justify">');
//        }
//        if ((screen.width > 1000) && (screen.width <= 1200)) 
//        {
//      
//           var currTabElem = document.getElementById("divSignin");
//           currTabElem.setAttribute("class", "signin"); 
//        }
//        if ((screen.width > 1200) && (screen.width <= 1400)) 
//        {
//        //alert("1400");
//        //  alert( document.getElementById("divSignin").classname);
//        // var currTabElem = document.getElementById("divSignin");

//        //currTabElem.setAttribute("class", "signinfor1200"); 
//        //   document.getElementById("divSignin").classname="signinfor1200";
//        //*****************************************************************
//        //    document.getElementById("divSignin").style.background="#E8E8E8 url(../images/bot-logbox.gif) no-repeat bottom left";
//        //    document.getElementById("divSignin").style.width="202px";
//        //    document.getElementById("divSignin").style.zIndex="1";
//        //    document.getElementById("divSignin").style.position="absolute";
//        //    document.getElementById("divSignin").style.left="925px";
//           
//        }
//        if ((screen.width > 1400) && (screen.width <= 1600)) 
//        {
//        //            document.write('<div style="width:*%; height:100%; overflow:auto;
//        //            background-image:url(images/1500/appropriate_filename_for_this_resolution.png);
//        //            background-repeat:no-repeat; background-position: 50% 50%; align:left;
//        //            text-align:justify">');
//        }
//        if (screen.width > 1600) 
//        {
//        //  document.write('<div style="width:*%; height:100%; overflow:auto;
//        //  background-image:url(images/1500/appropriate_filename_for_this_resolution.png);
//        //  background-repeat:no-repeat; background-position: 50% 50%; align:left;
//        //  text-align:justify">');
//        }
//    }

//}

