
function MakeArray(n) {
    this.length = n;
    for(var i=0;i<=n;i++)
        this[i] = 0;
    return this;
}

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
chosen = 'tool0';
urllist = new MakeArray(8);
urllist[1] = 'content_manager.html';
urllist[2] = 'portal_manager.html';
urllist[3] = 'marketing_manager.html';
urllist[4] = 'utility_manager.html';
urllist[5] = 'catalog_manager.html';
urllist[6] = 'report_manager.html';
urllist[7] = 'project_manager.html';

if (browserName == "Netscape" && browserVer >= 3) {
        version = "n3";
} else {
        version = "n2";
}
if (browserName == "Microsoft Internet Explorer" && browserVer >= 3) {
        version = "n3";
}

if(version == "n3") {
        tool1on = new Image();
        tool1off = new Image();
        tool1hi = new Image();
        tool1on.src = "/admin/images/menu_contman_on.jpg";
        tool1off.src = "/admin/images/menu_contman_off.jpg";
        tool1hi.src = "/admin/images/menu_contman_on.jpg";

        tool2on = new Image();
        tool2off = new Image();
        tool2hi = new Image();
        tool2on.src = "/admin/images/menu_portman_on.jpg";
        tool2off.src = "/admin/images/menu_portman_off.jpg";
        tool2hi.src = "/admin/images/menu_portman_on.jpg";

        tool3on = new Image();
        tool3off = new Image();
        tool3hi = new Image();
        tool3on.src = "/admin/images/menu_marman_on.jpg";
        tool3off.src = "/admin/images/menu_marman_off.jpg";
        tool3hi.src = "/admin/images/menu_marman_on.jpg";
        
        tool4on = new Image();
        tool4off = new Image();
        tool4hi = new Image();
        tool4on.src = "/admin/images/menu_utility_on.jpg";
        tool4off.src = "/admin/images/menu_utility_off.jpg";
        tool4hi.src = "/admin/images/menu_utility_on.jpg";
       
        tool5on = new Image();
        tool5off = new Image();
        tool5hi = new Image();
        tool5on.src = "/admin/images/menu_ecatman_on.jpg";
        tool5off.src = "/admin/images/menu_ecatman_off.jpg";
        tool5hi.src = "/admin/images/menu_ecatman_on.jpg";
        
        tool6on = new Image();
        tool6off = new Image();
        tool6hi = new Image();
        tool6on.src = "/admin/images/menu_repman_on.jpg";
        tool6off.src = "/admin/images/menu_repman_off.jpg";
        tool6hi.src = "/admin/images/menu_repman_on.jpg";
		
        tool7on = new Image();
        tool7off = new Image();
        tool7hi = new Image();
        tool7on.src = "/admin/images/menu_proman_on.jpg";
        tool7off.src = "/admin/images/menu_proman_off.jpg";
        tool7hi.src = "/admin/images/menu_proman_on.jpg";
}

function img_act(imgName) {
        if(version =="n3") {
                imgOn = eval(imgName + "on.src");
                document [imgName].src = imgOn;
        }
}

function img_inact(imgName) {
        if(version=="n3") {
                imgOff = eval(imgName + "off.src");
                document [imgName].src = imgOff;
        }
}

function refresh(selected) {
        if(chosen != selected) {
           for(var i=1;i<=7;i++) {
                        img_inact("tool" + i);
                }
                img_act(selected);
                chosen = selected;
        }
}

function redraw(selected) {
        img_inact('tool0');
        img_act(selected);
        chosen = selected;
}

function highlight(imgName) {
        if(chosen != imgName) {
                if(version=="n3") {
                        imgHi = eval(imgName + "hi.src");
                        document [imgName].src = imgHi;
                }
        }
}

function unhighlight(imgName) {
        if(chosen != imgName) {
                if(version=="n3") {
                        imgOff = eval(imgName + "off.src");
                        document [imgName].src = imgOff;
                }
        }

}

function states(swap){
if(document.summary.addState.value==""){
	alert("Please enter the name of the new area.");document.summary.addState.focus();
	}
else if(document.summary.addInit.value==""){
	alert("Please enter the initials of the new area.");document.summary.addInit.focus();
	}
else if(document.summary.addRate.value==""){
	alert("Please enter the rate of the new area.");document.summary.addRate.focus();
	}
else{
	document.summary.whichButton.value=swap;
	document.summary.submit()
	}
}


function orderno(swap1,swap2,swap3){
if(swap3){
	document.summary.isfulfilled.value=true
	}
document.summary.whichorder.value=swap1
director(swap2)
}

function director(swap){
document.summary.whichButton.value=swap;
document.summary.submit();
}

function whichOnes(swap){
document.summary.whichButton.value=swap;
document.summary.submit();
}


function whichOne(swap){
	 if (document.summary.go_search.value=="" && swap=="update")
	   {alert("Please Enter An Article Number.");document.summary.article.focus();}	
	 else
	 	 if (document.summary.article.value=="" && swap!="new" && document.summary.go_search.value=="")
	   {alert("Please Select An Article.");document.summary.article.focus();}	
	 else
	 {  
	  document.summary.whichButton.value=swap;
	  document.summary.submit();
	  }
 }

 function whichColumn(swap){	
	 {  
	  document.summary.Column.value=swap;
	  document.summary.submit();
	  }
 }
 	
// Heinle's function for retrieving a cookie.
function getCookie(name){
  var cname = name + "=";               
  var dc = document.cookie;             
  if (dc.length > 0) {              
    begin = dc.indexOf(cname);       
    if (begin != -1) {           
      begin += cname.length;       
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    } 
  }
  return null;
}

// An adaptation of Dorcht's function for setting a cookie.
function setCookie(name, value, expires, path, domain, secure) {
  document.cookie = name + "=" + escape(value) + 
  ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
  ((path == null) ? "" : "; path=" + path) +
  ((domain == null) ? "" : "; domain=" + domain) +
  ((secure == null) ? "" : "; secure");
}

// An adaptation of Dorcht's function for deleting a cookie.
function delCookie (name,path,domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path == null) ? "" : "; path=" + path) +
    ((domain == null) ? "" : "; domain=" + domain) +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}


// please keep this text when you copy the source code
// made by Ragecreations version 0.1

//Get Date
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) 
year = year + 1900; 

//Get Time
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
if (timeValue == "0") timeValue = 12;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += (hours >= 12) ? " PM" : " AM"