
PN_DOM       = (document.getElementById) ? true : false;
PN_NS4       = (document.layers) ? true : false;
PN_IE        = (document.all) ? true : false;
PN_IE4       = PN_IE && !PN_DOM;
PN_Mac       = (navigator.appVersion.indexOf("Mac") != -1);
PN_IE4M      = PN_IE4 && PN_Mac;
PN_Opera     = (navigator.userAgent.indexOf("Opera")!=-1);
PN_Konqueror = (navigator.userAgent.indexOf("Konqueror")!=-1);

PN_IsMenu = !PN_Opera && !PN_Konqueror && !PN_IE4M && (PN_DOM || PN_NS4 || PN_IE4);

PN_BrowserString = PN_NS4 ? "NS4" : PN_DOM ? "DOM" : "IE4";


if(window.event + "" == "undefined") event = null;
function PN_f_PopUp(){return false};
function PN_f_PopDown(){return false};
popUp = PN_f_PopUp;
popDown = PN_f_PopDown;


PN_GL_MenuWidth          = 180;
PN_GL_FontFamily         = "Verdana, Arial, Helvetica, sans-serif";
PN_GL_FontSize           = 8;
PN_GL_FontBold           = false;
PN_GL_FontItalic         = false;
PN_GL_FontColor          = "black";
PN_GL_FontColorOver      = "white";
PN_GL_BGColor            = "white";
PN_GL_BGColorOver        = "#FF9933";
PN_GL_ItemPadding        = 0;

PN_GL_BorderWidth        = 1;
PN_GL_BorderColor        = "black";
PN_GL_BorderStyle        = "solid";
PN_GL_SeparatorSize      = 0;
PN_GL_SeparatorColor     = "white";

PN_GL_ImageSrc = "frex_up.gif";
PN_GL_ImageSrcLeft = "PN_More_black_left.gif";

PN_GL_ImageSrcOver = "frex_dw.gif";
PN_GL_ImageSrcLeftOver = "PN_More_white_left.gif";

PN_GL_ImageSize          = 20;
PN_GL_ImageHorizSpace    = 0;
PN_GL_ImageVertSpace     = 0;

PN_GL_KeepHilite         = true;
PN_GL_ClickStart         = false;
PN_GL_ClickKill          = 0;
PN_GL_ChildOverlap       = 40;
PN_GL_ChildOffset        = 10;
PN_GL_ChildPerCentOver   = null;
PN_GL_TopSecondsVisible  = .5;
PN_GL_ChildSecondsVisible = .3;
PN_GL_StatusDisplayBuild = 0;
PN_GL_StatusDisplayLink  = 1;
PN_GL_UponDisplay        = null;
PN_GL_UponHide           = null;

PN_GL_RightToLeft      = false;
PN_GL_CreateTopOnly      = PN_NS4 ? true : false;
PN_GL_ShowLinkCursor     = true;

// the following function is included to illustrate the improved JS expression handling of
// the left_position and top_position parameters
// you may delete if you have no use for it

function PN_f_CenterMenu(topmenuid) {
	var MinimumPixelLeft = 0;
	var TheMenu = PN_DOM ? document.getElementById(topmenuid) : PN_IE4 ? document.all(topmenuid) : eval("window." + topmenuid);
	var TheMenuWidth = PN_DOM ? parseInt(TheMenu.style.width) : PN_IE4 ? TheMenu.style.pixelWidth : TheMenu.clip.width;
	var TheWindowWidth = PN_IE ? document.body.clientWidth : window.innerWidth;
	return Math.max(parseInt((TheWindowWidth-TheMenuWidth) / 2),MinimumPixelLeft);
}




// ---------------------------------------------------------------------------------

// This part has been introduced in November 2001 to handle top menu images
// 


// the macromedia cross-compatible solution 
// to the problem of finding an object in the DOM
// return the object
function MM_findObj(n, d) { //v4.0
  var p,i,x;  


  if(PN_IE && PN_Mac && !d) d=document.images;
  if(!d) d=document; 
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); 
  
  return x;
}

/**
 * setImg function
 * 
 * description:
 * handles the changing of the images in the top menu
 * 
 * parameters:
 * selObj    - selected object (name of the image can be extracted from selObj.parentItem.dispText)
 * imgSrc    - new status of the image (0 is non-active, 1 is active)
 * unique    - flag to set all other images to the countrary status
 *
 * notes:
 * the function uses the global object imgs and the MM_findObj function
 * 
 **/
function setImg(selObj, status, unique){

 // extraction of name from selObj.parentItem.dispText
 s = selObj.parentItem.dispText;
 name_start = s.lastIndexOf("name=")+6;
 name_end = s.indexOf(" ", name_start)-1;
 selImg = s.slice(name_start, name_end);


 if (unique){
  for (img in imgs){
   if (img != selImg) continue;
   x = MM_findObj(img);
   x.src=imgs[img][(status+1)%2];
  }
 }

 x = MM_findObj(selImg);
 x.src=imgs[selImg][status];
	
}// ---------------------------------------------------------------------------------


if(PN_IsMenu) {
	document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='../../script/Script"+ PN_BrowserString +".js' TYPE='text/javascript'><\/SCRIPT>");
}


//end

