

gadmin = ggetCookie("admin_level");
gadmin_links = ggetCookie("display_admin_menu");

/////////////PDN FUNC

/*
var navcnt = 10;  //Number of navigation titles
    var myinterval;
    var mycurrentpage;
    try {
         document.execCommand("BackgroundImageCache", false, true);
    } catch(err) {}
    function setCurrentPG(page) {
        mycurrentpage = page;
        document.getElementById("PDNnav_"+page).className = "current";
    }
    
    function setTopNav(page) {
        mycurrentpage = page;
        document.getElementById("PDNtop_"+page).className = "current";
    }
    
    function setSubNav(page) {
        mycurrentpage = page;
        document.getElementById("PDNsub_"+page).className = "current";
    }    
    function showSub(id) {
        clearTimeout(myinterval);
        for (var i=1; i<(navcnt+1); i++) {
            if(document.getElementById("PDNnav_"+i).className != 'current') {
                document.getElementById("PDNnav_"+i).className = "";
            }
            if(document.getElementById("PDNtop_"+i).className != 'current') {
                document.getElementById("PDNtop_"+i).className = "";
            }            
            if(document.getElementById("PDNsub_"+i).className != 'current') {
                document.getElementById("PDNsub_"+i).className = "";
            }                    
        }
        if(document.getElementById("PDNnav_"+id).className != 'current')
            document.getElementById("PDNnav_"+id).className = "rollover";
        if(document.getElementById("PDNtop_"+id).className != 'current')
            document.getElementById("PDNtop_"+id).className = "rollover";    
        if(document.getElementById("PDNsub_"+id).className != 'current')
            document.getElementById("PDNsub_"+id).className = "rollover";                
    }
    function fadeOut(id) {
        myid = id;
        myinterval = setTimeout("disappear(myid)",1500);
    }
    function disappear(id) {
        clearTimeout(myinterval);
        document.getElementById("PDNnav_"+id).className = "";
        document.getElementById("PDNnav_"+mycurrentpage).className = "current";
        document.getElementById("PDNtop_"+id).className = "";
        document.getElementById("PDNtop_"+mycurrentpage).className = "current";    
        document.getElementById("PDNsub_"+id).className = "";
        document.getElementById("PDNsub_"+mycurrentpage).className = "current";            
    }

    */
    /* For img's with rollovers */
    function swapImage(imgName,newImg){
    if ((navigator.appName == 'Netscape' && parseFloat(navigator.appVersion) >= 3) || (parseFloat(navigator.appVersion) >= 4)){
        eval('document.' + imgName + '.src = "' + newImg + '"');
    }
    }

/**  nav-function.js   **/

