// JavaScript Document

function jumpPage(newLoc) {

		newPage = newLoc.options[newLoc.selectedIndex].value;

		if (newPage != "") {
			
			window.parent.location.href = newPage
		}
	}

function popUpWindow(URLStr, left, top, width, height){ 
 popUpWindow = open(URLStr, 'popUpWind', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}  

function updateDate2()
{
	var x = new String(new Date());

	if(navigator.appName == "Netscape"){ // Netscape
	 x = "Today is " + x.substring(0,10) + ", " + x.substring(11,15);
	}
	else { // IE
	 x = "Today is " + x.substring(0,10) + ", " + x.substring(23,28);
	}
	 //x = "Today is " + x.substring(0,10) + ", " + x.substring(23,28);
	document.getElementById("dateInfo").innerHTML=x;
}
     

function newWindah(opplist,oppWin, winview)  {
		oppWindah = window.open(opplist, oppWin, winview);
} 
function date_ddmmmyy(date)
{
  var d = date.getDate();
  var m = date.getMonth() + 1;
  var y = date.getYear();

  // handle different year values 
  // returned by IE and NS in 
  // the year 2000.
  if(y >= 2000)
  {
    y -= 2000;
  }
  if(y >= 100)
  {
    y -= 100;
  }

  // could use splitString() here 
  // but the following method is 
  // more compatible
  var mmm = 
    ( 1==m)?'Jan':( 2==m)?'Feb':(3==m)?'Mar':
    ( 4==m)?'Apr':( 5==m)?'May':(6==m)?'Jun':
    ( 7==m)?'Jul':( 8==m)?'Aug':(9==m)?'Sep':
    (10==m)?'Oct':(11==m)?'Nov':'Dec';

  return "" +
    (d<10?"0"+d:d) + "-" +
    mmm + "-" +
    (y<10?"0"+y:y);
}


//
// get last modified date of the 
// current document.
//
function date_lastmodified()
{
  var lmd = document.lastModified;
  var s   = "Unknown";
  var d1;

  // check if we have a valid date
  // before proceeding
  if(0 != (d1=Date.parse(lmd)))
  {
    s = "" + date_ddmmmyy(new Date(d1));
  }

  return s;
}
 var popupWin;

 function openWindow(url, name, inwidth, inheight) {
   var swidth = screen.width;
   var sheight = screen.height;
   var mywidth = inwidth;
   var myheight = inheight;
   
   if (swidth < mywidth) mywidth = swidth;
   if (sheight < myheight) myheight = sheight - 100;
   popupWin = window.open(url, name, 'resizable=yes,scrollbars,width=' + mywidth + ',height=' + myheight)
 }
function MM_swapImgRestore() { //v2.0
  if (document.MM_swapImgData != null)
    for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
      document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}

function MM_preloadImages() { //v2.0
  if (document.images) {
    var imgFiles = MM_preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function MM_swapImage() { //v2.0
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
    objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      swapArray[j++] = obj;
      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = MM_swapImage.arguments[i+2];
  } }
  document.MM_swapImgData = swapArray; //used for restore
}
 function toggleList(a){
   var e = document.getElementById (a);
   if (!e) return true;
   if (e.style.display == "none") {
       e.style.display = "block"
	   }
   else {
       e.style.display = "none"
	   }
   return true;
   }

