var pageLoaded=false;function preload(){	if (document.images || document.all){		var i1=new Image;i1.src="contactlnk-on.gif";		var i2=new Image;i2.src="qalnk-on.gif";		var i3=new Image;i3.src="joinlnk-on.gif";		var i5=new Image;i5.src="vplnk-on.gif";		var i6=new Image;i6.src="aboutlnk-on.gif";		var i7=new Image;i7.src="linkslnk-on.gif";		var i8=new Image;i8.src="memberslnk-on.gif";		}}function getDefault(){	if (parseFloat(navigator.appVersion)<4){		this.location="default.html";	}}function chgImg(img){	if (document.all){		document.all[img].src=img + "-on.gif";return;		}		if(document.layers){		document[img].src=img + "-on.gif";return;		}}function chgBk(img){	if (document.all){		document.all[img].src=img + ".gif";return;		}		if (document.layers){		document[img].src=img + ".gif";return;		}} //-------------- Assign Each URL and Text Value for Each Menu --------//

var tar="";
var thisURL=this.location.toString();
if (thisURL.indexOf("acuteframe.html")>=0 || thisURL.indexOf("altframe.html")>=0 || thisURL.indexOf("linkframe.html")>=0){
	tar="target='about'"
}

//------ Place In Front and End for Inactive Links -----//

var noLink="</a><span style='font-family:Arial; font-size:9pt; color:#666699'><a>";
var noLinkOff="</span>";

//----------------------------------------------------//
var txt00 = Array(4);
	txt00[0] = "Benefits of Membership";
	txt00[1] = "Program Overview";
	txt00[2] = "Key People";
	txt00[3] = "Directions to Prime";
var txt00url = Array(4);
	txt00url[0] = "/about/benefits.html";
	txt00url[1] = "/about/prog.html";
	txt00url[2] = "/about/key_people.html";
	txt00url[3] = "/about/directions.html";
//-----//
var txt01 = Array(2);
	txt01[0] = "Eligibility/Procedure to Join PRIME";
	txt01[1] = "Benefits of Membership";


var txt01url = Array(2);
	txt01url[0] = "/join/join.html";
	txt01url[1] = "/about/benefits.html";

//-----//
var txt02 = Array(2);
	txt02[0] = "Welcome";
	txt02[1] = "Wish to be in PrimeNews?";

var txt02url = Array(2);
	txt02url[0] = "/vp/vp_welcome.html";
	txt02url[1] = "/vp/vp_news.html";

//-----//
var txt03 = Array(2);
	txt03[0] = "PRIME Vendor Partners &amp WEB Sites";
	txt03[1] = "Links in Health Care";

var txt03url = Array(2);
	txt03url[0] = "/index_links.html";
	txt03url[1] = "/web_links.asp";

//-----//


var txt04a = Array(8);
	
	txt04a[0] = "What\'s New";
	txt04a[1] = "Links in Health Care";
	txt04a[2] = "Inflation Indices";
	txt04a[3] = "PRIMENews";
	txt04a[4]="Mobile Imaging Services";
	txt04a[5] = "Index of Contracts";
	txt04a[6] = "National GPO Partners";
	txt04a[7] = "More Information";
	
var txt04urla = Array(8);
	
	txt04urla[0] = "/members/whats_new.shtml";
	txt04urla[1] = "/web_links.asp";
	txt04urla[2] = "/members/inf_indic.html";
	txt04urla[3] = "/members/mem_news.html";
	txt04urla[4]="/members/equip_refurb.html";
	txt04urla[5] = "/primedata/";
	txt04urla[6] = "/members/aff_part.html";
	txt04urla[7] = "/contact.shtml";
	
	
//----------------------------------------------------------------//

oldLinks="";
enabled=0;



//--------------------- Gets Links Array -----------------------//
function getMenu(txtArray,urlArray,x,lft,wid){
	 x=urlArray.length-1;


revLinks="";oldLinks="";newLinks="";
	for (count=0; count<=x; count++){
	linkData=" class='ddlink' style='text-decoration:none; font-size:9pt; color:white; font-family:Arial'><b>&nbsp;"
		newLinks="<a " + tar + " href='" + urlArray[count] + "'" + linkData + txtArray[count] + "</b></a><br>";
		revLinks=oldLinks + newLinks;oldLinks=revLinks;
	
		}	
	
		if (document.all && pageLoaded==true){
			var newMenu=document.all["menu"];
				newMenu.innerHTML=" ";
				newMenu.innerTEXT=" ";
				newMenu.innerHTML=revLinks;
		
				newMenu.style.visibility="visible";
			newMenu.style.width=wid;newMenu.style.posLeft=lft;
				newMenu.focus();
		
		
			}
		if (document.layers && pageLoaded==true){
			var newMenu=document.layers["menu"];
				newMenu.document.open();
				newMenu.document.write(revLinks);
				newMenu.document.close();
				
			newMenu.left=lft;newMenu.width=wid;newMenu.visibility="show";	
		
		
			}
}

//----------- Resets Menu Default ----------//
function clr(){
	if (document.all && pageLoaded==true){
		document.all["menu"].style.visibility="hidden";
			revLinks="";oldLinks="";newLinks="";
		
		}
	if (document.layers && pageLoaded==true){
		document.layers["menu"].visibility="hide";
			revLinks="";oldLinks="";newLinks="";
		
		}
	
}
//----------------------------------------//
var loggedout=false;
var isCookie=false;
var curURL=document.location.toString();

function chkCookie(){
		if (!GetCookie('logged')){
			
				if (confirm("You are not authorized to view this page.\nPlease select OK to go to Member Log In.")){
						document.location="http://prime.nerds.net/members"; 
						} else {
						window.history.go(-1);
						       }
						}
					}
				
					
				

//----------------Cookie Functions-------------//
	
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function FixCookieDate (date) {
  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}
//
//  Function to create or update a cookie.
//    name - String object containing the cookie name.
//    value - String object containing the cookie value.  May contain
//      any valid string characters.
//    [expires] - Date object containing the expiration data of the cookie.  If
//      omitted or null, expires the cookie at the end of the current session.
//    [path] - String object indicating the path for which the cookie is valid.
//      If omitted or null, uses the path of the calling document.
//    [domain] - String object indicating the domain for which the cookie is
//      valid.  If omitted or null, uses the domain of the calling document.
//    [secure] - Boolean (true/false) value indicating whether cookie transmission
//      requires a secure channel (HTTPS).  

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}


function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
	loggedout=true;document.location="http://prime.nerds.net/members";return false;
  }
}

//---------------------------------------//
	
	function userLogout(name) {
	if (loggedout==false){	
		if (confirm("Do you wish to log out?"))
				{
		 		DeleteCookie(name);
				}
				else
				{
				}
				
				
				
  						
			}
		else {
		alert("No Current Log In"); 
			}
	}
		
	
	function isLogged(){
		if (GetCookie('logged')){
			
				isCookie=true;
				}
	}
		