var navcnt = 10;  //Number of navigation titles
var myinterval;
var mycurrentpage;
try {
      document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
function setCurrentPG(page) {
      mycurrentpage = page;
        document.getElementById("nav_"+page).className = "current";
}
function setTopNav(page) {
      mycurrentpage = page;
          document.getElementById("top_"+page).className = "current";
}
    
    function setSubNav(page) {
          mycurrentpage = page;
              document.getElementById("sub_"+page).className = "current";
    }    

function showSub(id) {
      clearTimeout(myinterval);
          for (var i=1; i<(navcnt+1); i++) {
            if(document.getElementById("nav_"+i).className != 'current') {
                  document.getElementById("nav_"+i).className = "";
            }
            if(document.getElementById("top_"+i).className != 'current') {
                  document.getElementById("top_"+i).className = "";
            }
            if(document.getElementById("sub_"+i).className != 'current') {
                  document.getElementById("sub_"+i).className = "";
            }
          }
          if(document.getElementById("nav_"+id).className != 'current')
                    document.getElementById("nav_"+id).className = "rollover";
          if(document.getElementById("top_"+id).className != 'current')
                    document.getElementById("top_"+id).className = "rollover";
          if(document.getElementById("sub_"+id).className != 'current')
                    document.getElementById("sub_"+id).className = "rollover";
}
function fadeOut(id) {
          myid = id;
                  myinterval = setTimeout("disappear(myid)",1500);
}
function disappear(id) {
          clearTimeout(myinterval);
          document.getElementById("nav_"+id).className = "";
          document.getElementById("nav_"+mycurrentpage).className = "current";
          document.getElementById("top_"+id).className = "";
          document.getElementById("top_"+mycurrentpage).className = "current";    
          document.getElementById("sub_"+id).className = "";
          document.getElementById("sub_"+mycurrentpage).className = "current";            
}
    /* For img's with rollovers */
    function swapImage(imgName,newImg){
          if ((navigator.appName == 'Netscape' && parseFloat(navigator.appVersion) >= 3) || (parseFloat(navigator.appVersion) >= 4)){
                    eval('document.' + imgName + '.src = "' + newImg + '"');
                        }
    }







function toggle(showHideDiv, switchImgTag) {
    var ele = document.getElementById(showHideDiv);
    var imageEle = document.getElementById(switchImgTag);
    if(ele.style.display == "block") {
       ele.style.display = "none";
       imageEle.innerHTML = 'MORE <img src="../images/image/down_arrow.jpg" border="0">';
    }
    else {
       ele.style.display = "block";
       imageEle.innerHTML = 'LESS <img src="../images/image/up_arrow.jpg" border="0">';
    }
}


//for editing, variable similar_to will be defined when we do the popup to edit all similar images, so hide the redundant header...
if(!(typeof(similar_to) != 'undefined' && similar_to))
{
        /////// admin bar inline ///////
        if(gadmin && gadmin_links && gusername)
	{
                document.write('<div id=navbar style="position:fixed; top:0; background:#fff url(/graphics/admin_bg.gif) repeat-x top left; padding: 0px;width: 100%;margin: 0px;color: #ccc;padding-top: 5px; height: 20px;font-size: 9pt !important;"><font class=adminlabel>&nbsp;ADMIN:</font> <a href="/" target="left">Homepage</a> | ');
                //write in the navbar here;
                if (gadmin_links && gadmin_links.toString().length > 1) //also have additional links to parse
                {
                        var tnavObjs = eval(''+gadmin_links+'');
                        for (i=0;i< tnavObjs.length;i++){
                                document.write('<A href="' + tnavObjs[i]['lnk'] + '" class=>' + tnavObjs[i]['txt'] + '</a> | ');
                        }
                }
                document.write('</div><br/><br/>');
        }
        //////

/*
var tt='<div id="PDNouter_container"><!--START Top Navigation--><div id="PDNtopnav"><ul class="top">';
tt+='		<li id="PDNtop_1"><a href="http://www.pdnonline.com/" id="PDNtop_pdnNetwork" title="PDN Network"><span>PDN Network</span></a> </li>';
tt+='		<li id="PDNtop_2"><a href="http://www.pdnonline.com/" id="PDNtop_pdn" title="PDN"><span>PDN</span></a> </li>';
tt+='		<li id="PDNtop_3"><a href="http://www.photoserve.com/" id="PDNtop_photoserve" title="Photoserve"><span>Photoserve</span></a> </li>';
tt+='		<li id="PDNtop_4"><a href="http://www.pdnphotosource.com/" id="PDNtop_photosource" title="Photo Source" rel="nofollow"><span>Photo Source</span></a> </li>';
tt+='		<li id="PDNtop_5"><a href="http://www.ipnstock.com/" id="PDNtop_ipnstock" title="IPN Stock"><span>IPN Stock</span></a> </li>';
tt+='		<li id="PDNtop_6"><a href="http://www.pdnedu.com" id="PDNtop_pdnedu" title="PDNEDU"><span>PDNEDU</span></a> </li>';
tt+='		<li id="PDNtop_7"><a href="http://www.pdnonline.com/pdn/Emerging-Photographe-100.shtml" id="PDNtop_emerging" title="Emerging Photographer"><span>Emerging</span></a> </li>';
tt+='		<li id="PDNtop_8"><a href="http://www.photoplusexpo.com/" id="PDNtop_photoplus" title="PDN Photoplus"><span>PDN Photoplus</span></a></li>';
tt+='	  </ul>';
tt+='	<!--END Top Navigation--><!-- *************** START HEADER *************** --><!--*************** END HEADER ***************--><!--END  Container-->';
*/


var tt='<div id="topHeader"><!--START Trop Navigation--><div id="topnav"><ul class="top">';
tt+='   <li id="top_1"><a href="http://www.pdnonline.com/" id="top_pdnNetwork" title="PDN Network"><span>PDN Network</span></a> </li>';
tt+='   <li id="top_2"><a href="http://www.pdnonline.com/pdn/index.shtml" id="top_pdn" title="PDN"><span>PDN</span></a> </li>';
tt+='   <li id="top_3"><a href="http://www.rangefinderonline.com/index.shtml" id="top_photoserve" title="Rangefinder"><span>Rangefinder</span></a> </li>';
tt+='   <li id="top_4"><a href="http://www.photoplusexpo.com/" id="top_photosource" title="PhotoSource" rel="nofollow"><span>Photo Plus</span></a> </li>';
tt+='   <li id="top_5"><a href="http://www.outdoorphotoexpo.com/ope/" id="top_outdoor" title="Outdoor PhotoExpo"><span>Outdoor PhotoExpo</span></a> </li>';
tt+='   <li id="top_6"><a href="http://www.wppionline.com/" id="top_pdnedu" title="WPPI"><span>WPPI</span></a> </li>';
tt+='   <li id="top_7"><a href="http://www.pdnonline.com/pdn/PhotoServe328.shtml" id="top_emerging" title="Photo Serve"><span>Emerging</span></a> </li>';
tt+='   <li id="top_8"><a href="http://www.pdnonline.com/pdn/Photo-Source-239.shtml" id="top_photoplus" title="PDN Photoplus"><span>PDN Photoplus</span></a></li>';

tt+='   </ul>';


tt+=' <div id="moreDropDown">';
tt+='     <a id="moreDivLink" href="javascript:toggle(\'sub_contentDiv\', \'moreDivLink\');">MORE <img src="../images/image/down_arrow.jpg" border="0"></a>';
tt+=' </div>';

tt+='</div>';

tt+='<div class="subTop_Container">';
tt+='      <div style="clear:both"></div>';
tt+='      <div id="sub_contentDiv" style="display:none;">';
tt+='           <div class="top_col1"><span class="nielsenBrand_txt">ALL NIELSEN PHOTO BRANDS</span></div>';
tt+='           <div class="top_col2"><span class="subBrand_hdr">Magazines</span>';
tt+='             <ul>';
tt+='               <li><a href="http://www.pdnonline.com/pdn/index.shtml">Photo District News</a></li>';
tt+='               <li><a href="http://www.rangefinderonline.com/index.shtml">Rangefinder</a></li>';
tt+='               <li><a href="http://www.rangefinderonline.com/AfterCapture.shtml">AfterCapture</a></li>';
tt+='              </ul>';
tt+='            </div>';
tt+='           <div class="top_col3"><span class="subBrand_hdr">Education</span>';
tt+='             <ul>';
tt+='               <li><a href="http://pdnonline.com/pdn/PDN-Edu-179.shtml">PDNedu</a></li>';
tt+='               <li><a href="http://www.pdnonline.com/pdn/EmergingPhotographer100.shtml">Emerging Photographer</a></li>';
tt+='              </ul>';
tt+='            </div>';
tt+='           <div class="top_col4"><span class="subBrand_hdr">Tradeshows</span>';
tt+='             <ul>';
tt+='               <li><a href="http://www.photoplusexpo.com/">PhotoPlus Expo</a></li>';
tt+='               <li><a href="http://www.outdoorphotoexpo.com/ope/">Outdoor Photo Expo</a></li>';
tt+='               <li><a href="http://www.wppionline.com/">WPPI</a></li>';
tt+='               <li><a href="http://www.wppionline.com/storage/2011/roadtrip/home.html">WPPI Road Trip</a></li>';
tt+='               <li><a href="http://www.wppionline.com/storage/2011/wppi-u/home.html">WPPI U</a></li>';
tt+='              </ul>';
tt+='            </div>';
tt+='           <div class="top_col5"><span class="subBrand_hdr">Services</span>';
tt+='             <ul>';
tt+='               <li><a href="https://www4.wppionline.com/members/signup.php?_function=apply1">WPPI Membership</a></li>';
tt+='               <li><a href="http://www.ipnstock.com/">IPN Stock</a></li>';
tt+='               <li><a href="http://www.pdnonline.com/pdn/PhotoServe328.shtml">PhotoServe</a></li>';
tt+='               <li><a href="http://www.pdnonline.com/pdn/Photo-Source-239.shtml">PhotoSource</a></li>';
tt+='              </ul>';
tt+='            </div>';
tt+='           <div class="top_col6"><span class="subBrand_hdr">Contests</span>';
tt+='             <ul>';
tt+='               <li><a href="http://www.pdnonline.com/pdn/Contests-81.shtml">Photo District News</a></li>';
tt+='               <li><a href="http://www.rangefinderonline.com/Contests.shtml">Rangefinder</a></li>';
tt+='               <li><a href="http://www.wppionline.com/">WPPI</a></li>';
tt+='              </ul>';
tt+='            </div>';

tt+='             <br />';
tt+='           <div style="clear:both"></div>';
tt+='      </div>';
tt+='</div></div>';

document.write(tt);
//setTopNav(5);

}

