
/*      Code taken from NewSearch.ascx on 03_Dec_2007       */

function clickButton(e, buttonid)
{ 
      var bt = document.getElementById(buttonid);       
      if (typeof bt == 'object')
      { 
            if(navigator.appName.indexOf("Netscape")>(-1))
            { 
                  if (e.keyCode == 13)
                  { 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
            { 
                  if (event.keyCode == 13)
                  { 
                        bt.click(); 
                        return false; 
                  } 
            } 
        }      
}

/*function FocJ()
{
    document.getElementById('ctl00_cph_Search_txtJobs').value=document.getElementById('ctl00_cph_Search_txtResume').value;
}*/

//function SetFocustoControl(option)
//{
//     switch(option)
//        {
//            case "R":                    
//                document.getElementById("ctl00_cph_Search_divResume").style.display= "block";                
//                document.getElementById("ctl00_cph_Search_divJobs").style.display= "none";
//                document.getElementById("ctl00_cph_Search_divHunter").style.display= "none";
//                document.getElementById("ctl00_cph_Search_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_BResume.jpg";
//                document.getElementById("ctl00_cph_Search_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_AJobs.jpg";
//                document.getElementById("ctl00_cph_Search_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_AHunter.jpg";
//                document.getElementById("ctl00_cph_Search_txtResume").focus();                
//                searchType = option ;
//                break ;                
//            case "J":
//                document.getElementById("ctl00_cph_Search_divResume").style.display= "none" ;               
//                document.getElementById("ctl00_cph_Search_divJobs").style.display= "block" ;
//                document.getElementById("ctl00_cph_Search_divHunter").style.display= "none" ;
//                document.getElementById("ctl00_cph_Search_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_AResume.jpg" ;
//                document.getElementById("ctl00_cph_Search_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_YJobs.jpg" ;
//                document.getElementById("ctl00_cph_Search_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_AHunter.jpg" ;                       
//                document.getElementById("ctl00_cph_Search_tbPnlJ_txtJobs").focus() ;  
//                searchType = option ;
//                break ;
//            }
//        return false;
//}


    var searchType ;
    function mprLoadImg(option)
    {
        switch(option)
        {
            case "R":                    
                document.getElementById("ctl00_cph_Search_divResume").style.display= "block";                
                document.getElementById("ctl00_cph_Search_divJobs").style.display= "none";
                document.getElementById("ctl00_cph_Search_divHunter").style.display= "none";
                document.getElementById("ctl00_cph_Search_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_BResume.jpg";
                document.getElementById("ctl00_cph_Search_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_AJobs.jpg";
                document.getElementById("ctl00_cph_Search_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_AHunter.jpg";
                document.getElementById("ctl00_cph_Search_txtResume").focus();                
                searchType = option ;
                break ;                
            case "J":
                document.getElementById("ctl00_cph_Search_divResume").style.display= "none" ;               
                document.getElementById("ctl00_cph_Search_divJobs").style.display= "block" ;
                document.getElementById("ctl00_cph_Search_divHunter").style.display= "none" ;
                document.getElementById("ctl00_cph_Search_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_AResume.jpg" ;
                document.getElementById("ctl00_cph_Search_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_YJobs.jpg" ;
                document.getElementById("ctl00_cph_Search_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_AHunter.jpg" ;                       
                document.getElementById("ctl00_cph_Search_tbPnlJ_txtJobs").focus() ;  
                searchType = option ;
                break ;
            case "H":               
                document.getElementById("ctl00_cph_Search_divResume").style.display= "none" ;
                document.getElementById("ctl00_cph_Search_divJobs").style.display= "none" ;
                document.getElementById("ctl00_cph_Search_divHunter").style.display= "block" ;
                document.getElementById("ctl00_cph_Search_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_AResume.jpg" ;
                document.getElementById("ctl00_cph_Search_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_AJobs.jpg" ;
                document.getElementById("ctl00_cph_Search_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_GHunter.jpg" ; 
                document.getElementById("ctl00_cph_Search_tbPnlH_txtHunter").focus() ;  
                searchType = option ;
                break;              
        }
        return false;
} 

function mfnCheckNRedirect()
{
    if(document.getElementById('ctl00_cph_txtLastName').value.trim()=="")
    {
        Jalert("Last name is mandatory");
        document.getElementById('ctl00_cph_txtLastName').focus();
        return false;
    }
    else
    {
        
        
        var url="/recrooter/PeopleSearch.aspx?fname="+document.getElementById('ctl00_cph_txtFirstName').value+"&lname="+document.getElementById('ctl00_cph_txtLastName').value;
        //alert(url);
        this.location.href=url;
    }
}

var loptHMsearOpt ;
function searchResult(kwd, option)
{
     //  var typrad= document.getElementsByName('ctl00$cph$Search$tbContSearch$tbPnlR$radAndOr') ;
        var typrad= document.getElementsByName('ctl00$cph$Search$radAndOr') ;
        var typJorad= document.getElementsByName('ctl00$cph$Search$radAndOr') ;     
       //var typJorad= document.getElementsByName('ctl00$cph$Search$tbContSearch$tbPnlJ$radJobOpt') ;
       var searStr ;     
        searchType = option ;   
        for (var i=0 ; i<typrad.length; i++ )
                 if (typrad[i].checked==true )
                     loptHMsearOpt =  typrad[i].value ;     
        switch(searchType)
        {
                case "1":
//                 if ( document.getElementById(kwd).value.trim()  == "" )
//                 {
//                       Jalert("Enter keywords") ;
//                       document.getElementById(kwd).focus();
//                       return false ; 
//                 }  
 
            //    By Aba to check for atleast two keywords
            if(loptHMsearOpt!=3){
                    var keywordLimit=2;

                    var keywordvalue=document.getElementById(kwd).value.trim();

                    
                    //Jalert(spacelen+","+pluslen);
                    
                    var c=0;
                    while(c!=1)
                    {
                        keywordvalue=keywordvalue.replace(/  /g,' ');
                        keywordvalue=keywordvalue.replace(/\+\+/g,'+');
                        
                        //Jalert(keywordvalue+","+keywordvalue.length);
                        
                        if(keywordvalue.indexOf("  ")==-1 && keywordvalue.indexOf("++")==-1)
                        {
                            c=1;
                        }
                    }
                   // Jalert("Final : "+keywordvalue+","+keywordvalue.length);
                    
                    c=0;
                    while(c!=1)
                    {
                        if(keywordvalue.charAt(keywordvalue.length-1)==' ')
                        {
                            keywordvalue=keywordvalue.substring(0,keywordvalue.length-1);
                        }
                        
                        if(keywordvalue.charAt(keywordvalue.length-1)=='+')
                        {
                            keywordvalue=keywordvalue.substring(0,keywordvalue.length-1);
                        }                        
                        
                        if(keywordvalue.charAt(0)==' ')
                        {
                            keywordvalue=keywordvalue.substring(1,keywordvalue.length);
                        }
                        
                        if(keywordvalue.charAt(0)=='+')
                        {
                            keywordvalue=keywordvalue.substring(1,keywordvalue.length);
                        } 
                        
                        
                        if(keywordvalue.charAt(keywordvalue.length-1)!=' ' && keywordvalue.charAt(keywordvalue.length-1)!='+' && keywordvalue.charAt(0)!=' ' && keywordvalue.charAt(0)!='+')
                        {
                            c=1;
                        }
                        
                        //Jalert("Pre Final : "+keywordvalue+","+keywordvalue.length);
                     }
                    // Jalert("lastPre Final : "+keywordvalue+","+keywordvalue.length);

                     
                        
                    keywordvalue=keywordvalue.replace(/\+ /g,' ');
                    keywordvalue=keywordvalue.replace(/ \+/g,' ');
                    
                   // Jalert("FinalFinal : "+keywordvalue+","+keywordvalue.length);
      
                        
                    keywordvalue=keywordvalue.replace(/\+/g,' ');
                   // Jalert("Replacing + with space : "+keywordvalue+","+keywordvalue.length);
                    
                    var keyarray=keywordvalue.split(" ");
                    var spacelen=keyarray.length                    
                    
                    for(var xi=0;xi<spacelen;xi++)
                    {
                        if(keyarray[xi]=='')
                            spacelen=spacelen-1;
                    }
                    
                    //Jalert("split length : "+keywordvalue+","+spacelen);
                    if (spacelen<keywordLimit)
                    {
                        Jalert("Please search with at least two keywords");
                        return false;
                    }
                ////////////
                 document.getElementById('RecLdr').style.display = 'block' ;
                 }
                 
                   document.getElementById('ResResult').style.display = 'none' ;
                  
                   if(loptHMsearOpt=="1"){
                        document.getElementById('searchOption').value="0";
                        USResumeSearch.gfnResumeCount(document.getElementById(kwd).value,false,onSearchCntSuccess, onSearchCntLoadTimeout, onSearchCntFailure );
                        }
                    else if(loptHMsearOpt=="2")
                    {
                        document.getElementById('searchOption').value="1";
                        USResumeSearch.gfnResumeCount(document.getElementById(kwd).value,true,onSearchCntSuccess, onSearchCntLoadTimeout, onSearchCntFailure );                                                    
                        }
                        else if(loptHMsearOpt=="3")
                        {
                            $find('ctl00_cph_modPopShowPeopleSearch').show();
                            document.getElementById('ctl00_cph_txtFirstName').focus();
                            return false;
                        }
                   //  old  ResumeCount.gfnGetResumeCount(kwd,onSearchCntSuccess, onSearchCntLoadTimeout, onSearchCntFailure );
                   
                 break ;

                case "2" :
                     typrad= document.getElementsByName('ctl00$cph$Search$radJobOpt');
                     if(document.getElementById(kwd).value=="")
                     {
                        Jalert("Please enter a keyword to search");
                        return false;
                     }
                    for (var i=0 ; i<typrad.length; i++ )
                     if (typrad[i].checked==true )
                         loptHMsearOpt =  typrad[i].value ;
                     switch(loptHMsearOpt)
                     {
                        case "1":
                            //var url="/JobSearch/JobSearchPage.aspx?query="+escape(document.getElementById(kwd).value);
                            //var url="/JobSearch/JobSearchPipes.aspx?query="+escape(document.getElementById(kwd).value);
                            var url = "/jobs/" + escape(document.getElementById(kwd).value) + "//Asia"
                            this.location.href=url;
                            break;
                         case "2":
                            //var url="/JobSearch/JobSearchaMatic.aspx?param="+escape(document.getElementById(kwd).value);
                             //var url="/JobSearch/JobSearchCareer.aspx?query="+escape(document.getElementById(kwd).value);
                             var url = "/jobs/" + escape(document.getElementById(kwd).value) + "//USA";
                            //var url="/JobSearch/JobSearchOption.aspx?param="+escape(document.getElementById(kwd).value);
                            this.location.href=url;
                            break;
                         case "3":
                             //var url="/JobSearch/JobSearchPipes.aspx?query="+escape(document.getElementById(kwd).value);
                             var url = "/jobs/" + escape(document.getElementById(kwd).value) + "//Europe"
                            //var url="/JobSearch/JobSearchEurope.aspx?query="+escape(document.getElementById(kwd).value)+"&option=4";
                            this.location.href=url;
                            break;
                     }    
                 /*//    alert("The value is "+loptHMsearOpt);    
                    if(loptHMsearOpt=="1"){
                         var url="/jobber/JobSearchPage.aspx?query="+escape(document.getElementById(kwd).value);
                         this.location.href=url;
                        //document.getElementById('searchOption').value="0";
                        //USResumeSearch.gfnJOCount(document.getElementById(kwd).value,false,onSearchCntSuccess, onSearchCntLoadTimeout, onSearchCntFailure)
                     }
                     else
                     {
                        var url="/jobber/JobSearchaMatic.aspx?param="+escape(document.getElementById(kwd).value);
                        this.location.href=url;
                      //document.getElementById('JobberSearch').innerHTML =  "<a href='http://gorecroot.jobamatic.com/' target='_blank'>External site </a>"  ;
                        
                     }*/
                    break;
//                 
//                 if ( document.getElementById(kwd).value.trim()  == "" )
//                 {
//                       Jalert("Enter keywords") ;
//                       document.getElementById(kwd).focus();
//                       return false ; 
//                 }   
//                  for (var i=0 ; i<typJorad.length; i++ )
//                     if (typJorad[i].checked==true )
//                                          loptHMsearOpt =  typJorad[i].value ;
//                                         
//                   document.getElementById('JobberSearch').style.display = 'none' ;
//                   document.getElementById('JbrLdr').style.display = 'block' ;
//                    break ;
//                    
                case "3": 
                
                       //Jalert("Coming soon") ;
                       //return false ; 
                     if(document.getElementById(kwd).value.trim()=="")
                     {
                        Jalert("Please enter a keyword to search");
                        return false;
                     }
                     if(document.getElementById('ctl00_cph_Search_rdoCompanySearchOptions_0').checked)
                     {
                        var url="/RecRooter/CompanySearch.aspx?companyName="+escape(document.getElementById(kwd).value);
                        this.location.href=url;
                     }                        
                     if(document.getElementById('ctl00_cph_Search_rdoCompanySearchOptions_1').checked)
                     {
                        var url="/RecRooter/CompanySearch.aspx?companyDesc="+escape(document.getElementById(kwd).value);
                        this.location.href=url;
                     }                                             
                           
                
                        //                 if ( document.getElementById(kwd).value.trim()  == "" )
                        //                 {
                        //                       Jalert("Coming soon") ;
                        //                       document.getElementById(kwd).focus();
                        //                       return false ; 
                        //                  }   
                        //                  document.getElementById('hunterSearch').style.display = 'none' ;
                        //                   
                        //                  loptHMsearOpt =  document.getElementById('ctl00_cph_Search_ddlHunter').value ;
                        //                  document.getElementById('hunLdr').style.display = 'block' ;
                  
                  break ;

          default: // default option recrooter
                if ( document.getElementById(kwd).value.trim()  == "" )
                 {
                       Jalert("Enter keywords") ;
                       document.getElementById(kwd).focus();
                       return false ; 
                 }
                 for (var i=0 ; i<typrad.length; i++ )
                  if (typrad[i].checked==true )
                    {  loptHMsearOpt =  typrad[i].value ; }
                      document.getElementById('ResResult').style.display = 'none' ; 
                 document.getElementById('RecLdr').style.display = 'block' ;
                 break ; 
            }

    searStr = document.getElementById(kwd).value ; 
    if(option!=1){
    //SearchRes.gfnHMSearch( document.getElementById(kwd).value , option , loptHMsearOpt , onSearchCntSuccess, onSearchCntLoadTimeout, onSearchCntFailure ) ;
    }
    document.getElementById("searOpt").value = option ;    
}

function onSearchCntSuccess( result, eventArgs )
{
    if(document.getElementById("searOpt").value == "1" )
    {
        document.getElementById('RecLdr').style.display = 'none' ;
        document.getElementById('ResResult').style.display = 'block' ;
        
        //document.getElementById('ResResult').innerHTML = "<a class='HL1' id='lnkSearchResult' href='javascript:NavSearLnk(\""+ document.getElementById('ctl00_cph_Search_txtResume').value +"\",1)'>"+ ( result=="0"?"Save your Search":(result=="1"? result + " result": result +" results")) +" </a>"  ;
        //document.getElementById('ResResult').innerHTML = "<a class='HL1' id='lnkSearchResult' href='javascript:NavSearch(\""+ document.getElementById('ctl00_cph_Search_txtResume').value +"\",1)'>"+ ( result=="0"?"Save your Search":(result=="1"? result + " result": result +" results")) +" </a>"  ;
          
        if(result=="0")
        {
             document.getElementById('ResResult').innerHTML = "<a class='HL1' id='lnkSearchResult' href='javascript:NavSearchMore(\""+ document.getElementById('ctl00_cph_Search_txtResume').value +"\",1)'>"+ ( result=="0"?"Save your Search":(result=="1"? result + " result": result +" results")) +" </a>" 
            //document.getElementById('ResResult').innerHTML = "<a class='HL1'>No Results Found</a>" ;
        }
        else
        {
            document.getElementById('ResResult').innerHTML = "<a class='HL1' style='font-size: larger;' id='lnkSearchResult' href='javascript:NavSearch(\""+ document.getElementById('ctl00_cph_Search_txtResume').value +"\",1,\""+document.getElementById('searchOption').value+"\")'>"+ ( result=="0"?"Save your Search":(result=="1"? result + " result": result +" results")) +" </a>"  ;
        }  
        
    }
     if(document.getElementById("searOpt").value == "2" )
    {
       document.getElementById('JbrLdr').style.display = 'none' ;       
       document.getElementById('JobberSearch').style.display = 'block' ;
       if(result=="0")
       {
            document.getElementById('JobberSearch').innerHTML =  "<a class='HL1' href='javascript:NavJobSearchMore(\""+ document.getElementById('ctl00_cph_Search_txtJobs').value +"\",2,\""+document.getElementById('searchOption').value+"\")'>"+ ( result=="0"?"Save your Search":(result=="1"? result + " result": result +" results")) +" </a>"  ;
       }
       else
       {
            document.getElementById('JobberSearch').innerHTML =  "<a class='HL1' href='javascript:NavJoSearch(\""+ document.getElementById('ctl00_cph_Search_txtJobs').value +"\",2,\""+document.getElementById('searchOption').value+"\")'>"+ ( result=="0"?"Save your Search":(result=="1"? result + " result": result +" results")) +" </a>"  ;
       }
    }
    if(document.getElementById("searOpt").value == "3" )
    {
        document.getElementById('hunLdr').style.display = 'none' ;
        document.getElementById('hunterSearch').style.display = 'block' ;
        document.getElementById('hunterSearch').innerHTML =  "<a class='HL1' href='javascript:NavSearLnk(\""+ document.getElementById('ctl00_cph_Search_tbPnlH_txtHunter').value +"\",3,\""+document.getElementById('searchOption').value+"\")'>"+ ( result=="0"?"Save your Search":(result=="1"? result + " result": result +" results")) +" </a>"  ;
    }
}

function onSearchCntLoadTimeout(result) {}
function onSearchCntFailure(result)  {}

// JScript File

var headAlrt="Go Recroot Alert :\n\n" ;
var headcnfrm ="Go Recroot Confirm :\n\n" ; 
			
			function RRalert(msg)
			{
			    alert('\n'+msg+'\n');
			}
			function Jalert(Msg)
			{
				//alert(headAlrt + Msg);
				alert(Msg);
			}
			
			function Jconfirm(Msg)
			{
			    return confirm(Msg);
				//return confirm(headcnfrm + Msg);
			}

    String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };


    function valbutton(ctlNm) {
                    var myOption = -1;
                  
                    var ctl = document.getElementsByName(ctlNm) ;
                        for (i=ctl .length-1; i > -1; i--) {
                        if (ctl [i].checked) {
                        myOption = i;
                        }
                        }
                        if (myOption == -1) {
                        return false;
                        }
                        else
                         return true;
                    }
                  function checksingleCheckBoxes(ctlId1)
                  {
                        var TemCtl=document.getElementById(ctlId1);                   
                        if (TemCtl.checked == false)
                            {
                                return false;
                            }
                            else
                            {
                                return true;
                            }    
                  }    
                function ddlVal(ctlID)
                {

                    var TemCtl = document.getElementById(ctlID) ;
                    if (TemCtl.value == "0" || TemCtl.value.trim() == "" )
                     return false;
                     else
                     return true;
                }
              function IndexddlVal(ctlID)
                {

                    var TemCtl = document.getElementById(ctlID) ;
                    if (TemCtl.value != "0")
                     return true;
                     else
                     return false;
                }
              
                 function RetrDdlVal(ctlID)
                {
                    var TemCtl = document.getElementById(ctlID) ;
                    return TemCtl.value;
                }
                              
           function txtEmpty(ctlID)
                {                       
                    
                    var TemCtl = document.getElementById(ctlID) ;                   
                    if (TemCtl.value.trim() == "")
                     return false;
                     else
                     return true;
                
                }
                function FindMax(ctlmin,ctlmax)
                {  
                    var Temmax = document.getElementById(ctlmax) ;   
                    var Temmin = document.getElementById(ctlmin) ;
                    if(Temmax.value < Temmin.value)
                        return false;
                    else
                        return true;
                }
                function NoValidation(ctlID)
                {
                    var noValid=document.getElementById(ctlID);
                     if(isNaN(noValid.value))
                        return false;    
                     else 
                        return true;             
                }
                function SectorValidation(ctlID)
                {
                    var TemCtl = document.getElementById(ctlID).value ;                   
                    if (TemCtl.value.trim() == "please select sector")
                     return false;
                     else
                     return true;
                }
                function SubSectorValidation(ctlID)
                {
                    var TemCtl = document.getElementById(ctlID) ;                   
                    if (TemCtl.value.trim() == "Please select a subsector")
                     return false;
                     else
                     return true;
                }
                function CountryValidation(ctlID)
                {
                    var TemCtl = document.getElementById(ctlID) ;                   
                    if (TemCtl.value.trim() == "Please select a Country")
                     return false;
                     else
                     return true;
                }
                
                 function OtherValidation(ctlID)
                {
                    var TemCtl = document.getElementById(ctlID).value ;                               
                    if (TemCtl.value.trim() != "other")
                     return false;
                     else
                     return true;
                }
                
                function Maxlength(ctlID)
                {
                    var TemCtl = document.getElementById(ctlID) ; 
                    return TemCtl.value.trim().Length;

                 }
                
                function txtChkPass(ctlID,ctlId2)
                {                       
                    
                    var TemCtl = document.getElementById(ctlID) ;  
                    var tempct2= document.getElementById(ctlId2) ;                  
                    if (TemCtl.value.trim() != tempct2.value.trim())
                     return false;
                     else
                     return true;
                
                }
                function checkCheckBoxes(ctlId1,ctlId2,ctlId3)
                {
                    var TemCtl=document.getElementById(ctlId1);
                    var TemCt2=document.getElementById(ctlId2);
                    var TemCt3=document.getElementById(ctlId3);
                    if (TemCtl.checked == false && TemCt2.checked == false && TemCt3.checked == false)
                        {
//                            alert ('You didn\'t choose any of the checkboxes!');
                            return false;
                        }
                        else
                        {
                            return true;
                        }
                
                }
                function ClearLang(ctlId1,ctlId2,ctlId3,ctlId4)
                {
                    var TemCtl=document.getElementById(ctlId1);
                    var TemCt2=document.getElementById(ctlId2);
                    var TemCt3=document.getElementById(ctlId3);
                    var TempCt4=document.getElementById(ctlId4);
//                    TemCtl.value == "" ;
//                    TemCt2.checked == false;
//                    TemCt3.checked == false;
//                    TempCt4.checked=false;
                    return true;
                }
                function retCtl(id)
                {
                    return document.getElementById( id ) ;
                }
                
                  function retValue(id)
                {
                    return document.getElementById( id ).value ;
                }
                
                
                function MobVal(id)
                {
                  var str = document.getElementById(id).value ;
                  
                  if (str.length== 13)
                  {
                      if ( str.substring(0, 1) == "+" )
                      {
                            return NumVal(str.substring(1, str.length - 1)) ; // strip out the leading + sign
                      }
                      else
                        return false ; // 13 digits with out leading + is not valid
                  }
                  else if (str.length== 12 || str.length== 10)
                   return NumVal(str) ;
                   else
                   return false ;
                }


                function NumVal(str)
                {
                    var con = !isNaN(str) ;
                     return con ;
                }
                
//                
//                
//              ///////////......................validaiton //////////////////
//              // this is Comparing Two Date

function CompareDates(dtFrom,dtTo,ErrMsg)
{
   var str1  = document.getElementById(dtFrom).value;
   var str2  = document.getElementById(dtTo).value;
   var dt1   = parseInt(str1.substring(0,2),10);
   var mon1  = parseInt(str1.substring(3,5),10);
   var yr1   = parseInt(str1.substring(6,10),10);
   var dt2   = parseInt(str2.substring(0,2),10);
   var mon2  = parseInt(str2.substring(3,5),10);
   var yr2   = parseInt(str2.substring(6,10),10);
   var date1 = new Date(yr1, mon1, dt1);
   var date2 = new Date(yr2, mon2, dt2);
   if(date2 < date1)

   {
      alert(ErrMsg);
      return false;
   }
   else
   {
      return true; 

   }

}
//// this is the end of the Code
/// home page validation
   function ValPower()
   {
      
            if (!ddlVal('ctl00_cph_ddlPowSector'))
            {
            alert("Please select the sector");
            return false ;
            }
             
            if (!ddlVal('ctl00_cph_ddlPowSubSector'))
            {
            alert("Please select the sub sector");
            return false ;
            }
             if (document.getElementById('ctl00_cph_lstPowWorkLocation').value=="")
             {
               alert( "Please select the location");
                return false;
               }
           if(!valbutton('ctl00$cph$radPowRad'))
            {
                        alert("Please select Resume included");
                        return false;
             }
            }
           function ValQuick()
            {
               if (document.getElementById('ctl00_cph_lstQckWorkLoc').value=="")
                {
                   alert( "Please select the location");
                    return false;
                }
               if(!valbutton('ctl00$cph$rblResInc'))
               {
                      alert("Please select Resume included");
                       return false;
               }
            
            }
            
           
           function ValQuickSearch()
           {
             if (document.getElementById('ctl00_cph_RL2_txtQuickSearchKeyword').value=="")
             {
                   alert( "Please enter the keyword") ;
                    return false ;
                }
            
            if (document.getElementById('ctl00_cph_RL2_lstQckWorkLoc').value=="")
            {
                   alert( "Please select the location") ;
                    return false ;
                }
               if(!valbutton('ctl00$cph$RL2$rblResInc'))
               {
                   alert("Please select Resume included") ;
                    return false ;
               }
               
              
      if (retValue('ctl00_SignUp_hdnUsrtyp') == "CAN" )
      {
           document.getElementById('lblResult').innerHTML ="Invalid search attempt. Please try again" ;
             
             showCmnPopUp('ctl00_cph_RL2_imgModResult') ;
             
             // close the search window
             showCmnPopUp('ctl00_cph_RL2_imgQuickSearchClose') ;
             return false ;
      }
      

        if (document.getElementById('ctl00_hdnUserReg').value.trim() == "N" )
          {
              
             mprQuickSearchCount();
             
             // show the result page
             showCmnPopUp('ctl00_cph_RL2_imgModResult') ;
    
             // close the search window
             showCmnPopUp('ctl00_cph_RL2_imgQuickSearchClose') ;
             
             return false ;
             }
             else
              mprNaviQuickSearch() ;

              
               return false ;
            }  
                   
           
                   
 function mprQuickSearchCount()
  {
    var kwd ,loc,option,relocate;
    kwd  =   document.getElementById('ctl00_cph_RL2_txtQuickSearchKeyword').value.trim()  ;

    var myindex  = document.getElementById('ctl00_cph_RL2_lstQckWorkLoc').selectedIndex ;
	var SelValue = document.getElementById('ctl00_cph_RL2_lstQckWorkLoc').options[myindex].value ;
    loc = SelValue ;
    
    for (i=0; i<document.aspnetForm.ctl00$cph$RL2$rblResInc.length; i++ )
    {
         if (document.aspnetForm.ctl00$cph$RL2$rblResInc[i].checked==true )
         {
           option =   document.aspnetForm.ctl00$cph$RL2$rblResInc[i].value ;
         }
      }
      
      if ( document.getElementById('ctl00_cph_RL2_chkRelocate').checked )
        relocate = '1' ;
      else
        relocate = '0' ;
    GetRecrooterQuickCnt( kwd,relocate,loc,option ) ;
       // call the web service
  }
  
 
  
  function mprAdvancedSearchCount()
 {
     var   sector,   subsector,   cntry, photo,   voice,   url,   resum,  option ,curren ;
     var  state,   city,   kwd,   relocate,    minsal,   maxsal ;
     var kwd ,loc,option,relocate ,sector,subsector ;
     kwd =  retValue('ctl00_cph_RL2_txtADVanKeyword')   ;
     city =  retValue('ctl00_cph_RL2_txtAdvanCity')   ;
     minsal =  retValue('ctl00_cph_RL2_txtAdvanMinSal')   ;
     maxsal =  retValue('ctl00_cph_RL2_txtAdvanMaxSal')   ;
     cntry =RetrDdlVal('ctl00_cph_RL2_ddlAdvanCountry');
     sector =RetrDdlVal('ctl00_cph_RL2_ddlAdvSector');
     subsector =RetrDdlVal('ctl00_cph_RL2_ddlAdvSubSector') ;
     state =RetrDdlVal('ctl00_cph_RL2_ddlAdvanState') ;
     curren =RetrDdlVal('ctl00_cph_RL2_ddlempHisCurrency') ;
     photo =RetrDdlVal('ctl00_cph_RL2_ddlAdvanPhoto') ;
     voice =RetrDdlVal('ctl00_cph_RL2_ddlAdvanVoice') ;
     relocate =RetrDdlVal('ctl00_cph_RL2_ddlAdvanRelocate') ;
     resum =RetrDdlVal('ctl00_cph_RL2_ddlAdvanProfile') ;
     url =RetrDdlVal('ctl00_cph_RL2_ddlAdvanURL') ;

     GetRecrooterAdvancedCnt(  sector,subsector,cntry,state,city, kwd,   relocate,minsal ,maxsal  ,
    photo, voice,   url,  resum,   '',     curren) ;

  }
  
  
 function mprPowerSearchCount()
 {
     
  var kwd ,loc,option,relocate ,sector,subsector;
   kwd =   document.getElementById('ctl00_cph_RL2_txtPowKwd').value   ;
    var myindex  = document.getElementById('ctl00_cph_RL2_lstPowWorkLocation').selectedIndex ;
	var SelValue = document.getElementById('ctl00_cph_RL2_lstPowWorkLocation').options[myindex].value ;
    loc=   SelValue ;
    
    for (i=0; i<document.aspnetForm.ctl00$cph$RL2$radPowRad.length; i++)
    {
         if (document.aspnetForm.ctl00$cph$RL2$radPowRad[i].checked==true )
         {
           option =   document.aspnetForm.ctl00$cph$RL2$radPowRad[i].value ;
         }
      }

      if (document.getElementById('ctl00_cph_RL2_chkPowRelocate').checked)
        relocate= '1' ;
      else
        relocate = '0' ;

     myindex  = document.getElementById('ctl00_cph_RL2_ddlPowSector').selectedIndex ;
	 SelValue = document.getElementById('ctl00_cph_RL2_ddlPowSector').options[myindex].value ;
     sector=   SelValue ;

     myindex  = document.getElementById('ctl00_cph_RL2_ddlPowSubSector').selectedIndex ;
	 SelValue = document.getElementById('ctl00_cph_RL2_ddlPowSubSector').options[myindex].value ;
        subsector=   SelValue ;
       
       GetRecrooterPowerCnt(   kwd,   relocate,   loc,  sector,subsector, option ) ;
  }
                   
                   
                   
          
    function ValPowerSearch(kwd,sector,subsector,location,typ,relocation)
    {

      if (!txtEmpty(kwd))
         {
                alert("Please enter the keyword");
                return false ;
            }
            if (!ddlVal(sector))
            {
            alert("Please select the sector");
            return false ;
            }
             
            if (!ddlVal(subsector))
            {
            alert("Please select the sub sector");
            return false ;
            }

           if (document.getElementById(location).value=="")
           {
            alert( "Please select the location") ;
            return false ;
           }
           if(!valbutton(typ))
           {
             alert("Please select Resume included") ;
             return false ;
           }
           mprNaviPowerSearch(kwd,sector,subsector,location,typ,relocation) ;
           return false ;
       }
       
       
 function mprNaviPowerSearch(kwd,sector,subsector,location,typ,relocation)
 {
    var qStr ;
        qStr = '/recrooter/quicksearchresult.aspx?Kwd=' ; // c%23&Loc=16&ResInc=1&Relocate=1&sector=1&subsector=1&typ=1' ;
    qStr += escape( document.getElementById(kwd).value ) ;
    var myindex  = document.getElementById(location).selectedIndex ;
	var SelValue = document.getElementById(location).options[myindex].value ;
    qStr += '&Loc=' + SelValue ;
    
    var typrad= document.getElementsByName(typ) ;
    
    for (i=0; i<typrad.length; i++)
    {
         if (typrad[i].checked==true )
         {
           qStr += '&ResInc=' + typrad[i].value ;
         }
      }
      qStr += '&Relocate=' ;

      if (document.getElementById(relocation).checked)
        qStr += '1' ;
      else
        qStr += '0' ;

     myindex  = document.getElementById(sector).selectedIndex ;
	 SelValue = document.getElementById(sector).options[myindex].value ;
     qStr += '&sector=' + SelValue ;

     myindex  = document.getElementById(subsector).selectedIndex ;
	 SelValue = document.getElementById(subsector).options[myindex].value ;
     qStr += '&subsector=' + SelValue ;
     qStr += '&typ=1' ;
       window.location = qStr ;
  }
       
      function Upload()
      {
         if(!txtEmpty('ctl00_uploadResume_txtNM'))
            {
                document.getElementById('ctl00_uploadResume_txtNM').focus();
                Jalert("Enter a name");
                return false;
            }  
              if(!txtEmpty('ctl00_uploadResume_txtEmail'))
            {
                document.getElementById('ctl00_uploadResume_txtEmail').focus();
                Jalert("Enter a email");
                return false;
            }

           if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.getElementById('ctl00_uploadResume_txtEmail').value))
           {
                Jalert("Invalid E-mail Address! Please re-enter.");
                document.getElementById('ctl00_uploadResume_txtEmail').focus();
                return false;
           }  
       }
      
          
    function JobberSmartSearch()
     {
            if(!txtEmpty('ctl00_cph_CL1_txtPowKeyword'))
            {
                document.getElementById('ctl00_cph_CL1_txtPowKeyword').focus();
                Jalert("Enter Keyword");
                return false;
            }        
            if(!txtEmpty('ctl00_cph_CL1_txtPowCity'))
            {
                document.getElementById('ctl00_cph_CL1_txtPowCity').focus();
                Jalert("Enter city");
                return false;
            }        
            
            if(!ddlVal('ctl00_cph_CL1_ddlPowSector'))
            {
                document.getElementById('ctl00_cph_CL1_ddlPowSector').focus() ;
                Jalert("Select the sector") ;
                return false ;
            }
             if(!ddlVal('ctl00_cph_CL1_ddlPowSubSector'))
            {
                document.getElementById('ctl00_cph_CL1_ddlPowSubSector').focus() ;
                Jalert("Select the subsector") ;
                return false ;
            }   
            return true
        }
     
 function JobberSmartSearch1()
 {
        if(!txtEmpty('ctl00_cph_txtPowKeyword'))
        {
            document.getElementById('ctl00_cph_txtPowKeyword').focus();
            Jalert("Enter Keyword");
            return false;
        }        
        if(!txtEmpty('ctl00_cph_txtPowCity'))
        {
            document.getElementById('ctl00_cph_txtPowCity').focus();
            Jalert("Enter city");
            return false;
        }        
        
        if(!ddlVal('ctl00_cph_ddlPowSector'))
        {
            document.getElementById('ctl00_cph_ddlPowSector').focus() ;
            Jalert("Select the sector") ;
            return false ;
        }
         if(!ddlVal('ctl00_cph_ddlPowSubSector'))
        {
            document.getElementById('ctl00_cph_ddlPowSubSector').focus() ;
            Jalert("Select the subsector") ;
            return false ;
        }   
        return true
    }
    
    
    function JobberPowerSearch()
    {
        if(!txtEmpty('ctl00_cph_CL1_txtpowersearch'))
        {
            document.getElementById('ctl00_cph_CL1_txtpowersearch').focus();
            Jalert("Enter Keyword");
            return false;
        }        
        if(!txtEmpty('ctl00_cph_CL1_txtAdvanCity'))
        {
            document.getElementById('ctl00_cph_CL1_txtAdvanCity').focus();
            Jalert("Enter city");
            return false;
        }        
        
        if(!ddlVal('ctl00_cph_CL1_ddlSector'))
        {
            document.getElementById('ctl00_cph_CL1_ddlSector').focus() ;
            Jalert("Select the sector") ;
            return false ;
        }
         if(!ddlVal('tl00_cph_CL1_ddlSubSector'))
        {
            document.getElementById('tl00_cph_CL1_ddlSubSector').focus() ;
            Jalert("Select the subsector") ;
            return false ;
        }   
        if(isNaN(document.getElementById('ctl00_cph_CL1_txtSalary').value))
            { 
                document.getElementById('ctl00_cph_CL1_txtSalary').focus() ;
                Jalert("Enter the proper salary") ;
                return false ;
             }
             
            if(!txtEmpty('ctl00_cph_CL1_txtSalary'))
            {
                    document.getElementById('ctl00_cph_CL1_txtSalary').focus() ;
                    Jalert("Enter the salary") ;
                    return false ;
                }  
                if( !txtEmpty('ctl00_cph_CL1_txtCompNM') )
                {
                    document.getElementById('ctl00_cph_CL1_txtCompNM').focus() ;
                    Jalert("Enter the company name") ;
                    return false ;
                }  
          return true;
    }
       
       
       
       function JobberPowerSearch1()
    {
    
        if(!txtEmpty('ctl00_cph_txtpowersearch'))
        {
            document.getElementById('ctl00_cph_txtpowersearch').focus();
            Jalert("Enter Keyword");
            return false;
        }        
        if(!txtEmpty('ctl00_cph_txtAdvanCity'))
        {
            document.getElementById('ctl00_cph_txtAdvanCity').focus();
            Jalert("Enter city");
            return false;
        }        
        
        if(!ddlVal('ctl00_cph_ddlSector'))
        {
            document.getElementById('ctl00_cph_ddlSector').focus() ;
            Jalert("Select the sector") ;
            return false ;
        }
         if(!ddlVal('ctl00_cph_ddlSubSector'))
        {
            document.getElementById('ctl00_cph_ddlSubSector').focus() ;
            Jalert("Select the subsector") ;
            return false ;
        }
          
        if(isNaN(document.getElementById('ctl00_cph_txtSalary').value))
        { 
                document.getElementById('ctl00_cph_txtSalary').focus() ;
                Jalert("Enter the proper salary") ;
                return false ;
        }
             
        if( !txtEmpty('ctl00_cph_txtSalary'))
            {
                    document.getElementById('ctl00_cph_txtSalary').focus() ;
                    Jalert("Enter the salary") ;
                    return false ;
                }  
                if( !txtEmpty('ctl00_cph_txtCompNM') )
                {
                    document.getElementById('ctl00_cph_txtCompNM').focus() ;
                    Jalert("Enter the company name") ;
                    return false ;
                }  
        
          
          
          return true;
    }   
          
 
          
        function ValAdvancedSearch()
        {
        
          if (!txtEmpty('ctl00_cph_RL2_txtADVanKeyword'))
            {
                alert("Please enter the keyword");
                return false ;
            }
   
        if (!ddlVal('ctl00_cph_RL2_ddlAdvanContinent'))
        {
            alert("Please select the continent");
            return false ;
            }
            
        if (!ddlVal('ctl00_cph_RL2_ddlAdvanCountry'))
        {
            alert("Please select the country");
            return false ;
            }
            
            if (!ddlVal('ctl00_cph_RL2_ddlAdvanState'))
            {
            alert("Please select the state");
            return false ;
            }
      
            if (!ddlVal('ctl00_cph_RL2_ddlAdvSector'))
            {
            alert("Please select the sector");
            return false ;
            }
             
            if (!ddlVal('ctl00_cph_RL2_ddlAdvSubSector'))
            {
            alert("Please select the sub sector");
            return false ;
            }
            
            if (!txtEmpty('ctl00_cph_RL2_txtAdvanMinSal'))
            {
            alert("Please enter the Min salary");
            return false ;
            }
            
            if (!txtEmpty('ctl00_cph_RL2_txtAdvanMaxSal'))
            {
            alert("Please enter the Max salary");
            return false ;
            }
            
            
            
         if (retValue('ctl00_SignUp_hdnUsrtyp') == "CAN" )
          {
               document.getElementById('lblResult').innerHTML ="Invalid search attempt. Please try again" ;
                 
                // show the result page
                 showCmnPopUp('ctl00_cph_RL2_imgModResult') ;

                 // close the search window
                 showCmnPopUp('ctl00_cph_RL2_imgAdvanceSearchClose') ;

                 return false ;
          }
            
            
         if (document.getElementById('ctl00_hdnUserReg').value.trim() == "N" )
          {
          
             mprAdvancedSearchCount() ; 

             // show the result page
             showCmnPopUp('ctl00_cph_RL2_imgModResult') ;
    
             // close the search window
             showCmnPopUp('ctl00_cph_RL2_imgAdvanceSearchClose') ;
             
             return false ;
             }
            
            }
          
          
        function ValAdvanced()
        {

         if (!txtEmpty('ctl00_cph_txtKeyword'))
         {
                alert("Please enter the keyword");
                return false ;
            }

        if (!ddlVal('ctl00_cph_ddlContinent'))
        {
            alert("Please select the continent") ;
            return false ;
           }

           if (!ddlVal('ctl00_cph_ddlCountry'))
            {
            alert("Please select the country") ;
            return false ;
            }

          if (!ddlVal('ctl00_cph_ddlState'))
          {
            alert("Please select the state") ;
            return false ;
            }
      
            if (!ddlVal('ctl00_cph_ddlSector'))
            {
            alert("Please select the sector") ;
            return false ;
            }
             
        if (!ddlVal('ctl00_cph_ddlSubSector'))
         {
            alert("Please select the sub sector") ;
            return false ;

            }
            
        if (!txtEmpty('ctl00_cph_txtCity'))
         {
                alert("Please enter the city") ;
                return false ;
            }
            
         if (!txtEmpty('ctl00_cph_txtMinSal'))
           {
            alert("Please enter the Min salary") ;
            return false ;
            }
            
              if (!txtEmpty('ctl00_cph_txtMaxSal'))
            {
            alert("Please enter the Max salary") ;
            return false ;
            }
            
            }  
               
                      
        function ValZoom()
       {
      
        if (!ddlVal('ctl00_cph_ddlZoomContinent'))
            {
            alert("Please select the continent");
            return false ;
            }
            
              if (!ddlVal('ctl00_cph_ddlZoomCountry'))
            {
            alert("Please select the country");
            return false ;
            }
            
              if (!ddlVal('ctl00_cph_ddlZoomState'))
            {
            alert("Please select the state");
            return false ;
            }
      
            if (!ddlVal('ctl00_cph_ddlZoomSector'))
            {
                alert("Please select the sector");
                return false ;
            }
             
            if (!ddlVal('ctl00_cph_ddlZoomSubsector'))
            {
                alert("Please select the sub sector");
                return false ;
            }
          
             if (!txtEmpty('ctl00_cph_txtZoomMiniSal'))
            {
                alert("Please enter the Min salary");
                return false ;
            }
            
             if (isNaN(document.getElementById('ctl00_cph_txtZoomMiniSal').value))
            {
                    alert("Please enter the valid salary");
                        return false ;
            }
            
           if (!txtEmpty('ctl00_cph_txtZoomMaxSalary'))
            {
            alert("Please enter the Max salary");
            return false ;
            }
            
            if (isNaN(document.getElementById('ctl00_cph_txtZoomMaxSalary').value))
            {
                         alert("Please enter the valid salary");
                         return false ;
            }}
            
            
        function ValZoomSearch(kwd ,cont,cntry,state,city,sector,subsector , minsal, maxsal)
       {
        if (!txtEmpty(kwd))
        {
            alert("Please enter the keyword");
            return false ;
         }
         
        if (!ddlVal(cont))
        {
            alert("Please select the continent");
            return false ;
        }
              
            //        if (!ddlVal(cntry))
            //        {
            //            alert("Please select the country");
            //            return false ;
            //         }

            if (!txtEmpty(city))
            {
                alert("Please enter the city");
                document.getElementById(city).focus() ;
                return false ;
            }
          
            if (!ddlVal(state))
            {
            alert("Please select the state");
            return false ;
            }
      
            if (!ddlVal(sector))
            {
                alert("Please select the sector");
                return false ;
            }
             
            if (!ddlVal(subsector))
            {
                alert("Please select the sub sector");
                return false ;
            }
            
            if (!txtEmpty(city))
            {
                alert("Please enter the city");
                return false ;
            }
          
             if (!txtEmpty(minsal))
            {
                alert("Please enter the Min salary");
                return false ;
            }
            
           
            
             if (isNaN(document.getElementById(minsal).value))
            {
                    alert("Please enter the valid salary");
                        return false ;
            }
            
           if (!txtEmpty(maxsal))
            {
            alert("Please enter the Max salary") ;
            return false ;
            }
            
            if (isNaN(document.getElementById(maxsal).value))
            {
                         alert("Please enter the valid salary") ;
                         return false ;
            }
            
            }
            
            
            function ValQuick()
            {
 
               if (document.getElementById('ctl00_cph_lstQckWorkLoc').value=="")
                {
                   alert( "Please select the location") ;
                    return false ;
                }
               if(!valbutton('ctl00$cph$rblResInc'))
               {
                      alert("Please select Resume included") ; 
                       return false ;
               }
            }
            
            function txtChkPass(ctlID,ctlId2)
            {
                    var TemCtl = document.getElementById(ctlID) ;
                    var tempct2 = document.getElementById(ctlId2) ;             
    
                    if (TemCtl.value.trim() != tempct2.value.trim())
                     return false ;
                     else
                     return true ;
             }
                
    /* for control value selection */
    function SelectOption( CtlID , val)
    {
      var ctlObj = document.getElementById(CtlID) ;
      for (var ite = 0; ite < ctlObj.options.length ; ite++ )
             if (ctlObj.options[ ite ].value == val ) 
             {
                var retId = ctlObj.options[ ite ].value +":::"+ctlObj.options[ ite ].text ;
                ctlObj.options[ ite ].selected = true ;
                
                return retId ;

                //alert( val ) ;
             }
    }
            
    function SetText( CtlID , val)
    {
      var ctlObj = document.getElementById(CtlID) ;
       ctlObj.value = val ;
    }
     
     // return the array of string 
     function strSplit( str , delimiter )
     {
     //alert(str);
        var str_array=str.split(delimiter) ;
        return str_array ;
     }

 /* 
     while (part_num < col_array.length)  document.cookie 
     {
      alert(col_array[part_num]);
      part_num+=1;
      }
 */
 
 
 
 
 
 
 
 
 //   general validation
 
 
 
 
 
 
   function GenValPowerSearch( kwd , sector , subsector , location ,radbtn )
    {
          if (!txtEmpty(kwd))
             {
                    alert("Please enter the keyword");
                    return false ;
             }
      
            if (!ddlVal(sector))
            {
            alert("Please select the sector");
            return false ;
            }
             
            if (!ddlVal(subsector))
            {
            alert("Please select the sub sector");
            return false ;
            }

           if (document.getElementById(location).value.trim()=="")
           {
            alert( "Please select the location");
            return false;
           }
           if( !valbutton(radbtn) )
            {
                        alert("Please select Resume included");
                        return false;
             }
       }


 function GenValPowerSearch_Page( kwd , sector , subsector , location ,radbtn )
    {
          if (!txtEmpty(kwd))
          {
                    alert("Please enter the keyword");
                    return false ;
             }
      
         if (!ddlVal(sector))
         {
            alert("Please select the sector");
            return false ;
            }
             
        if (!ddlVal(subsector))
        {
            alert("Please select the sub sector");
            return false ;
         }

        if (document.getElementById(location).value.trim()=="")
        {
            alert( "Please select the location");
            return false;
         }

        if( !valbutton(radbtn) )
        {
           alert("Please select Resume included");
           return false ;
        }
        

     var ctlRad = document.getElementsByName(radbtn) ;
     var option,relocate ;
     for (var Cnt=0; Cnt<ctlRad.length; Cnt++ )
     {
             if (ctlRad[Cnt].checked==true )
             {
               option =   ctlRad[Cnt].value ;
             }
      }
      
      if ( retCtl('ctl00_cph_dr1_chkPowRelocate').checked )
        relocate = '1' ;
      else
        relocate = '0' ;
        
        setDrillPwrParam(retValue(kwd) +"~"+ retDRPSelVal(sector)+"~"+ retDRPSelVal(subsector)+"~"+ retDRPSelVal(location)+"~"+option+"~"+relocate) ;  
        setDrillDown(3) ;  
        
        //settgSerEvnt(0) ;
        document.getElementById('ctl00_cph_dr1_imgPowerSearchClose').click();

        clrTagDisp();
        IntMajOper() ;
        
        
        return false;
        
       //return  retValue(kwd) +"~"+ retDRPSelVal(sector)+"~"+ retDRPSelVal(subsector)+"~"+ retDRPSelVal(location)+"~"+option+"~"+relocate

   }


function retDRPSelVal(id)
{
 return retCtl(id).options[retCtl(id).selectedIndex].value  ;
}


      function GenValQuickSearch(kwd,location,type)
      {
             if (document.getElementById(kwd).value=="")
                {
                   alert( "Please enter the keyword") ;
                    return false ;
                }
            
               if (document.getElementById(location).value=="")
                {
                   alert( "Please select the location") ;
                    return false ;
                }
               if(!valbutton(type))
               {
                      alert("Please select Resume included") ;
                       return false ;
               }
    }  
            
      function GenValAdvancedSearch(kwd,conti,country,state,sector,subsector,minsal,maxsal)
      {
      if (!txtEmpty(kwd)){alert("Please enter the keyword");return false ;}
      if (!ddlVal(conti)){alert("Please select the continent");return false ;}
      if (!ddlVal(country)){alert("Please select the country");return false ; }
      if (!ddlVal(state)){alert("Please select the state");return false ;}
      if (!ddlVal(sector)){alert("Please select the sector");return false ;}
      if (!ddlVal(subsector)){alert("Please select the sub sector");return false ;}
      if (!txtEmpty(minsal)){alert("Please enter the Min salary");return false ;}
      if (!txtEmpty(maxsal)){alert("Please enter the Max salary");return false ;}
     }
     
      function GenValAdvancedSearch_page(kwd,conti,country,state,sector,subsector,minsal,maxsal)
      {
          if (!txtEmpty(kwd)){alert("Please enter the keyword");return false ; }
          if (!ddlVal(conti)){alert("Please select the continent");return false ; }
          if (!ddlVal(country)){alert("Please select the country");return false ; }
          if (!ddlVal(state)){alert("Please select the state");return false ; }
          if (!ddlVal(sector)){alert("Please select the sector");return false ; }
          if (!ddlVal(subsector)){alert("Please select the sub sector");return false ; }
          if (!txtEmpty(minsal)){alert("Please enter the Min salary");return false ; }
          if (!txtEmpty(maxsal)){alert("Please enter the Max salary");return false ; }
          
        setDrillZomParam(retValue(kwd)+"~"+ retDRPSelVal(conti) +"~"+ retDRPSelVal(country)+"~"+ retDRPSelVal(state)+"~"+ retDRPSelVal(sector)+"~"+ retDRPSelVal(subsector) +"~"+ retValue(minsal)
                +"~"+ retValue(maxsal) + "~" + retValue('ctl00_cph_dr1_txtZoomCity')
                +"~"+ retDRPSelVal('ctl00_cph_dr1_ddlZoomPhoto')
                +"~"+ retDRPSelVal('ctl00_cph_dr1_ddlZoomVoiceClip')
                +"~"+ retDRPSelVal('ctl00_cph_dr1_ddlZoomProfile')
                +"~"+ retDRPSelVal('ctl00_cph_dr1_ddlZoomWillReloc')
                +"~"+ retDRPSelVal('ctl00_cph_dr1_ddlZoomUrl')
                +"~"+ retDRPSelVal('ctl00_cph_dr1_ddlZoomCurr')) ; 

         setDrillDown( 4 ) ;
         clrTagDisp();
    	   document.getElementById('ctl00_cph_dr1_imgZoomSearchClose').click();

      //  settgSerEvnt(0) ; // disable the cloud
        IntMajOper() ;

        return false ;
     }
     
     function clrTagDisp()
     {
         document.getElementById('hidID').value = "" ;
    	 document.getElementById('ctl00_cph_spTxt').innerHTML ="" ;
    	 document.getElementById('ctl00_cph_spSecCloud').innerHTML="";
    	 document.getElementById('HidSearch').value ="";
   	 //setDrillPwrParam('') ;  setDrillZomParam('');
    	 var typrad= document.getElementsByName('ctl00$cph$radLst') ;
         for (var i=0; i<typrad.length; i++)
                typrad[i].checked = false ;
         
     }
     
     
//      function GenValAdvancedSearch_Page(kwd,conti,country,state,sector,subsector,minsal,maxsal)
//      {
//          if (!txtEmpty(kwd)){alert("Please enter the keyword");return false ;}
//          if (!ddlVal(conti)){alert("Please select the continent");return false ;}
//          if (!ddlVal(country)){alert("Please select the country");return false ; }
//          if (!ddlVal(state)){alert("Please select the state");return false ;}
//          if (!ddlVal(sector)){alert("Please select the sector");return false ;}
//          if (!ddlVal(subsector)){alert("Please select the sub sector");return false ;}
//          if (!txtEmpty(minsal)){alert("Please enter the Min salary");return false ;}
//          if (!txtEmpty(maxsal)){alert("Please enter the Max salary");return false ;}
//     }

     
function showCmnPopUp(id)
{
     var SUPopUp =  document.getElementById( id ) ;
     //SUPopUp.click() ;
}
     
    function GenValJobQuickSearch(kwd,city)
    {
          if (!txtEmpty(kwd)){alert("Please enter the keyword");return false ;}
          if (!txtEmpty(city)){alert("Please select the city");return false ;}
          
//           if (retValue('ctl00_SignUp_hdnUsrtyp') == "COM" )
//           {
//            document.getElementById('ctl00_cph_ResultPane').innerHTML ="Invalid search attempt. Please try again" ;
//       
//              // show the result page
//             showCmnPopUp('ctl00_cph_jsearctl_imgModResult') ;
//    
//             // close the search window
//             showCmnPopUp('ctl00_cph_jsearctl_imgQuickSearchClose') ;
//             
//            return false ;
//           }
//          
//          if (document.getElementById('ctl00_hdnUserReg').value.trim() == "N" )
//          {
//             GetJobberQuickCnt(retValue(kwd),retValue(city)) ;
//             
//             // show the result page
//             showCmnPopUp('ctl00_cph_jsearctl_imgModResult') ;
//    
//             // close the search window
//             showCmnPopUp('ctl00_cph_jsearctl_imgQuickSearchClose') ;
//             
//             return false ;
//             }
            
            
        GetJobberQuickCnt(retValue(kwd),retValue(city)) ;
            
            
       }
       
       
       
     
        
function GenValJobSmartSearch(kwd,location,city,sector,subsector, exp,typ)
{
      if (!txtEmpty(kwd)){alert("Please enter the keyword");return false ; }
      if (!txtEmpty(city)){alert("Please enter the city");return false ; }
      if (!ddlVal(sector)){alert("Please select the sector");return false ; }
      if (!ddlVal(subsector)){alert("Please select the sub sector");return false ; }
      if (!ddlVal(exp)){alert("Please select the experience");return false ; }
      if (document.getElementById(location).value==""){alert( "Please select the location") ;return false ;}
      DisID(kwd,location,city,sector,subsector, exp,typ);
      
//      if (retValue('ctl00_SignUp_hdnUsrtyp') =="COM" )
//           {
//           document.getElementById('ctl00_cph_ResultPane').innerHTML ="Invalid search attempt. Please try again" ;
//                // show the result page
//             showCmnPopUp('ctl00_cph_jsearctl_imgModResult') ;
//    
//             // close the search window
//             showCmnPopUp('ctl00_cph_jsearctl_imgPowerSearchClose') ;
//            
//            return false ;
//           }
//        if (document.getElementById('ctl00_hdnUserReg').value.trim() == "N" )
//          {
//             GetJobberSmartCnt( RetrDdlVal(location),  retValue(city), retValue(kwd),
//             RetrDdlVal(sector), RetrDdlVal(exp), RetrDdlVal(subsector), RetrDdlVal(typ))
//             
//             //GetJobberQuickCnt(retValue(kwd),retValue(city)) ;
//             
//             // show the result page
//             showCmnPopUp('ctl00_cph_jsearctl_imgModResult') ;
//    
//             // close the search window
//             showCmnPopUp('ctl00_cph_jsearctl_imgPowerSearchClose') ;
//             
//             return false ;
//             }


}


function GenValJobPowerSearch(kwd,location,city,sector,subsector, exp ,typ,recruiter,salary,cur)
{
      if (!txtEmpty(kwd)){alert("Please enter the keyword");return false ; }
      if (!txtEmpty(city)){alert("Please enter the city");return false ; }
      if (!ddlVal(sector)){alert("Please select the sector");return false ; }
      if (!ddlVal(subsector)){alert("Please select the sub sector");return false ; }
      if (!ddlVal(exp)){alert("Please select the experience");return false ; }
      if (document.getElementById(location).value==""){alert( "Please select the location") ;return false ;}
      if (!txtEmpty(recruiter)){alert("Please enter the recuiter name");return false ; }
      if (!txtEmpty(salary)){alert("Please enter the salary");return false ; }
      
      powID(kwd,location,city,sector,subsector, exp ,typ,recruiter,salary,cur) ;
      
      
//      if (retValue('ctl00_SignUp_hdnUsrtyp') == "COM" )
//      {
//           document.getElementById('ctl00_cph_ResultPane').innerHTML ="Invalid search attempt. Please try again" ;
//             
//             showCmnPopUp('ctl00_cph_jsearctl_imgModResult') ;
//    
//             // close the search window
//             showCmnPopUp('ctl00_cph_jsearctl_imgAdvanceSearchClose') ;
//             return false ;
//      }
//       if ( document.getElementById('ctl00_hdnUserReg').value.trim() == "N" )
//          {
//             GetJobberPowerCnt( RetrDdlVal(location),  retValue(city), retValue(kwd),
//             RetrDdlVal(sector), RetrDdlVal(exp), RetrDdlVal(subsector), RetrDdlVal(typ)
//             ,retValue( recruiter ),retValue( salary ),RetrDdlVal(cur));
//              
//             // show the result page

//             showCmnPopUp('ctl00_cph_jsearctl_imgModResult') ;
//    
//             // close the search window
//             showCmnPopUp('ctl00_cph_jsearctl_imgAdvanceSearchClose') ;
//             
//             return false ;
//             }
   }
   
     function SignIn()
     {            
             
                    showSigASup(''); //show                     
                    document.getElementById('divWizardStep1').style.display = "none" ;
                    document.getElementById('divWizardStep2a').style.display = "none" ;
                    document.getElementById('divWizardStep2b').style.display = "block" ;
                    document.getElementById('ctl00_SignUp_txtUserName').focus();
       }
            
      function SearchOpt(id, option,searstat)
      {
                document.getElementById(searstat).value = option ;
               //ctl00_cph_searOpt
                document.getElementById(id).focus();
                return false ; 
        }
        
        function showHelpContextDetails(Mode)
        {
            switch(Mode)
            {
                //EMail
                case "E":
                    document.getElementById('divHelpContextDetail').innerHTML = "customercare@gorecroot.com";
                    break;
                    
                //Chat
                case "C":
                    document.getElementById('divHelpContextDetail').innerHTML = "ChatOn@gorecroot.com";
                    break;
                    
                //Chat
                case "P":
                    document.getElementById('divHelpContextDetail').innerHTML = "04443009030";
                    break;
                
                case "":
                    document.getElementById('divHelpContextDetail').innerHTML = "";
                    break;
            }
        }
        
        /*      CODE HAS BEEN TAKEN FROM RRSEARCHWINDOW.ASCX    DEC_06_2007     */
        
       

  var HMsearOpt ;

      function MicroNavSearLnk(kwd ,opt,searchOption)
      {
          var urlStr ;
          if (opt ==1)
          {
            //urlStr = "/recrooter/moresearch.aspx?param=" + encodeURIComponent( kwd ) + "&opt=" + loptHMsearOpt ;
            urlStr = "/recrooter/ResumeSearch.aspx?param=" + encodeURIComponent( kwd )+"&option="+searchOption ;
          }
          else  if (opt == 2)
          {
            urlStr = "/jobber/jobbermicrosearch.aspx?param=" + encodeURIComponent( kwd )  + "&opt=" + loptHMsearOpt+"&option="+searchOption ;
          }
          else  if (opt == 3)
          {
            urlStr = "/recrooter/moresearch.aspx?Hnter=" + encodeURIComponent( kwd )  + "&ParOpt=" + loptHMsearOpt +"&option="+searchOption;
          }
          window.location = urlStr ;
      }
      function MicroNavSearLnkMore(kwd)
      {
        urlStr="/recrooter/moresearch.aspx?param=" + encodeURIComponent( kwd );
        window.location = urlStr ;
      }
function clickButton(e, buttonid)
{ 
      var bt = document.getElementById(buttonid);       
      if (typeof bt == 'object')
      { 
            if(navigator.appName.indexOf("Netscape")>(-1))
            { 
                  if (e.keyCode == 13)
                  { 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
            { 
                  if (event.keyCode == 13)
                  { 
                        bt.click(); 
                        return false; 
                  } 
            } 
        }      
}

function SetFocustoControl(option)
{
     switch(option)
        {
            case "R":                    
                document.getElementById("ctl00_RRHS1_jsearctl_divResume").style.display= "block";                
                //document.getElementById("ctl00_RRHS1_jsearctl_divJobs").style.display= "none";
                document.getElementById("ctl00_RRHS1_jsearctl_divHunter").style.display= "none";
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_BResume.jpg";
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_AJobs.jpg";
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_AHunter.jpg";
                document.getElementById("ctl00_RRHS1_jsearctl_txtResume").focus();                
                searchType = option ;
                break ;                
            case "J":
                document.getElementById("ctl00_RRHS1_jsearctl_divResume").style.display= "none" ;               
                document.getElementById("ctl00_RRHS1_jsearctl_divJobs").style.display= "block" ;
                document.getElementById("ctl00_RRHS1_jsearctl_divHunter").style.display= "none" ;
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingAResume.jpg" ;
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingYJobs.jpg" ;
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_AHunter.jpg" ;                       
                document.getElementById("ctl00_RRHS1_jsearctl_txtJobs").focus() ;  
                searchType = option ;
                break ;
            }
        return false;
}

//    By Aba to check for atleast two keywords
    function keywordCheck(kwdId)
    {
            //    By Aba to check for atleast two keywords
                    var keywordLimit=2;

                    var keywordvalue=document.getElementById(kwdId).value.trim();

                    
                    //Jalert(spacelen+","+pluslen);
                    
                    var c=0;
                    while(c!=1)
                    {
                        keywordvalue=keywordvalue.replace(/  /g,' ');
                        keywordvalue=keywordvalue.replace(/\+\+/g,'+');
                        
                        //Jalert(keywordvalue+","+keywordvalue.length);
                        
                        if(keywordvalue.indexOf("  ")==-1 && keywordvalue.indexOf("++")==-1)
                        {
                            c=1;
                        }
                    }
                   // Jalert("Final : "+keywordvalue+","+keywordvalue.length);
                    
                    c=0;
                    while(c!=1)
                    {
                        if(keywordvalue.charAt(keywordvalue.length-1)==' ')
                        {
                            keywordvalue=keywordvalue.substring(0,keywordvalue.length-1);
                        }
                        
                        if(keywordvalue.charAt(keywordvalue.length-1)=='+')
                        {
                            keywordvalue=keywordvalue.substring(0,keywordvalue.length-1);
                        }                        
                        
                        if(keywordvalue.charAt(0)==' ')
                        {
                            keywordvalue=keywordvalue.substring(1,keywordvalue.length);
                        }
                        
                        if(keywordvalue.charAt(0)=='+')
                        {
                            keywordvalue=keywordvalue.substring(1,keywordvalue.length);
                        } 
                        
                        
                        if(keywordvalue.charAt(keywordvalue.length-1)!=' ' && keywordvalue.charAt(keywordvalue.length-1)!='+' && keywordvalue.charAt(0)!=' ' && keywordvalue.charAt(0)!='+')
                        {
                            c=1;
                        }
                        
                        //Jalert("Pre Final : "+keywordvalue+","+keywordvalue.length);
                     }
                    // Jalert("lastPre Final : "+keywordvalue+","+keywordvalue.length);

                     
                        
                    keywordvalue=keywordvalue.replace(/\+ /g,' ');
                    keywordvalue=keywordvalue.replace(/ \+/g,' ');
                    
                   // Jalert("FinalFinal : "+keywordvalue+","+keywordvalue.length);
      
                        
                    keywordvalue=keywordvalue.replace(/\+/g,' ');
                   // Jalert("Replacing + with space : "+keywordvalue+","+keywordvalue.length);
                    
                    var keyarray=keywordvalue.split(" ");
                    var spacelen=keyarray.length                    
                    
                    for(var xi=0;xi<spacelen;xi++)
                    {
                        if(keyarray[xi]=='')
                            spacelen=spacelen-1;
                    }
                    
                    //Jalert("split length : "+keywordvalue+","+spacelen);
                    if (spacelen<keywordLimit)
                    {
                        Jalert("Please search with at least two keywords");
                        return false;
                    }
                    return true;
    }
    
    var searchType ;
    function mprMicroSearchLoadImg(option)
    {
        switch(option)
        {
            case "R":                    
                document.getElementById("ctl00_RRHS1_jsearctl_divResume").style.display= "block";                
                document.getElementById("ctl00_RRHS1_jsearctl_divJobs").style.display= "none";
                document.getElementById("ctl00_RRHS1_jsearctl_divHunter").style.display= "none";
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_BResume.jpg";
                //document.getElementById("ctl00_RRHS1_jsearctl_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_AJobs.jpg";
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_AHunter.jpg";
                document.getElementById("ctl00_RRHS1_jsearctl_txtResume").focus();                
                searchType = option ;
                break ;                
            case "J":
                document.getElementById("ctl00_RRHS1_jsearctl_divResume").style.display= "none" ;               
                document.getElementById("ctl00_RRHS1_jsearctl_divJobs").style.display= "block" ;
                document.getElementById("ctl00_RRHS1_jsearctl_divHunter").style.display= "none" ;
                //document.getElementById("ctl00_RRHS1_jsearctl_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingAResume.jpg" ;
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingYJobs.jpg" ;
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_AHunter.jpg" ;                       
                document.getElementById("ctl00_RRHS1_jsearctl_txtJobs").focus() ;  
                searchType = option ;
                break ;
            case "H":               
                document.getElementById("ctl00_RRHS1_jsearctl_divResume").style.display= "block" ;
                document.getElementById("ctl00_RRHS1_jsearctl_divJobs").style.display= "none" ;
                document.getElementById("ctl00_RRHS1_jsearctl_divHunter").style.display= "none" ;
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnResume").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingAResume.jpg" ;
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnJobs").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGoRecRoot_AJobs.jpg" ;
                document.getElementById("ctl00_RRHS1_jsearctl_imgbtnHunter").src="/Images/GoRecRoot_Buttons/GoRecRoot_LandingGHunter.jpg" ; 
                document.getElementById("ctl00_RRHS1_jsearctl_txtHunter").focus() ;  
                searchType = option ;
                break;              
        }
        return false;
}    
var loptHMsearOpt ;
function microsearchResult(kwd, option)
{
       var typrad= document.getElementsByName('ctl00$RRHS1$jsearctl$radAndOr') ;
       var typJorad= document.getElementsByName('ctl00$RRHS1$jsearctl$radJobOpt') ;

        switch(searchType)
        {
                case "R":
//                 if ( document.getElementById(kwd).value.trim()  == "" )
//                 {
//                       Jalert("Enter keyword") ;
//                       document.getElementById(kwd).focus();
//                       return false ; 
//                 }    

                //By Aba to check for two keyword mandate
                 if(!keywordCheck(kwd))
                 {
                    return false;
                 }
                 
                 for (var i=0 ; i<typrad.length; i++ )
                 { 
                                        if (typrad[i].checked==true )
                                        {
                                          loptHMsearOpt =  typrad[i].value ;
                                         }
                   }
                 break ;

                case "J" :
                     typrad= document.getElementsByName('ctl00$RRHS1$jsearctl$radJobOpt');
                     if(document.getElementById(kwd).value==" ")
                     {
                        Jalert("Please enter a keyword to search");
                        return false;
                     }
                    for (var i=0 ; i<typrad.length; i++ )
                     if (typrad[i].checked==true )
                         loptHMsearOpt =  typrad[i].value ;
                     switch(loptHMsearOpt)
                     {
                        case "1":
                            //var url="/JobSearch/JobSearchPage.aspx?query="+escape(document.getElementById(kwd).value);
                            var url="/JobSearch/JobSearchPipes.aspx?param="+escape(document.getElementById(kwd).value);
                            this.location.href=url;
                            break;
                         case "2":
                            //var url="/JobSearch/JobSearchaMatic.aspx?param="+escape(document.getElementById(kwd).value);
                            var url="/JobSearch/JobSearchCareer.aspx?query="+escape(document.getElementById(kwd).value);
                            //var url="/JobSearch/JobSearchOption.aspx?param="+escape(document.getElementById(kwd).value);
                            this.location.href=url;
                            break;
                         case "3":
                            //var url="/JobSearch/JobSearchEurope.aspx?query="+escape(document.getElementById(kwd).value)+"&option=4";
                            var url="/JobSearch/JobSearchPipes.aspx?query="+escape(document.getElementById(kwd).value);
                            this.location.href=url;
                            break;
                     }   
/*                 //    alert("The value is "+loptHMsearOpt);    
                    if(loptHMsearOpt=="1"){
                         var url="/jobber/JobSearchPage.aspx?query="+escape(document.getElementById(kwd).value);
                         this.location.href=url;
                        //document.getElementById('searchOption').value="0";
                        //USResumeSearch.gfnJOCount(document.getElementById(kwd).value,false,onSearchCntSuccess, onSearchCntLoadTimeout, onSearchCntFailure)
                     }
                     else
                     {
                        var url="/jobber/JobSearchaMatic.aspx?param="+escape(document.getElementById(kwd).value);
                        this.location.href=url;
                      //document.getElementById('JobberSearch').innerHTML =  "<a href='http://gorecroot.jobamatic.com/' target='_blank'>External site </a>"  ;
                       
                     }*/
                    break;
                
            /*     if ( document.getElementById(kwd).value.trim()  == "" )
                 {
                       Jalert("Enter keyword") ;
                       document.getElementById(kwd).focus();
                       return false ; 
                 }   
                 for (var i=0 ; i<typJorad.length; i++ )
                 { 
                                        if (typJorad[i].checked==true )
                                        {
                                          loptHMsearOpt =  typJorad[i].value ;
                                         }
                   }
                    break ;*/
                case "H": 
                     Jalert("Coming soon") ;
                     return false ; 
                      //                 if ( document.getElementById(kwd).value.trim()  == "" )
                      //                 {
                      //                       Jalert("Enter keyword") ;
                      //                       document.getElementById(kwd).focus();
                      //                       return false ; 
                      //                  }   
                      //                  loptHMsearOpt =  document.getElementById('ctl00_RRHS_jsearctl_ddlHunter').value ;
                      //                  break ;
                        
          default: // default option recrooter
                   
                if ( document.getElementById(kwd).value.trim()  == "" )
                 {
                       Jalert("Enter keyword") ;
                       document.getElementById(kwd).focus();
                       return false ; 
                 }
                 
                 for (var i=0 ; i<typrad.length; i++ )
                 { 
                                        if (typrad[i].checked==true )
                                        {
                                          loptHMsearOpt =  typrad[i].value ;
                                         }
                   }
                    break ; 
            }
          //  bndOperation() ;
            
            
           

  //  SearchRes.gfnHMSearch( document.getElementById(kwd).value , option , loptHMsearOpt , onMicroSearchCntSuccess, onMicroSearchCntLoadTimeout, onMicroSearchCntFailure ) ;
  
  if(loptHMsearOpt=="1")
  {
    document.getElementById('searchOption').value="0";
    USResumeSearch.gfnResumeCount(document.getElementById(kwd).value,false,onMicroSearchCntSuccess, onMicroSearchCntLoadTimeout, onMicroSearchCntFailure);
  }
  else
  {
      document.getElementById('searchOption').value="1";
  //   USResumeSearch.gfnResumeCount(document.getElementById(kwd).value,true,onMicroSearchCntSuccess, onMicroSearchCntLoadTimeout, onMicroSearchCntFailure);
  }
  //USResumeSearch.gfnResumeCount(document.getElementById(kwd).value,onMicroSearchCntSuccess, onMicroSearchCntLoadTimeout, onMicroSearchCntFailure);
  document.getElementById('ResResult').style.display="none;";
    document.getElementById('RecLdr').style.display="block;";
    document.getElementById("searOpt").value = option ;
}

function onMicroSearchCntSuccess(result, eventArgs)
{
    if(document.getElementById("searOpt").value == "1" )
    {
        document.getElementById('RecLdr').style.display="none;";
        document.getElementById('ResResult').style.display="block;";
      // document.getElementById('ResResult').innerHTML = "<a class='HL1' href='javascript:MicroNavSearLnk(\""+ document.getElementById('ctl00_CRHS_jsearctl_txtResume').value +"\",1)'>"+ ( result=="0"?"Results not found":(result=="1"? result + " result": result +" results")) +" </a>"  ;
      if(result=="0")
      {
        document.getElementById('ResResult').innerHTML = "<a class='HL1' href='javascript:MicroNavSearLnkMore(\""+document.getElementById('ctl00_RRHS1_jsearctl_txtResume').value+"\");'>Save your search </a>"  ;
      }
      else
      {
             document.getElementById('ResResult').innerHTML = "<a class='HL1' href='javascript:MicroNavSearLnk(\""+ document.getElementById('ctl00_RRHS1_jsearctl_txtResume').value +"\",1,\""+document.getElementById('searchOption').value+"\")'>"+ ( result=="0"?"Results not found":(result=="1"? result + " result": result +" results")) +" </a>"  ;

        //document.getElementById('ResResult').innerHTML = "<a class='HL1' href='javascript:MicroNavSearLnk(\""+ document.getElementById('ctl00_RRHS1_jsearctl_txtResume').value +"\",1,\""+document.getElementById('searchOption').value+"\")'>"+result +" results") +" </a>"  ;
      }
      
    }
     if(document.getElementById("searOpt").value == "2" )
    {
       //document.getElementById('JobberSearch').innerHTML =  "<a class='HL1' href='javascript:MicroNavSearLnk(\""+ document.getElementById('ctl00_CRHS_jsearctl_txtJobs').value +"\",2)'>"+ ( result=="0"?"Results not found":(result=="1"? result + " result": result +" results")) +" </a>"  ;
       document.getElementById('JobberSearch').innerHTML =  "<a class='HL1' href='javascript:MicroNavSearLnk(\""+ document.getElementById('ctl00_RRHS1_jsearctl_txtJobs').value +"\",2,\""+document.getElementById('searchOption').value+"\")'>"+ ( result=="0"?"Results not found":(result=="1"? result + " result": result +" results")) +" </a>"  ;
    }
    if(document.getElementById("searOpt").value == "3" )
    {
       //document.getElementById('hunterSearch').innerHTML =  "<a class='HL1' href='javascript:MicroNavSearLnk(\""+ document.getElementById('ctl00_CRHS_jsearctl_txtHunter').value +"\",3)'>"+ ( result=="0"?"Results not found":(result=="1"? result + " result": result +" results")) +" </a>"  ;
       document.getElementById('hunterSearch').innerHTML =  "<a class='HL1' href='javascript:MicroNavSearLnk(\""+ document.getElementById('ctl00_RRHS1_jsearctl_txtHunter').value +"\",3,\""+document.getElementById('searchOption').value+"\")'>"+ ( result=="0"?"Results not found":(result=="1"? result + " result": result +" results")) +" </a>"  ;
    }
}

function onMicroSearchCntLoadTimeout(result) {}
function onMicroSearchCntFailure(result)  {}

/*      It is taken from Default_New.aspx   */


      var HMsearOpt ;

      function NavSearLnk(kwd ,opt)
      {
          var urlStr ;
          if (opt ==1)
          {
            urlStr = "/recrooter/moresearch.aspx?param=" + encodeURIComponent( kwd ) + "&opt=" + loptHMsearOpt ;
          }
          else  if (opt == 2)
          {
            urlStr = "/jobber/jobbermicrosearch.aspx?param=" + encodeURIComponent( kwd )  + "&opt=" + loptHMsearOpt ;
          }
          else  if (opt == 3)
          {
            urlStr = "/recrooter/moresearch.aspx?Hnter=" + encodeURIComponent( kwd )  + "&ParOpt=" + loptHMsearOpt ;
          }
          window.location = urlStr ;
      }
   //for Jo Search by muthu on April 9 2008
   function NavJoSearch(kwd,option,searchOption)
   {
        var urlStr;
        urlStr="/jobber/jobSearch.aspx?param="+escape(kwd)+"&option="+searchOption;
        window.location=urlStr;
   }
   function NavJobSearchMore(kwd,option,searchOption)
   {
        var urlStr;
        urlStr="/jobber/jobbermicrosearch.aspx?param="+escape(kwd)+"&option="+searchOption;
        window.location=urlStr;
   }
   //ends here   
   function NavSearch(kwd,option,searchOption)
   {
    var urlStr
    urlStr="/recrooter/ResumeSearch.aspx?param="+escape(kwd)+"&option="+searchOption;
    window.location=urlStr;
   }
  function NavSearchMore(kwd)
  {
    var urlStr;
    urlStr="/recrooter/moresearch.aspx?param=" + encodeURIComponent( kwd );
    window.location=urlStr;
  }
     function bndOperation()
     {
                var typrad= document.getElementsByName('ctl00$cph$radAndOr') ;
                      for ( i=0 ; i<typrad.length; i++ )
                      {
                                    if (typrad[i].checked==true )
                                    {
                                      HMsearOpt =  typrad[i].value ;
                                      alert(typrad[i].value);
                                     }
                       }
       }


     function bndKwd(kwd)
     {
              bndOperation() ;
              if (searchType == null)
              {
                 if ( document.getElementById('ctl00_cph_Search_txtResume').value.indexOf(kwd) == -1 )
                    if (document.getElementById('ctl00_cph_Search_txtResume').value =="" )
                        document.getElementById('ctl00_cph_Search_txtResume').value = kwd ;
                    else
                        document.getElementById('ctl00_cph_Search_txtResume').value +="+" + kwd ;
                        
                    return ;
                }
                
         switch(searchType)
         {
                case "R":
                 if ( document.getElementById('ctl00_cph_Search_txtResume').value.indexOf(kwd) == -1 )
                    if (document.getElementById('ctl00_cph_Search_txtResume').value =="" )
                        document.getElementById('ctl00_cph_Search_txtResume').value = kwd ;
                    else
                        document.getElementById('ctl00_cph_Search_txtResume').value +="+" + kwd ;               
                        
                    break ;                
                case "J":
                   if ( document.getElementById('ctl00_cph_Search_txtJobs').value.indexOf(kwd) == -1 )
                    if (document.getElementById('ctl00_cph_Search_txtJobs').value =="" )
                        document.getElementById('ctl00_cph_Search_txtJobs').value = kwd ;
                    else
                        document.getElementById('ctl00_cph_Search_txtJobs').value +="+" + kwd ; 
                    break ;
                case "H": 
                  if ( document.getElementById('ctl00_cph_Search_tbPnlH_txtHunter').value.indexOf(kwd) == -1 )
                    if (document.getElementById('ctl00_cph_Search_tbPnlH_txtHunter').value =="" )
                        document.getElementById('ctl00_cph_Search_tbPnlH_txtHunter').value = kwd ;
                    else
                        document.getElementById('ctl00_cph_Search_tbPnlH_txtHunter').value +="+" + kwd ; 
                    break ;
            }
       }       
   
    
        
        
 //codeblock from bannerblurb.ascx
 var Tot_Txt = 0 ,  Column_Cnt = 0 ,intervalle=10000;var numbre_total_txt;

            var ColCnt ;

            var txt = new Array();

            var col = new Array();

            function boucle_images1()

            {

                 /* txt[0]='GoRecroot webstore\<br \> Specialized products for YOU.';
                  txt[1]='What is your Cost Per Hire\<br \> HUGE savings on CPH at GoRecroot';
                  txt[2]='Hello Bienvenue Willkommen Benvenuto\<br \> Fòonying Welkom Yokoso Swagath';
                  txt[3]='YOUR resume means a career for you\<br \> We handle it with CARE';
                  txt[4]='This is your Webware & Store\<br \> You pay ONLY for results';
                  txt[5]='Audio, video, mobile, web 2.0\<br \> Technology to drive business results';   
                  txt[6]='Work sucks. Career&rsquo;s great\<br \> Go figure. Go Recroot';
                  txt[7]='Global recruitment 101\<br \> 102,103...199 and more';
                  txt[8]='Lifetime warranty\<br \> Void if not used';
                  txt[9]='There is beer and\<br \> There is GoRecroot';
                  txt[10]='Hangup and GoRecroot';
                  txt[11]='DARE to put your recruiting \<br \> brains to good use';   
                  txt[12]='If you can read this, you can\<br \> jolly well use GoRecroot';         
                  txt[13]='35% holiday season discount on now';         
                  txt[14]='Discounts will be applied as\<br \> credits in your discount bucket';
                  txt[15]='100% Customer\<br \> Satisfaction guarateed';*/
                  
                          
                    txt[0]='Join now.\<br \> Create your multimedia resume';
                    txt[1]='GoRecroot - \<br \>specialized ads & branding solutions';
                    txt[2]='Join now.\<br \> No cost and no obligation basis';
                    txt[3]='What is your Cost Per Hire.\<br \> HUGE savings on CPH at GoRecroot';
                    txt[4]='Free Job postings at \<br \> GoRecroot';
                    txt[5]='Hello Bienvenue Willkommen Benvenuto\<br \>  Fòonying Welkom Yokoso Swagath';
                    txt[6]= 'YOUR resume means a career for you. \<br \>We handle it with CARE';
                    txt[7]='Talent searching, mapping and scheduling at its best ';
                    txt[8]='Ads and Branding solutions. \<br \>Reach out and progress';
                    txt[9]='High ROI, reduced time and effort, increased efficiencies';
                    txt[10]='Audio, video, mobile, web 2.0\<br \> Technology to drive business results';   
                    txt[11]='Work sucks. Careers great \<br \>Go figure. GoRecroot';
                    txt[12]='Go Mobile \<br \> Go Recroot Mobile & SMS enabled';
                    txt[13]='Global recruitment \<br \>101 102,103...199 and more';
                    txt[14]='We would love to hear from you\<br \> help@gorecroot.com';
                    txt[15]='Lifetime warranty \<br \>Void if not used';
                    txt[16]='There is beer and \<br \>There is GoRecroot';
                    txt[17]='Do you have your resume \<br \>widget yet? Join and make one';
                    txt[18]='Hang-up and GoRecroot';
                    txt[19]='Big biller recruiters do not waste \<br \>time in resume data management';
                    txt[20]='Easy to use. No brainer \<br \>on your recruiting budgets';
                    txt[21]= 'DARE to put your recruiting \<br \> brains to good use';   
                    txt[22]='Questions? Check out FAQ,\<br \> Resources and Tour sections as well';
                    txt[23]='If you can read this, you \<br \>can jolly well use GoRecroot';                    
                    txt[24]='Get tips for effective voice clips \<br \> at help@gorecroot.com ';        
                    txt[25]='100% Customer Satisfaction guaranteed';
                    txt[26]='Get tips for best video resume results\<br \> at <ahref="mailto:help@gorecroot.com">help@gorecroot.com</a>';
                    txt[27]='Distributing your resumes –  \<br \> Use widgets for best results  ';  
                    txt[28]='How to use widgets for distribution – \<br \> Ask <ahref="mailto:help@gorecroot.com">help@gorecroot.com</a>';     
                    txt[29]='Distributing job orders –  \<br \> Use widgets for best results  ';  
                    txt[30]='How to use widgets for distribution – \<br \> Ask <ahref="mailto:help@gorecroot.com">help@gorecroot.com</a>'; 
                    txt[31]='If you can use your keyboard and \<br \> click with your mouse, you can Go Recroot '; 
                    txt[32]='Did you tell a friend about \<br \> GoRecroot’s functional value today  '; 
                    txt[33]='Check out tips for voice resume \<br \> at Blog.Gorecroot.com '; 
                    txt[34]='New age multi media recruitment \<br \> ads & branding '; 
                    txt[35]='The best of employer branding, \<br \> now at GoRecroot '; 
                    txt[36]='GoRecroot – success secrets \<br \> of big billers are now yours to have '; 
                    txt[37]='1, 2, 3, 4, 5  > Sign in, \<br \> Go to webtop, Create JO, Map, Finish '; 
                    txt[38]='Join and create or upload your resume \<br \> Confidential, Passive, Active modes available '; 
                    txt[39]='Do not compromise on your privacy \<br \> Do not compromise on your career fit as well '; 
                    txt[40]='Balanced approach, consistency is the key \<br \> Key to successful job fulfillments '; 
                    txt[41]='Maximize your career potential \<br \> Get the right job and get in the groove '; 
                    txt[42]='Quietly evaluating your job fitment \<br \> Intellifit – alerts via email, SMS '; 
                    txt[43]='Do not reveal your contact details when in passive mode \<br \> Unmask your contact details only when in active mode '; 
                    txt[44]='Opt in, connect and schedule when you want to \<br \> And avoid getting bombarded by jobs which do not fit you '; 
                    txt[45]='Join FREE and get your Easy resume going \<br \> Less than 2 minutes is what this will take '; 
                    txt[46]='Use GoRecroot’s data OR your own data \<br \> Unique High ROI value propositions from GoRecroot as a platform '; 
                    txt[47]='Fixed cost budgeting, nominally priced subscription model \<br \> No variable, hidden or usage based costs to worry about '; 
                    txt[48]='Database downloads, sift, sort, sweat and zero yield \<br \> The recruiting rules have changed globally. Have you? '; 
                    txt[49]='Recruitment ads, Employment branding solutions \<br \> Are you ready to meet and make best use of the future? '; 
                    txt[50]='Not sure of your recruits or hires communication and voice rendition! \<br \> No issues. Get a voice clip or two evaluated and make your decision '; 
                    txt[51]='Wow, a great resume and a good fit, \<br \> but not there yet. What is missing? '; 
                    txt[52]='A photo or a video spot goes a long way \<br \> In better trust building and mitigating mistakes '; 
                    txt[53]='More power to the recruiter, hiring manager and the jobseeker \<br \> Rich media is on at GoRecroot. Put it to your advantage '; 
                    txt[54]='Series of asynchronously shared voice clips or streamed video \<br \> Can amount to better decisions by the recruiter and the job seeker '; 
                    txt[55]='Reduce guesstimation. \<br \> Increase your matchmaking quotient ';
                    txt[56]='Talent and Jobs are there to be matched perfectly \<br \> Search, Analyze, Map, Schedule. Go Intellifit ';
                    txt[57]='Get multiple subs and get discounts \<br \> Focus on quality with required quantity ';
                    txt[58]='Get your Professional and Premium subscriptions now\<br \>Go to Store and click on View à View prices';
                    txt[59]='Get Ads and Branding solutions working for you\<br \>Guaranteed ad results or your money back';
                    txt[60]='Have your tried (below footer)\<br \>Search and Map assistant';
                    txt[61]='If you have tried (and paid a ransom) other job sites\<br \>Give yourself a break. Graduate to GoRecroot';
                    txt[62]='Search, Analyze, Map, Rate and Schedule\<br \>JO fulfillment. The smarter way';
                    txt[63]='Have some feedback or a question\<br \>Email help@gorecroot.com';
                    txt[64]='Democratizing Data — Clicking Once, Twice, Thrice\<br \>JOB FILLED, CPH LOWERED';                    
                    
                    col[0]='BBB';
                    

                  numbre_total_txt = 16 ;
                  ColCnt = 1 ;
                  txtrotate();
            }
            

            function txtrotate()
            {
                  Tot_Txt = rnd(numbre_total_txt);
                  Column_Cnt = rnd(ColCnt);
                  if(Tot_Txt == numbre_total_txt)
                  Tot_Txt=0 ;
                  if(Column_Cnt == ColCnt)
                  Column_Cnt = 0 ;
                  try
                  {
                  document.getElementById('dvBB').innerHTML =  txt[Tot_Txt];
                  document.getElementById('dvBB').className = col[Column_Cnt];
                  setTimeout('txtrotate()',intervalle) ;
                  }
                  catch(Err)
                  {
                    
                  }
            }
            boucle_images1();
            
            function rnd(max)
            { 
                 var rndnum = max * Math.random() ;
                  rndnum = Math.ceil (rndnum) ;
                  return rndnum ;
            }
            function mfnBindSearchWord(keyword)
            {
                if(document.getElementById('ctl00_cph_Search_txtJobs').value.trim()=="")
                    document.getElementById('ctl00_cph_Search_txtJobs').value+=keyword;
                 else
                    document.getElementById('ctl00_cph_Search_txtJobs').value+=" "+keyword;
                 
                 if(document.getElementById('ctl00_cph_Search_txtResume').value.trim()=="")
                    document.getElementById('ctl00_cph_Search_txtResume').value+=keyword;
                 else
                    document.getElementById('ctl00_cph_Search_txtResume').value+=" "+keyword;
                    
            }
            function mfnCheckUserSubscription()
            {
                FlatFileWebService.gfnCheckSubscriptionStatus("test",onSubscriptionCheckSuccess,onSubscriptionCheckFailure,onSubscriptionCheckTimeout);
            }
            
            function onSubscriptionCheckSuccess(result,EventArgs)
            {
                var result1=result.split('|');
                if(result1[0]!=3)
                {
                    alert(result1[1]);
                }
                else
                {
                    doDateCheck();
                }
            }
            
            function onSubscriptionCheckFailure()
            {
            }
            
            function onSubscriptionCheckTimeout()
            {
            }/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){YAHOO.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.5.1",build:"984"});/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var D=this.subscribers.length;if(!D&&this.silent){return true;}var H=[].slice.call(arguments,0),F=true,C,I=false;if(!this.silent){}var B=this.subscribers.slice();for(C=0;C<D;++C){var K=B[C];if(!K){I=true;}else{if(!this.silent){}var J=K.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var A=null;if(H.length>0){A=H[0];}try{F=K.fn.call(J,A,K.obj);}catch(E){this.lastError=E;}}else{try{F=K.fn.call(J,this.type,H,K.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}return true;},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M].slice();for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=L.length-1;O>-1;O--){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=J.length-1;O>-1;O--){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J.splice(O,1);return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M.splice(O,1);break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;
if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;M=M+1){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return ;}if(this.locked){return ;}if(this.isIE){if(!this.DOMReady){this.startInterval();return ;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0&&F.length>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=F.length;L<K;L=L+1){O=F[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(H||N.nextSibling||!Q){M.push(O);F[L]=null;}}else{R(N,O);F[L]=null;}}else{P.push(O);}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O);}C--;if(Q){for(L=F.length-1;L>-1;L--){O=F[L];if(!O||!O.id){F.splice(L,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(Q){var K=YAHOO.util.Event,N,M,L,P,O,R=J.slice();for(N=0,P=J.length;N<P;++N){L=R[N];if(L){var S=window;if(L[K.ADJ_SCOPE]){if(L[K.ADJ_SCOPE]===true){S=L[K.UNLOAD_OBJ];}else{S=L[K.ADJ_SCOPE];}}L[K.FN].call(S,K.getEvent(Q,L[K.EL]),L[K.UNLOAD_OBJ]);R[N]=null;L=null;S=null;}}J=null;if(I){for(M=I.length-1;M>-1;M--){L=I[M];if(L){K.removeListener(L[K.EL],L[K.TYPE],L[K.FN],M);}}L=null;}G=null;K._simpleRemove(window,"unload",K._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);
I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.5.1",build:"984"});/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
(function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P;}if(J[P]){return J[P];}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[P]=Q;return Q;};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\s+)"+Q+"(?:\\s+|$)");F[Q]=P;}return P;};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat";}var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)];}return P.style[S]||R;};}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(S){try{T=P.filters("alpha").opacity;}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q);}};}else{K=function(P,Q){return P.style[Q];};}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(YAHOO.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1;}}break;case"float":Q="styleFloat";default:P.style[Q]=R;}};}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat";}P.style[Q]=R;};}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P));};YAHOO.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R;}if(YAHOO.lang.isString(R)||!R){return M.getElementById(R);}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q]);}return S;}return R;},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R);};return B.Dom.batch(P,Q,B.Dom,true);},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S);};B.Dom.batch(P,Q,B.Dom,true);},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}return H(R);};return B.Dom.batch(P,Q,B.Dom,true);},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0];};return B.Dom.batch(P,Q,B.Dom,true);},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1];};return B.Dom.batch(P,Q,B.Dom,true);},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative";}var X=this.getXY(V);if(X===false){return false;}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft;}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop;}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px";}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q]);},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}var S=B.Region.getRegion(R);return S;};return B.Dom.batch(P,Q,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[];}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R]);}}}return Q;},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className);};return B.Dom.batch(R,S,B.Dom,true);},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false;}S.className=YAHOO.lang.trim([S.className,P].join(" "));return true;};return B.Dom.batch(Q,R,B.Dom,true);},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false;}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},replaceClass:function(S,Q,P){if(!P||Q===P){return false;}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true;}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id;}var T=R+YAHOO.env._id_counter++;if(S){S.id=T;}return T;};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false;}if(P.contains&&Q.nodeType&&!L){return P.contains(Q);}else{if(P.compareDocumentPosition&&Q.nodeType){return !!(P.compareDocumentPosition(Q)&16);}else{if(Q.nodeType){return !!this.getAncestorBy(Q,function(R){return R==P;});}}}return false;},inDocument:function(P){return this.isAncestor(M.documentElement,P);},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[];}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U]);}}}return S;},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false;}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V);}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V);}return U;},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P;},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P;},getViewportHeight:function(){var P=self.innerHeight;
var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight;}return P;},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,R);},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase();};return B.Dom.getAncestorBy(Q,R);},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P;}}return null;},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getPreviousSiblingBy(P);},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P;}}return null;},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getNextSiblingBy(P);},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R);},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getFirstChildBy(P);},getLastChildBy:function(P,R){if(!P){return null;}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R);},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P);},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T;}return false;});return P;},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P);},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft);},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop);},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}return P.parentNode.insertBefore(Q,P);},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling);}else{return P.parentNode.appendChild(Q);}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q);}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)];};}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true;}Q=Q.offsetParent;}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop;}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(Q.scrollTop||Q.scrollLeft){if(!E.OP_SCROLL.test(B.Dom.getStyle(Q,"display"))){if(!C||B.Dom.getStyle(Q,"overflow")!=="visible"){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop;}}}Q=Q.parentNode;}return S;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.1",build:"984"});/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(F,B){var E;var A=this.owner;var C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.method){this.method.call(A,F);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var A in B){if(A&&YAHOO.lang.hasOwnProperty(B,A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B){return undefined;}return B.value;},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var D=[];var B;for(var C in this._configs){B=this._configs[C];if(A.hasOwnProperty(this._configs,C)&&!A.isUndefined(B)){D[D.length]=C;}}return D;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(this._configs[E[D]]&&!A.isUndefined(this._configs[E[D]].value)&&!A.isNull(this._configs[E[D]].value)){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var D=YAHOO.util.Dom,F=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(G,H){if(arguments.length){this.init(G,H);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(G){G=G.get?G.get("element"):G;this.get("element").appendChild(G);},getElementsByTagName:function(G){return this.get("element").getElementsByTagName(G);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(G,H){G=G.get?G.get("element"):G;H=(H&&H.get)?H.get("element"):H;this.get("element").insertBefore(G,H);},removeChild:function(G){G=G.get?G.get("element"):G;this.get("element").removeChild(G);return true;},replaceChild:function(G,H){G=G.get?G.get("element"):G;H=H.get?H.get("element"):H;return this.get("element").replaceChild(G,H);},initAttributes:function(G){},addListener:function(K,J,L,I){var H=this.get("element");I=I||this;H=this.get("id")||H;var G=this;if(!this._events[K]){if(this.DOM_EVENTS[K]){YAHOO.util.Event.addListener(H,K,function(M){if(M.srcElement&&!M.target){M.target=M.srcElement;}G.fireEvent(K,M);},L,I);}this.createEvent(K,this);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(H,G){this.unsubscribe.apply(this,arguments);},addClass:function(G){D.addClass(this.get("element"),G);},getElementsByClassName:function(H,G){return D.getElementsByClassName(H,G,this.get("element"));},hasClass:function(G){return D.hasClass(this.get("element"),G);},removeClass:function(G){return D.removeClass(this.get("element"),G);},replaceClass:function(H,G){return D.replaceClass(this.get("element"),H,G);},setStyle:function(I,H){var G=this.get("element");if(!G){return this._queue[this._queue.length]=["setStyle",arguments];}return D.setStyle(G,I,H);},getStyle:function(G){return D.getStyle(this.get("element"),G);},fireQueue:function(){var H=this._queue;for(var I=0,G=H.length;I<G;++I){this[H[I][0]].apply(this,H[I][1]);}},appendTo:function(H,I){H=(H.get)?H.get("element"):D.get(H);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:H});I=(I&&I.get)?I.get("element"):D.get(I);var G=this.get("element");if(!G){return false;}if(!H){return false;}if(G.parent!=H){if(I){H.insertBefore(G,I);}else{H.appendChild(G);}}this.fireEvent("appendTo",{type:"appendTo",target:H});},get:function(G){var I=this._configs||{};var H=I.element;if(H&&!I[G]&&!YAHOO.lang.isUndefined(H.value[G])){return H.value[G];}return F.prototype.get.call(this,G);},setAttributes:function(L,H){var K=this.get("element");
for(var J in L){if(!this._configs[J]&&!YAHOO.lang.isUndefined(K[J])){this.setAttributeConfig(J);}}for(var I=0,G=this._configOrder.length;I<G;++I){if(L[this._configOrder[I]]!==undefined){this.set(this._configOrder[I],L[this._configOrder[I]],H);}}},set:function(H,J,G){var I=this.get("element");if(!I){this._queue[this._queue.length]=["set",arguments];if(this._configs[H]){this._configs[H].value=J;}return ;}if(!this._configs[H]&&!YAHOO.lang.isUndefined(I[H])){C.call(this,H);}return F.prototype.set.apply(this,arguments);},setAttributeConfig:function(G,I,J){var H=this.get("element");if(H&&!this._configs[G]&&!YAHOO.lang.isUndefined(H[G])){C.call(this,G,I);}else{F.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(G);},getAttributeKeys:function(){var H=this.get("element");var I=F.prototype.getAttributeKeys.call(this);for(var G in H){if(!this._configs[G]){I[G]=I[G]||H[G];}}return I;},createEvent:function(H,G){this._events[H]=true;F.prototype.createEvent.apply(this,arguments);},init:function(H,G){A.apply(this,arguments);}};var A=function(H,G){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];G=G||{};G.element=G.element||H||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var I=false;if(YAHOO.lang.isString(H)){C.call(this,"id",{value:G.element});}if(D.get(H)){I=true;E.call(this,G);B.call(this,G);}YAHOO.util.Event.onAvailable(G.element,function(){if(!I){E.call(this,G);}this.fireEvent("available",{type:"available",target:G.element});},this,true);YAHOO.util.Event.onContentReady(G.element,function(){if(!I){B.call(this,G);}this.fireEvent("contentReady",{type:"contentReady",target:G.element});},this,true);};var E=function(G){this.setAttributeConfig("element",{value:D.get(G.element),readOnly:true});};var B=function(G){this.initAttributes(G);this.setAttributes(G,true);this.fireQueue();};var C=function(G,I){var H=this.get("element");I=I||{};I.name=G;I.method=I.method||function(J){H[G]=J;};I.value=I.value||H[G];this._configs[G]=new YAHOO.util.Attribute(I,this);};YAHOO.augment(YAHOO.util.Element,F);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.5.1",build:"984"});/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
(function(){YAHOO.widget.TabView=function(K,J){J=J||{};if(arguments.length==1&&!YAHOO.lang.isString(K)&&!K.nodeName){J=K;K=J.element||null;}if(!K&&!J.element){K=I.call(this,J);}YAHOO.widget.TabView.superclass.constructor.call(this,K,J);};YAHOO.extend(YAHOO.widget.TabView,YAHOO.util.Element);var F=YAHOO.widget.TabView.prototype;var E=YAHOO.util.Dom;var H=YAHOO.util.Event;var D=YAHOO.widget.Tab;F.CLASSNAME="yui-navset";F.TAB_PARENT_CLASSNAME="yui-nav";F.CONTENT_PARENT_CLASSNAME="yui-content";F._tabParent=null;F._contentParent=null;F.addTab=function(M,O){var P=this.get("tabs");if(!P){this._queue[this._queue.length]=["addTab",arguments];return false;}O=(O===undefined)?P.length:O;var R=this.getTab(O);var T=this;var L=this.get("element");var S=this._tabParent;var Q=this._contentParent;var J=M.get("element");var K=M.get("contentEl");if(R){S.insertBefore(J,R.get("element"));}else{S.appendChild(J);}if(K&&!E.isAncestor(Q,K)){Q.appendChild(K);}if(!M.get("active")){M.set("contentVisible",false,true);}else{this.set("activeTab",M,true);}var N=function(V){YAHOO.util.Event.preventDefault(V);var U=false;if(this==T.get("activeTab")){U=true;}T.set("activeTab",this,U);};M.addListener(M.get("activationEvent"),N);M.addListener("activationEventChange",function(U){if(U.prevValue!=U.newValue){M.removeListener(U.prevValue,N);M.addListener(U.newValue,N);}});P.splice(O,0,M);};F.DOMEventHandler=function(P){var K=this.get("element");var Q=YAHOO.util.Event.getTarget(P);var S=this._tabParent;if(E.isAncestor(S,Q)){var L;var M=null;var J;var R=this.get("tabs");for(var N=0,O=R.length;N<O;N++){L=R[N].get("element");J=R[N].get("contentEl");if(Q==L||E.isAncestor(L,Q)){M=R[N];break;}}if(M){M.fireEvent(P.type,P);}}};F.getTab=function(J){return this.get("tabs")[J];};F.getTabIndex=function(N){var K=null;var M=this.get("tabs");for(var L=0,J=M.length;L<J;++L){if(N==M[L]){K=L;break;}}return K;};F.removeTab=function(M){var L=this.get("tabs").length;var K=this.getTabIndex(M);var J=K+1;if(M==this.get("activeTab")){if(L>1){if(K+1==L){this.set("activeIndex",K-1);}else{this.set("activeIndex",K+1);}}}this._tabParent.removeChild(M.get("element"));this._contentParent.removeChild(M.get("contentEl"));this._configs.tabs.value.splice(K,1);};F.toString=function(){var J=this.get("id")||this.get("tagName");return"TabView "+J;};F.contentTransition=function(K,J){K.set("contentVisible",true);J.set("contentVisible",false);};F.initAttributes=function(J){YAHOO.widget.TabView.superclass.initAttributes.call(this,J);if(!J.orientation){J.orientation="top";}var L=this.get("element");if(!YAHOO.util.Dom.hasClass(L,this.CLASSNAME)){YAHOO.util.Dom.addClass(L,this.CLASSNAME);}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||G.call(this);this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||C.call(this);this.setAttributeConfig("orientation",{value:J.orientation,method:function(M){var N=this.get("orientation");this.addClass("yui-navset-"+M);if(N!=M){this.removeClass("yui-navset-"+N);}switch(M){case"bottom":this.appendChild(this._tabParent);break;}}});this.setAttributeConfig("activeIndex",{value:J.activeIndex,method:function(M){this.set("activeTab",this.getTab(M));},validator:function(M){return !this.getTab(M).get("disabled");}});this.setAttributeConfig("activeTab",{value:J.activeTab,method:function(N){var M=this.get("activeTab");if(N){N.set("active",true);this._configs["activeIndex"].value=this.getTabIndex(N);}if(M&&M!=N){M.set("active",false);}if(M&&N!=M){this.contentTransition(N,M);}else{if(N){N.set("contentVisible",true);}}},validator:function(M){return !M.get("disabled");}});if(this._tabParent){B.call(this);}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var K in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,K)){this.addListener.call(this,K,this.DOMEventHandler);}}};var B=function(){var Q,L,P;var O=this.get("element");var N=A(this._tabParent);var K=A(this._contentParent);for(var M=0,J=N.length;M<J;++M){L={};if(K[M]){L.contentEl=K[M];}Q=new YAHOO.widget.Tab(N[M],L);this.addTab(Q);if(Q.hasClass(Q.ACTIVE_CLASSNAME)){this._configs.activeTab.value=Q;this._configs.activeIndex.value=this.getTabIndex(Q);}}};var I=function(J){var K=document.createElement("div");if(this.CLASSNAME){K.className=this.CLASSNAME;}return K;};var G=function(J){var K=document.createElement("ul");if(this.TAB_PARENT_CLASSNAME){K.className=this.TAB_PARENT_CLASSNAME;}this.get("element").appendChild(K);return K;};var C=function(J){var K=document.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){K.className=this.CONTENT_PARENT_CLASSNAME;}this.get("element").appendChild(K);return K;};var A=function(M){var K=[];var N=M.childNodes;for(var L=0,J=N.length;L<J;++L){if(N[L].nodeType==1){K[K.length]=N[L];}}return K;};})();(function(){var E=YAHOO.util.Dom,J=YAHOO.util.Event;var B=function(L,K){K=K||{};if(arguments.length==1&&!YAHOO.lang.isString(L)&&!L.nodeName){K=L;L=K.element;}if(!L&&!K.element){L=H.call(this,K);}this.loadHandler={success:function(M){this.set("content",M.responseText);},failure:function(M){}};B.superclass.constructor.call(this,L,K);this.DOM_EVENTS={};};YAHOO.extend(B,YAHOO.util.Element);var F=B.prototype;F.LABEL_TAGNAME="em";F.ACTIVE_CLASSNAME="selected";F.ACTIVE_TITLE="active";F.DISABLED_CLASSNAME="disabled";F.LOADING_CLASSNAME="loading";F.dataConnection=null;F.loadHandler=null;F._loading=false;F.toString=function(){var K=this.get("element");var L=K.id||K.tagName;return"Tab "+L;};F.initAttributes=function(K){K=K||{};B.superclass.initAttributes.call(this,K);var M=this.get("element");this.setAttributeConfig("activationEvent",{value:K.activationEvent||"click"});this.setAttributeConfig("labelEl",{value:K.labelEl||G.call(this),method:function(N){var O=this.get("labelEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}else{if(M.firstChild){this.insertBefore(N,M.firstChild);}else{this.appendChild(N);}}}});this.setAttributeConfig("label",{value:K.label||D.call(this),method:function(O){var N=this.get("labelEl");
if(!N){this.set("labelEl",I.call(this));}C.call(this,O);}});this.setAttributeConfig("contentEl",{value:K.contentEl||document.createElement("div"),method:function(N){var O=this.get("contentEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}}});this.setAttributeConfig("content",{value:K.content,method:function(N){this.get("contentEl").innerHTML=N;}});var L=false;this.setAttributeConfig("dataSrc",{value:K.dataSrc});this.setAttributeConfig("cacheData",{value:K.cacheData||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("loadMethod",{value:K.loadMethod||"GET",validator:YAHOO.lang.isString});this.setAttributeConfig("dataLoaded",{value:false,validator:YAHOO.lang.isBoolean,writeOnce:true});this.setAttributeConfig("dataTimeout",{value:K.dataTimeout||null,validator:YAHOO.lang.isNumber});this.setAttributeConfig("active",{value:K.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(N){if(N===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE);}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(N){return YAHOO.lang.isBoolean(N)&&!this.get("disabled");}});this.setAttributeConfig("disabled",{value:K.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(N){if(N===true){E.addClass(this.get("element"),this.DISABLED_CLASSNAME);}else{E.removeClass(this.get("element"),this.DISABLED_CLASSNAME);}},validator:YAHOO.lang.isBoolean});this.setAttributeConfig("href",{value:K.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(N){this.getElementsByTagName("a")[0].href=N;},validator:YAHOO.lang.isString});this.setAttributeConfig("contentVisible",{value:K.contentVisible,method:function(N){if(N){this.get("contentEl").style.display="block";if(this.get("dataSrc")){if(!this._loading&&!(this.get("dataLoaded")&&this.get("cacheData"))){A.call(this);}}}else{this.get("contentEl").style.display="none";}},validator:YAHOO.lang.isBoolean});};var H=function(K){var O=document.createElement("li");var L=document.createElement("a");L.href=K.href||"#";O.appendChild(L);var N=K.label||null;var M=K.labelEl||null;if(M){if(!N){N=D.call(this,M);}}else{M=I.call(this);}L.appendChild(M);return O;};var G=function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];};var I=function(){var K=document.createElement(this.LABEL_TAGNAME);return K;};var C=function(K){var L=this.get("labelEl");L.innerHTML=K;};var D=function(){var K,L=this.get("labelEl");if(!L){return undefined;}return L.innerHTML;};var A=function(){if(!YAHOO.util.Connect){return false;}E.addClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=YAHOO.util.Connect.asyncRequest(this.get("loadMethod"),this.get("dataSrc"),{success:function(K){this.loadHandler.success.call(this,K);this.set("dataLoaded",true);this.dataConnection=null;E.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(K){this.loadHandler.failure.call(this,K);this.dataConnection=null;E.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get("dataTimeout")});};YAHOO.widget.Tab=B;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.5.1",build:"984"});/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
(function(){var G=YAHOO.util.Dom,L=YAHOO.util.Event,I=YAHOO.lang,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(N,M,Q,O){var R,P;if(I.isString(N)&&I.isString(M)){if(YAHOO.env.ua.ie){P="<input type=\""+N+"\" name=\""+M+"\"";if(O){P+=" checked";}P+=">";R=document.createElement(P);}else{R=document.createElement("input");R.name=M;R.type=N;if(O){R.checked=true;}}R.value=Q;return R;}}function H(N,T){var M=N.nodeName.toUpperCase(),R=this,S,O,P;function U(V){if(!(V in T)){S=N.getAttributeNode(V);if(S&&("value" in S)){T[V]=S.value;}}}function Q(){U("type");if(T.type=="button"){T.type="push";}if(!("disabled" in T)){T.disabled=N.disabled;}U("name");U("value");U("title");}switch(M){case"A":T.type="link";U("href");U("target");break;case"INPUT":Q();if(!("checked" in T)){T.checked=N.checked;}break;case"BUTTON":Q();O=N.parentNode.parentNode;if(G.hasClass(O,this.CSS_CLASS_NAME+"-checked")){T.checked=true;}if(G.hasClass(O,this.CSS_CLASS_NAME+"-disabled")){T.disabled=true;}N.removeAttribute("value");N.setAttribute("type","button");break;}N.removeAttribute("id");N.removeAttribute("name");if(!("tabindex" in T)){T.tabindex=N.tabIndex;}if(!("label" in T)){P=M=="INPUT"?N.value:N.innerHTML;if(P&&P.length>0){T.label=P;}}}function A(O){var N=O.attributes,M=N.srcelement,Q=M.nodeName.toUpperCase(),P=this;if(Q==this.NODE_NAME){O.element=M;O.id=M.id;G.getElementsBy(function(R){switch(R.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(P,R,N);break;}},"*",M);}else{switch(Q){case"BUTTON":case"A":case"INPUT":H.call(this,M,N);break;}}}YAHOO.widget.Button=function(Q,N){if(!B&&YAHOO.widget.Overlay){B=YAHOO.widget.Overlay;}if(!J&&YAHOO.widget.Menu){J=YAHOO.widget.Menu;}var P=YAHOO.widget.Button.superclass.constructor,O,M;if(arguments.length==1&&!I.isString(Q)&&!Q.nodeName){if(!Q.id){Q.id=G.generateId();}P.call(this,(this.createButtonElement(Q.type)),Q);}else{O={element:null,attributes:(N||{})};if(I.isString(Q)){M=G.get(Q);if(M){if(!O.attributes.id){O.attributes.id=Q;}O.attributes.srcelement=M;A.call(this,O);if(!O.element){O.element=this.createButtonElement(O.attributes.type);}P.call(this,O.element,O.attributes);}}else{if(Q.nodeName){if(!O.attributes.id){if(Q.id){O.attributes.id=Q.id;}else{O.attributes.id=G.generateId();}}O.attributes.srcelement=Q;A.call(this,O);if(!O.element){O.element=this.createButtonElement(O.attributes.type);}P.call(this,O.element,O.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked.  Click to check.",RADIO_CHECKED_TITLE:"Checked.  Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked.  Click to check.",CHECKBOX_CHECKED_TITLE:"Checked.  Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed.  Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded.  Click or press Esc to collapse.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed.  Click inside option region or press Ctrl + Shift + M to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(M){if(M=="split"){this.on("option",this._onOption);}},_setLabel:function(M){this._button.innerHTML=M;var O,N;if(YAHOO.env.ua.gecko&&G.inDocument(this.get("element"))){N=this;O=this.CSS_CLASS_NAME;this.removeClass(O);window.setTimeout(function(){N.addClass(O);},0);}},_setTabIndex:function(M){this._button.tabIndex=M;},_setTitle:function(N){var M=N;if(this.get("type")!="link"){if(!M){switch(this.get("type")){case"radio":M=this.RADIO_DEFAULT_TITLE;break;case"checkbox":M=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":M=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":M=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":M=this.SUBMIT_TITLE;break;}}this._button.title=M;}},_setDisabled:function(M){if(this.get("type")!="link"){if(M){if(this._menu){this._menu.hide();}if(this.hasFocus()){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(M){if(this.get("type")=="link"){this._button.href=M;}},_setTarget:function(M){if(this.get("type")=="link"){this._button.setAttribute("target",M);}},_setChecked:function(N){var O=this.get("type"),M;if(O=="checkbox"||O=="radio"){if(N){this.addStateCSSClasses("checked");M=(O=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{this.removeStateCSSClasses("checked");M=(O=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",M);}},_setMenu:function(W){var Q=this.get("lazyloadmenu"),T=this.get("element"),M,Y=false,Z,P,S,O,N,V,R;if(!B){return false;}if(J){M=J.prototype.CSS_CLASS_NAME;}function X(){Z.render(T.parentNode);this.removeListener("appendTo",X);}function U(){if(Z){G.addClass(Z.element,this.get("menuclassname"));G.addClass(Z.element,"yui-"+this.get("type")+"-button-menu");Z.showEvent.subscribe(this._onMenuShow,null,this);Z.hideEvent.subscribe(this._onMenuHide,null,this);Z.renderEvent.subscribe(this._onMenuRender,null,this);if(J&&Z instanceof J){Z.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);Z.subscribe("click",this._onMenuClick,this,true);Z.itemAddedEvent.subscribe(this._onMenuItemAdded,this,true);S=Z.srcElement;if(S&&S.nodeName.toUpperCase()=="SELECT"){S.style.display="none";S.parentNode.removeChild(S);}}else{if(B&&Z instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();}K.register(Z);}}this._menu=Z;if(!Y){if(Q&&J&&!(Z instanceof J)){Z.beforeShowEvent.subscribe(this._onOverlayBeforeShow,null,this);}else{if(!Q){if(G.inDocument(T)){Z.render(T.parentNode);
}else{this.on("appendTo",X);}}}}}}if(W&&J&&(W instanceof J)){Z=W;O=Z.getItems();N=O.length;Y=true;if(N>0){R=N-1;do{V=O[R];if(V){V.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,V,this);}}while(R--);}U.call(this);}else{if(B&&W&&(W instanceof B)){Z=W;Y=true;Z.cfg.setProperty("visible",false);Z.cfg.setProperty("context",[T,"tl","bl"]);U.call(this);}else{if(J&&I.isArray(W)){this.on("appendTo",function(){Z=new J(G.generateId(),{lazyload:Q,itemdata:W});U.call(this);});}else{if(I.isString(W)){P=G.get(W);if(P){if(J&&G.hasClass(P,M)||P.nodeName.toUpperCase()=="SELECT"){Z=new J(W,{lazyload:Q});U.call(this);}else{if(B){Z=new B(W,{visible:false,context:[T,"tl","bl"]});U.call(this);}}}}else{if(W&&W.nodeName){if(J&&G.hasClass(W,M)||W.nodeName.toUpperCase()=="SELECT"){Z=new J(W,{lazyload:Q});U.call(this);}else{if(B){if(!W.id){G.generateId(W);}Z=new B(W,{visible:false,context:[T,"tl","bl"]});U.call(this);}}}}}}}},_setOnClick:function(M){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=M)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(M)&&I.isFunction(M.fn)){this.on("click",M.fn,M.obj,M.scope);this._onclickAttributeValue=M;}},_setSelectedMenuItem:function(N){var M=this._menu,O;if(J&&M&&M instanceof J){O=M.getItem(N);if(O&&!O.cfg.getProperty("selected")){O.cfg.setProperty("selected",true);}}},_isActivationKey:function(M){var Q=this.get("type"),N=(Q=="checkbox"||Q=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,P=N.length,O;if(P>0){O=P-1;do{if(M==N[O]){return true;}}while(O--);}},_isSplitButtonOptionKey:function(M){return(M.ctrlKey&&M.shiftKey&&L.getCharCode(M)==77);},_addListenersToForm:function(){var S=this.getForm(),R=YAHOO.widget.Button.onFormKeyPress,Q,M,P,O,N;if(S){L.on(S,"reset",this._onFormReset,null,this);L.on(S,"submit",this.createHiddenFields,null,this);M=this.get("srcelement");if(this.get("type")=="submit"||(M&&M.type=="submit")){P=L.getListeners(S,"keypress");Q=false;if(P){O=P.length;if(O>0){N=O-1;do{if(P[N].fn==R){Q=true;break;}}while(N--);}}if(!Q){L.on(S,"keypress",R);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var P=B.VIEWPORT_OFFSET,Y=this._menu,W=this,Z=W.get("element"),T=false,V=G.getY(Z),U=G.getDocumentScrollTop(),M,Q,b;if(U){V=V-U;}var O=V,N=(G.getViewportHeight()-(V+Z.offsetHeight));function S(){if(T){return(O-P);}else{return(N-P);}}function a(){var c=S();if(Q>c){M=Y.cfg.getProperty("minscrollheight");if(c>M){Y.cfg.setProperty("maxheight",c);if(T){Y.align("bl","tl");}}if(c<M){if(T){Y.cfg.setProperty("context",[Z,"tl","bl"],true);Y.align("tl","bl");}else{Y.cfg.setProperty("context",[Z,"bl","tl"],true);Y.align("bl","tl");T=true;return a();}}}}if(J&&Y&&(Y instanceof J)){Y.cfg.applyConfig({context:[Z,"tl","bl"],clicktohide:false,visible:true});Y.cfg.fireQueue();Y.cfg.setProperty("maxheight",0);Y.align("tl","bl");if(R.type=="mousedown"){L.stopPropagation(R);}Q=Y.element.offsetHeight;b=Y.element.lastChild;a();if(this.get("focusmenu")){this._menu.focus();}}else{if(B&&Y&&(Y instanceof B)){Y.show();Y.align("tl","bl");var X=S();Q=Y.element.offsetHeight;if(X<Q){Y.align("bl","tl");T=true;X=S();if(X<Q){Y.align("tl","bl");}}}}},_hideMenu:function(){var M=this._menu;if(M){M.hide();}},_onMouseOver:function(M){if(!this._hasMouseEventHandlers){this.on("mouseout",this._onMouseOut);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){L.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseOut:function(M){this.removeStateCSSClasses("hover");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){L.on(document,"mouseup",this._onDocumentMouseUp,null,this);}},_onDocumentMouseUp:function(O){this._activationButtonPressed=false;this._bOptionPressed=false;var P=this.get("type"),M,N;if(P=="menu"||P=="split"){M=L.getTarget(O);N=this._menu.element;if(M!=N&&!G.isAncestor(N,M)){this.removeStateCSSClasses((P=="menu"?"active":"activeoption"));this._hideMenu();}}L.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var R,N,Q,O;function M(){this._hideMenu();this.removeListener("mouseup",M);}if((P.which||P.button)==1){if(!this.hasFocus()){this.focus();}R=this.get("type");if(R=="split"){N=this.get("element");Q=L.getPageX(P)-G.getX(N);if((N.offsetWidth-this.OPTION_AREA_WIDTH)<Q){this.fireEvent("option",P);}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(R=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(R=="split"||R=="menu"){O=this;this._hideMenuTimerId=window.setTimeout(function(){O.on("mouseup",M);},250);}}},_onMouseUp:function(M){var N=this.get("type");if(this._hideMenuTimerId){window.clearTimeout(this._hideMenuTimerId);}if(N=="checkbox"||N=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}},_onFocus:function(N){var M;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){M=this._button;L.on(M,"blur",this._onBlur,null,this);L.on(M,"keydown",this._onKeyDown,null,this);L.on(M,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true;}this.fireEvent("focus",N);},_onBlur:function(M){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){L.on(document,"keyup",this._onDocumentKeyUp,null,this);
}C=null;this.fireEvent("blur",M);},_onDocumentKeyUp:function(M){if(this._isActivationKey(L.getCharCode(M))){this._activationKeyPressed=false;L.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(N){var M=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(N)){this.fireEvent("option",N);}else{if(this._isActivationKey(L.getCharCode(N))){if(this.get("type")=="menu"){this._showMenu(N);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(M&&M.cfg.getProperty("visible")&&L.getCharCode(N)==27){M.hide();this.focus();}},_onKeyUp:function(M){var N;if(this._isActivationKey(L.getCharCode(M))){N=this.get("type");if(N=="checkbox"||N=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(P){var S=this.get("type"),M,Q,N,O,R;switch(S){case"radio":case"checkbox":if(this.get("checked")){M=(S=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{M=(S=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",M);break;case"submit":this.submitForm();break;case"reset":Q=this.getForm();if(Q){Q.reset();}break;case"menu":M=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",M);break;case"split":O=this.get("element");R=L.getPageX(P)-G.getX(O);if((O.offsetWidth-this.OPTION_AREA_WIDTH)<R){return false;}else{this._hideMenu();N=this.get("srcelement");if(N&&N.type=="submit"){this.submitForm();}}M=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",M);break;}},_onAppendTo:function(N){var M=this;window.setTimeout(function(){M._addListenersToForm();},0);},_onFormReset:function(N){var O=this.get("type"),M=this._menu;if(O=="checkbox"||O=="radio"){this.resetValue("checked");}if(J&&M&&(M instanceof J)){this.resetValue("selectedMenuItem");}},_onDocumentMouseDown:function(P){var M=L.getTarget(P),O=this.get("element"),N=this._menu.element;if(M!=O&&!G.isAncestor(O,M)&&M!=N&&!G.isAncestor(N,M)){this._hideMenu();L.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(M){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(M);this._bOptionPressed=true;}},_onOverlayBeforeShow:function(N){var M=this._menu;M.render(this.get("element").parentNode);M.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow);},_onMenuShow:function(N){L.on(document,"mousedown",this._onDocumentMouseDown,null,this);var M,O;if(this.get("type")=="split"){M=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;O="activeoption";}else{M=this.MENUBUTTON_MENU_VISIBLE_TITLE;O="active";}this.addStateCSSClasses(O);this.set("title",M);},_onMenuHide:function(O){var N=this._menu,M,P;if(this.get("type")=="split"){M=this.SPLITBUTTON_DEFAULT_TITLE;P="activeoption";}else{M=this.MENUBUTTON_DEFAULT_TITLE;P="active";}this.removeStateCSSClasses(P);this.set("title",M);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(O,N){var M=N[0];if(L.getCharCode(M)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(N){var P=this.get("element"),M=P.parentNode,O=this._menu.element;if(M!=O.parentNode){M.appendChild(O);}this.set("selectedMenuItem",this.get("selectedMenuItem"));},_onMenuItemSelected:function(O,N,M){var P=N[0];if(P){this.set("selectedMenuItem",M);}},_onMenuItemAdded:function(O,N,M){var P=N[0];P.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,P,this);},_onMenuClick:function(N,M){var P=M[1],O;if(P){O=this.get("srcelement");if(O&&O.type=="submit"){this.submitForm();}this._hideMenu();}},createButtonElement:function(M){var O=this.NODE_NAME,N=document.createElement(O);N.innerHTML="<"+O+" class=\"first-child\">"+(M=="link"?"<a></a>":"<button type=\"button\"></button>")+"</"+O+">";return N;},addStateCSSClasses:function(M){var N=this.get("type");if(I.isString(M)){if(M!="activeoption"){this.addClass(this.CSS_CLASS_NAME+("-"+M));}this.addClass("yui-"+N+("-button-"+M));}},removeStateCSSClasses:function(M){var N=this.get("type");if(I.isString(M)){this.removeClass(this.CSS_CLASS_NAME+("-"+M));this.removeClass("yui-"+N+("-button-"+M));}},createHiddenFields:function(){this.removeHiddenFields();var R=this.getForm(),U,N,P,S,T,O,Q,M;if(R&&!this.get("disabled")){N=this.get("type");P=(N=="checkbox"||N=="radio");if(P||(E==this)){U=F((P?N:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(U){if(P){U.style.display="none";}R.appendChild(U);}}S=this._menu;if(J&&S&&(S instanceof J)){M=S.srcElement;T=this.get("selectedMenuItem");if(T){if(M&&M.nodeName.toUpperCase()=="SELECT"){R.appendChild(M);M.selectedIndex=T.index;}else{Q=(T.value===null||T.value==="")?T.cfg.getProperty("text"):T.value;O=this.get("name");if(Q&&O){M=F("hidden",(O+"_options"),Q);R.appendChild(M);}}}}if(U&&M){this._hiddenFields=[U,M];}else{if(!U&&M){this._hiddenFields=M;}else{if(U&&!M){this._hiddenFields=U;}}}return this._hiddenFields;}},removeHiddenFields:function(){var P=this._hiddenFields,N,O;function M(Q){if(G.inDocument(Q)){Q.parentNode.removeChild(Q);}}if(P){if(I.isArray(P)){N=P.length;if(N>0){O=N-1;do{M(P[O]);}while(O--);}}else{M(P);}this._hiddenFields=null;}},submitForm:function(){var P=this.getForm(),O=this.get("srcelement"),N=false,M;if(P){if(this.get("type")=="submit"||(O&&O.type=="submit")){E=this;}if(YAHOO.env.ua.ie){N=P.fireEvent("onsubmit");}else{M=document.createEvent("HTMLEvents");M.initEvent("submit",true,true);N=P.dispatchEvent(M);}if((YAHOO.env.ua.ie||YAHOO.env.ua.webkit)&&N){P.submit();}}return N;},init:function(M,T){var O=T.type=="link"?"a":"button",Q=T.srcelement,S=M.getElementsByTagName(O)[0],R;if(!S){R=M.getElementsByTagName("input")[0];if(R){S=document.createElement("button");S.setAttribute("type","button");R.parentNode.replaceChild(S,R);}}this._button=S;YAHOO.widget.Button.superclass.init.call(this,M,T);
D[this.get("id")]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");L.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("click",this._onClick);this.on("appendTo",this._onAppendTo);var V=this.get("container"),N=this.get("element"),U=G.inDocument(N),P;if(V){if(Q&&Q!=N){P=Q.parentNode;if(P){P.removeChild(Q);}}if(I.isString(V)){L.onContentReady(V,function(){this.appendTo(V);},null,this);}else{this.appendTo(V);}}else{if(!U&&Q&&Q!=N){P=Q.parentNode;if(P){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:P});P.replaceChild(N,Q);this.fireEvent("appendTo",{type:"appendTo",target:P});}}else{if(this.get("type")!="link"&&U&&Q&&Q==N){this._addListenersToForm();}}}},initAttributes:function(N){var M=N||{};YAHOO.widget.Button.superclass.initAttributes.call(this,M);this.setAttributeConfig("type",{value:(M.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:M.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:M.value});this.setAttributeConfig("name",{value:M.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:M.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:M.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(M.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:M.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:M.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(M.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:M.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:M.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(M.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(M.menuclassname||"yui-button-menu"),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("selectedMenuItem",{value:null,method:this._setSelectedMenuItem});this.setAttributeConfig("onclick",{value:M.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(M.focusmenu===false?false:true),validator:I.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){return this._button.form;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var O=this.get("element"),N=O.parentNode,M=this._menu,Q;if(M){if(K&&K.find(M)){K.remove(M);}M.destroy();}L.purgeElement(O);L.purgeElement(this._button);L.removeListener(document,"mouseup",this._onDocumentMouseUp);L.removeListener(document,"keyup",this._onDocumentKeyUp);L.removeListener(document,"mousedown",this._onDocumentMouseDown);var P=this.getForm();if(P){L.removeListener(P,"reset",this._onFormReset);L.removeListener(P,"submit",this.createHiddenFields);}this.unsubscribeAll();if(N){N.removeChild(O);}delete D[this.get("id")];Q=G.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,P);if(I.isArray(Q)&&Q.length===0){L.removeListener(P,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(N,M){var O=arguments[0];if(this.DOM_EVENTS[O]&&this.get("disabled")){return ;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(Q){var O=L.getTarget(Q),R=L.getCharCode(Q),P=O.nodeName&&O.nodeName.toUpperCase(),M=O.type,S=false,U,V,N,W;function T(Z){var Y,X;switch(Z.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(Z.type=="submit"&&!Z.disabled){if(!S&&!N){N=Z;}if(V&&!W){W=Z;}}break;default:Y=Z.id;if(Y){U=D[Y];if(U){S=true;if(!U.get("disabled")){X=U.get("srcelement");if(!V&&(U.get("type")=="submit"||(X&&X.type=="submit"))){V=U;}}}}break;}}if(R==13&&((P=="INPUT"&&(M=="text"||M=="password"||M=="checkbox"||M=="radio"||M=="file"))||P=="SELECT")){G.getElementsBy(T,"*",this);if(N){N.focus();}else{if(!N&&V){if(W){L.preventDefault(Q);}V.submitForm();}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(M){var R=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",M),P=R.length,Q,N,O;if(P>0){for(O=0;O<P;O++){N=R[O].id;if(N){Q=D[N];if(Q){Q.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(M){var N=D[M];if(N){return N;}};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();
}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);return L;}},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}if(J.length>0){return J;}}}},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){if(D.isNumber(F)){return this._buttons[F];}},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.5.1",build:"984"});/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;/**
 * SWFFormFix v2.1.0: SWF ExternalInterface() Form Fix - http://http://www.teratechnologies.net/stevekamerman/
 *
 * SWFFormFix is (c) 2007 Steve Kamerman and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Project sponsored by Tera Technologies - http://www.teratechnologies.net/
 */
////////////////////////////////////////////////////
////////////  Configurable options  ////////////////
////////////////////////////////////////////////////
var EnableFullAuto	= true; // set this to true and all of your flash objects will be fixed automatically
var SWFFormFixDebug = false; // set this to true to be alerted whenever a flash object is found and fixed
var NotLoadedWarning = true; // set this to true to alert the users when they try to access a function from
							 // the ExternalInterface() that isn't loaded yet
var NotLoadedMsg = "Please wait for the page to load..."; // this is the warning they will see
////////////////////////////////////////////////////
//////////  END Configurable options  //////////////
////////////////////////////////////////////////////
/**
 * Usage:
 * ------------------------------------------------------------
 * There are three ways to use SWFFormFix, FULL AUTO, Auto and Manual mode.
 * To use either method you need to include this file in the 
 * HEAD section of your page like this: 

<script src="swfformfix.js" type="text/javascript"></script>

 * 
 * NOTE: If you want Javascript to call Flash, you need to make
 * a dummy object like follows:
 
window["myFlashObject"] = new Object();

 * Put this line directly above your call to SWFObject().
 * Replace "myFlashObject" with the ID of your object (the 2nd
 * parameter you give to SWFObject() ).  This will prevent your
 * page from dieing with an error like "myFlashObject is undefined".
 * 
 * --> FULL AUTO Mode:
 * This will attempt to find every Flash Movie that you have on
 * the page and apply the fix to each of them as the page loads.
 * It will poll the page for all the objects and determine if it
 * needs to apply the fix to them every 100ms until the page is
 * completely loaded.  All you need to do to use this mode is
 * include the script in the head of your document and set the
 * "EnableFullAuto" directive to true at the top of the script.
 *
 * --> Auto Mode:
 * This will attempt to find every Flash Movie that you have on
 * the page and apply the fix to each of them.  To use auto mode
 * put the following code before the </body> tag. More specifically
 * it needs to be AFTER your last Flash object.

<script type="text/javascript">
// <![CDATA[
	SWFFormFixAuto();
// ]]>
</script>

 * 
 * --> Manual Mode:
 * This lets you fix just a single Flash object if you don't want
 * the auto mode to try to fix every Flash object on the page.
 * This mode is faster than the auto mode and may work better in
 * some situations.  To use manual mode put the following code
 * after the Flash object you want to fix, where "myFlashObject"
 * is the ID of the Flash Object:

Example for normal EMBED style:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="200" height="100" id="myFlashObject" align="middle">
<param name="movie" value="myMovie.swf" />
<param name="quality" value="high" />
<embed src="myMovie.swf" quality="high" width="200" height="100" name="myFlashObject" type="application/x-shockwave-flash" />
</object>

<script type="text/javascript">
// <![CDATA[
SWFFormFix("myMovieObjectName");
// ]]>
</script>

Example for SWFObject style:

<div id="flashcontent" style="width:200px;height:100px;">This is replaced by the Flash movie.</div>
<script type="text/javascript">
// <![CDATA[
// Please note that the ID that you need to use for SWFFormFix() is the second argument in SWFObject().
var so = new SWFObject("myMovie.swf", "myFlashObject","200", "100", "6.0.0", "#ffffff");
so.addParam("quality", "high");
so.write("flashcontent");
SWFFormFix("myFlashObject");
// ]]>
</script>

 * 
 * Changelog:
 * ------------------------------------------------------------
 * v2.1
 *   Fixed IE cache bug that prevents JS -> Flash after refresh.  Now SWFFormFix
 *   rebuilds all the ExternalInterface() methods that were inadvertently destroyed.
 * v2.0
 *   Added FULL AUTO mode - just enable it below and include the script!
 *   Special thanks to Geoff Stearns from deconcept and onDOMload by Aaron Barker
 * 
 * v1.0
 *   Added the SWFFormFixAuto() function, very well optimized and fast.
 * 
 * v0.2
 *   Changed helper element from <input> element to hidden <div> element
 *
 * v0.1
 *   Initial release.
 */

finished = false; // this is set to true when the body's onload is called, to stop the script
timeout = 10; // seconds to wait before giving up
starttime = new Date().getTime();
flashObjectList = Array();
fixedList = Array();
makeFuncArr = Array();
SWFFormFixAuto2 = function(){
//alert("running...");
	if(navigator.appName.toLowerCase() != "microsoft internet explorer")return true;
	var flashObjectList = document.getElementsByTagName("object");
	for(var i=0;i<flashObjectList.length;i++){
		var obj = flashObjectList[i];
		// here's all the objects on the page, now lets find the flash objects
		if(obj.getAttribute('classid') == "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"){
			var id = obj.getAttribute('id');
			var alreadyfixed = false;
			for(var c=0;c<fixedList.length;c++){if(fixedList[i] == id)alreadyfixed=true;}
			// this is a flash movie, apply the fix (unless it's already been fixed)
			if(!alreadyfixed){
				var debugtxt = '';
				for(var b in window[id]){
					// ExternalInterface() tried to add some functions to the incorrect object
					if(typeof(window[id][b])=="function"){
						// this function will need to be rebuilt when the page is done loading.
						makeFuncArr.push(Array(obj,b));
						obj[b] = function(){
							if(NotLoadedWarning)alert(NotLoadedMsg);
							return("");
						}
/*
 * it seems like this would work to copy the function, but it doesn't:
 *
 * eval('obj[b]='+window[id][b].toString());
 * 
 * This is the actual function that we're trying to copy:

function () { 
  return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));
}

 * it will fail if you copy it to the new object though because "instance" and "name" are undefined
 * Here's how to see the actual function def: document.getElementById("txt_debug").value=window[id][b];
 */
					}
				}
				window[id]=obj;
				if(SWFFormFixDebug)alert("Fixed: "+id);
			}
		}
	}
	if(!finished){
		setTimeout("SWFFormFixAuto2()", 100);
	}else{
		for(var i=0;i<makeFuncArr.length;i++){
			// this is executed after the page is loaded - it rebuilds the custom
			// ExternalInterface() functions
			SWFFormFix_rebuildExtFunc(makeFuncArr[i][0],makeFuncArr[i][1]);
		}
	}
	return true;
}
SWFFormFix_rebuildExtFunc = function(obj,functionName){
	eval('obj[functionName] = function(){return eval(this.CallFunction("<invoke name=\\"'+functionName+'\\" returntype=\\"javascript\\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));}');
	if(SWFFormFixDebug)alert("Rebuilt ExternalInterface() function: "+functionName);
}
SWFFormFixOnloadAppend = function() {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = function(){
			finished=true;
		}
	} else {
		window.onload = function() {
			oldonload();
			finished=true;
		}
	}
}
SWFFormFixAuto = function(){
	if(navigator.appName.toLowerCase() != "microsoft internet explorer")return true;
	var objects = document.getElementsByTagName("object");
	if(objects.length == 0) return true;
	for(i=0;i<objects.length;i++){
		// here's all the objects on the page, now lets find the flash objects
		if(objects[i].classid == "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"){
			// this is a flash movie, apply the fix
			window[objects[i].id] = objects[i];
		}
	}
	var out = "";
	return true;
}
SWFFormFix = function(swfname){
	if(navigator.appName.toLowerCase() != "microsoft internet explorer")return false;
	var testnodename = "SWFFormFixTESTER";
	document.write('<div id="'+testnodename+'" onclick="SWFFormFixCallback(this,\''+swfname+'\');return false;" style="display:none">&nbsp;</div>');
	document.getElementById(testnodename).onclick();
}
SWFFormFixCallback = function (obj,swfname){
	var path = document;
	var error = false;
	var testnode = obj;
	while(obj = obj.parentNode){
		if(obj.nodeName.toLowerCase() == "form"){
			if(obj.name != undefined && obj.name != null && obj.name.length > 0){
				path = path.forms[obj.name];
			}else{
				alert("Error: one of your forms does not have a name!");
				error = true;
			}
		}
	}
	testnode.parentNode.removeChild(testnode);
	if(error) return false;
	window[swfname]=path[swfname];
	return true;
}
function noCacheIE(url){
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	if(!isIE)return(url);
	var newUrl = '?';
	if(url.indexOf('?') != -1)newUrl = '&';
	var now = new Date();
	var rand = Math.random().toString().substring(2,4);
	newUrl = url+newUrl+"noCacheIE="+rand+'-'+now.getTime().toString();
	return(newUrl);
}
if(EnableFullAuto){
	SWFFormFixAuto2();
	SWFFormFixOnloadAppend();
}// Flash Player Version Detection - Rev 1.5
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;			
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
			var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
    var str = '';
    if (isIE && isWin && !isOpera)
    {
  		str += '<object ';
  		for (var i in objAttrs)
  			str += i + '="' + objAttrs[i] + '" ';
  		for (var i in params)
  			str += '><param name="' + i + '" value="' + params[i] + '" /> ';
  		str += '></object>';
    } else {
  		str += '<embed ';
  		for (var i in embedAttrs)
  			str += i + '="' + embedAttrs[i] + '" ';
  		str += '> </embed>';
    }

    document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "id":
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}


//Code block from HPFlex.ascx
    function DetectFlash()
    {
    // -----------------------------------------------------------------------------
    // Globals
    // Major version of Flash required
    var requiredMajorVersion = 9;
    // Minor version of Flash required
    var requiredMinorVersion = 0;
    // Minor version of Flash required
    var requiredRevision = 0;
    // -----------------------------------------------------------------------------
    // -->
    

    
        var hasProductInstall = DetectFlashVer(6, 0, 65);

       
        var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);


        // Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
        if ( hasProductInstall )
        {
            if( !hasRequestedVersion ) 
            {
            // MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
            // This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
            // DO NOT MODIFY THE FOLLOWING FOUR LINES
            // Location visited after installation is complete if installation is required
            
            var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
            var MMredirectURL = window.location;
            document.title = document.title.slice(0, 47) + " - Flash Player Installation";
            var MMdoctitle = document.title;

            window["ppng_product_swf"] = new Object();
            var so = new SWFObject("/swf/ppng_product_swf.swf", "ppng_product_swf", "1000", "270", "9" ,"#ffffff");
            so.addParam("scale", "noscale");
            so.write("ppngHomeFlex");
            
            } else if (hasRequestedVersion) {
            // if we've detected an acceptable version
            // embed the Flash Content SWF when all tests are passed
               
            window["ppng_product_swf"] = new Object();
            var so = new SWFObject("/swf/ppng_product_swf.swf", "ppng_product_swf", "1000", "270", "9" ,"#ffffff");
            so.addParam("scale", "noscale");
            so.write("ppngHomeFlex");
        } 
        }else {  // flash is too old or we can't detect the plugin
            var alternateContent = 'Recroot Quick catalog : '
            + 'This content requires the Adobe Flash Player. '
            + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
            document.write(alternateContent);  // insert non-flash content
        }
        }