   function highlightOn(elem) {
            elem.className="menuOn";
   }

   function highlightOff(elem) {
            elem.className="menuOff";
   }

   function HighlightSelection(elem) {
            elem.className="LightOn";
   }

   function UnHighlightSelection(elem) {
            elem.className="LightOff";
   }

   var yeni = null;
   function popup(a,b,c, windowName) {
			var en = (b == 0) ? 300 : ((b < 100) ? 100 : ((b > 800) ? 800 : b));
			var boy = (c == 0) ? 300 : ((c < 100) ? 100 : ((c > 600) ? 600 : c));
			
			if (windowName == null)
				windowName = "outputWindow";
			
			if(yeni == null || yeni.closed) {
			  yeni=window.open(a, windowName,"left=100,top=100,menubar=yes,scrollbars=yes,resizable=yes,width="+en+",height="+boy);
			} else {
			  window.yeni.location=a;
			}
			if(navigator.appName == "Microsoft Internet Explorer" &&
			  parseInt(navigator.appVersion) >= 4) {
			      yeni.focus();
			} else {
			    if(navigator.appName != "Microsoft Internet Explorer")
			       yeni.focus(); 
		    }
   }

   
//------------------------------------------------------------------------------------
//---------------------------------PRINT FUNCTIONS BEGIN------------------------------
//------------------------------------------------------------------------------------
var intNumberofAlreadyHiddenElements = 0 ;
var ArrayofHiddenElementNames = new Array();

//------------------------------------------------------------------------------
function ElementwasHiddenBeforePrint(Elementname) {

	for (var i=0;i < intNumberofAlreadyHiddenElements;i++){
	    if ( ArrayofHiddenElementNames[i] == Elementname)
	       return ( true );
	} /* for */

	return (false);
}
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
function HideUnPrintableElemets() {
      intNumberofAlreadyHiddenElements = 0 ;

      var coll = document.all;

      if (coll!=null) {
         for (var i=0; i<coll.length; i++) {
            if ( coll[i].printable != null ) {
                if ( coll[i].printable == "0" ) {
                   if ( coll[i].name != null && coll[i].name != '' ) {
                      // if this element is already hidden from the browser make note of it
                      // so that when it is time to show elements, this element is not shown.
                      if ( coll[i].style.display == 'none' ) {
                         ArrayofHiddenElementNames[intNumberofAlreadyHiddenElements] = coll[i].name ;
                         intNumberofAlreadyHiddenElements++;
                      }
                   }

                   coll[i].style.display='none';
                }
            }
        } /* for */
     } /* if */

} /* function HideUnPrintableElemets() */
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
function ShowUnPrintableElemets() {

      var coll = document.all;

      if (coll!=null) {
        for (i=0; i<coll.length; i++) {
            if ( coll[i].printable != null) {
                if ( coll[i].printable == "0" ) {
                   if ( coll[i].name != null && coll[i].name != '' ) {
                      // show this element only if this element was not already hidden from the browser
                      if ( ! ElementwasHiddenBeforePrint(coll[i].name) ) {
                         coll[i].style.display='';
                      }
                   }
                   else
                      coll[i].style.display='';
                } /* if */
             } /* if */
        } /* for */
    } /* if */

} /* function ShowUnPrintableElemets() */
//------------------------------------------------------------------------------


//------------------------------------------------------------------------------------
//---------------------------------PRINT FUNCTIONS END--------------------------------
//------------------------------------------------------------------------------------



//------------------------------------------------------------------------------------
//-------------------------------BROWSER VERSION BEGIN--------------------------------
//------------------------------------------------------------------------------------

    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
	var agt = navigator.userAgent.toLowerCase();
	
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

//------------------------------------------------------------------------------------
//--------------------------------BROWSER VERSION END---------------------------------
//------------------------------------------------------------------------------------


/******************************************************************************
get_hex_color (r, g, b)

This function returns a color string given red, green, and blue integers
between 0 and 255.

******************************************************************************/
function get_hex_color (r, g, b) {
	var hexstring = "0123456789abcdef";
	var hex_color =
	hexstring . charAt (Math . floor (r / 16))
		+ hexstring . charAt (r % 16)
		+ hexstring . charAt (Math . floor (g / 16))
		+ hexstring . charAt (g % 16)
		+ hexstring . charAt (Math . floor (b / 16))
		+ hexstring . charAt (b % 16);
		return hex_color;
}

/*
ex. fadeElemColor('test1', 'style.backgroundColor', 0, 255, 1, 100);
*/ 
function fadeElemColor(eId, property, startC, endC, inc, delay) {
	if (startC > endC) {
		eval('document.getElementById(\''+eId+'\').'+property+'=get_hex_color('+endC+', '+endC+', '+endC+');');
		return;
	} /* if */

	eval('document.getElementById(\''+eId+'\').'+property+'=get_hex_color('+startC+', '+startC+', '+startC+');');
	window.setTimeout('fadeElemColor(\'' + eId + '\', \'' + property + '\', ' +(startC+inc) + ', ' + endC + ', ' + inc + ', ' + delay + ')', delay);
}

/*
==================================================================
Misc. Math functions
==================================================================
*/
function generateRandomNumber(maxnumber) {
	var generatornum;
	var r;
	generatornum=Math.random();
	var r=Math.round(generatornum*maxnumber);
	return (r);
}