// JavaScript Document
	var bro = 4;
	var DHTML = (document.getElementById || document.all || document.layers);
	bro = (document.getElementById && !document.all) ? 1 : bro;
	bro = (document.all) ? 2 : bro;
	bro = (document.layers) ? 3 : bro;

	if (document.layers) document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove=captureMousePosition;
    
	var xMousePos;
    var yMousePos;
    var xMousePosMax;
    var yMousePosMax;
	var fyy;
	
today = new Date();



weekDayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");



monthName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December");

function printate()

{

document.write("<b>" + weekDayName[today.getDay()]+ ", " + monthName[today.getMonth()] + " " + today.getDate()+ "</b>");

}
function translate(flang,tlang,musicmp3radio)
{
//	document.write("the the the the the the ");
window.open("http://translate.google.com/translate?hl=" + tlang + "&sl=" + flang + "&u=" + escape(location.href));
/*
window.location = transURL;}
	window.open('http://translate.google.com/translate
				?u='+escape(location.href)+'&amp;langpair=en%7Cde',%20'English_to_German',%20'resizable,scrollbars,status'));
	*/
}
/*
function ifdhtml()
{
	if(DHTML) return true;
	return false;
}*/
// code developed using the following workaround (CVS v1.15) as an example.
// http://lxr.mozilla.org/seamonkey/source/extensions/xmlterm/ui/content/XMLTermCommands.js
window.name="main";
function myRadioAndTvPlayer(URL,x,y,takefocus){
window.open(URL,'flo2floyo','width='+x+',height='+y+',toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=yes,left=60,screenX=60,top=100,screenY=100');if(takefocus) window.focus();
}
window.name="main";

function myFirstRadio(URL,x,y,takefocus){
	
  var scPlayer = window.open("",'flo2floyo','width='+x+',height='+y+',toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=yes,left=60,screenX=60,top=100,screenY=100');
                  if(scPlayer.document.body.innerHTML){
                        //alert ('exists, do nothing');
                  } else {
                        myRadioAndTvPlayer(URL,x,y,takefocus)
                  }	

}
function myRadioAndTvPlayer(URL,x,y,takefocus){
	
 window.open(URL,'flo2floyo','width='+x+',height='+y+',toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=yes,left=60,screenX=60,top=100,screenY=100');if(takefocus) window.focus();
}

   
  
  
function changeSt()
{ 

	if(!DHTML) return;
	for(f=0;f<arguments.length;f+=3)
	{
		layername = arguments[f];
		styl = arguments[f+1];
		layervis = arguments[f+2];
		obj = new getObj(layername);
		eval("obj.style."+styl +"= " +"layervis");
//	obj.style.visibility = 'visible';
//	eval("document.getElementById(layername).style."+styl +"= " +"layervis");
	}
}

 var scrollX, scrollY;
function sstchur_SmartScroller_GetCoords()
   {
     
      
      if (document.all)
      {
         if (!document.documentElement.scrollLeft)
            scrollX = document.body.scrollLeft;
         else
            scrollX = document.documentElement.scrollLeft;
               
         if (!document.documentElement.scrollTop)
            scrollY = document.body.scrollTop;
         else
            scrollY = document.documentElement.scrollTop;
      }   
      else
      {
         scrollX = window.pageXOffset;
         scrollY = window.pageYOffset;
      }
   
    
   }
   
  
   



function showFormUpdateUserEtc(a,b,c,d,e)
{
	//this.form.txt_value.value=d; needs to be username
	//this.form.title.value=e;
	//x = new getObj(a);
	//x.form.section.value = e;
	changeSt(a,b,c);
}

function setTextInLayer()
{
	sstchur_SmartScroller_GetCoords();
		if (!DHTML) return;
		layername = arguments[0];
		txt = arguments[1];
		

		switch (bro)
{	
	case 2:
	
		document.all[layername].innerHTML = txt;
	
	case 3:
	
		document[layername].document.write(txt);
		document[layername].document.close();
		break;
	case 1:
	
		over = document.getElementById([layername]);
		range = document.createRange();
		range.setStartBefore(over);
		domfrag = range.createContextualFragment(txt);
		while (over.hasChildNodes()) 
		{
			over.removeChild(over.lastChild);
		}
		over.appendChild(domfrag);
   		break;
	default:
			document.getElementById(layername).innerHTML = txt;
	}
    
}
function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

// Global variables

function captureMousePosition(e) {
		fyy = yMousePos;
if (document.layers) {
        // When the page scrolls in Netscape, the event's mouse position
        // reflects the absolute position on the screen. innerHight/Width
        // is the position from the top/left of the screen that the user is
        // looking at. pageX/YOffset is the amount that the user has
        // scrolled into the page. So the values will be in relation to
        // each other as the total offsets into the page, no matter if
        // the user has scrolled or not.
        xMousePos = e.pageX;
        yMousePos = e.pageY;
		
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
    } else if (document.all) {
        // When the page scrolls in IE, the event's mouse position
        // reflects the position from the top/left of the screen the
        // user is looking at. scrollLeft/Top is the amount the user
        // has scrolled into the page. clientWidth/Height is the height/
        // width of the current page the user is looking at. So, to be
        // consistent with Netscape (above), add the scroll offsets to
        // both so we end up with an absolute value on the page, no
        // matter if the user has scrolled or not.
        xMousePos = window.event.x+document.body.scrollLeft;
        yMousePos = window.event.y+document.body.scrollTop;
        xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
        yMousePosMax = document.body.clientHeight+document.body.scrollTop;
    } else if (document.getElementById) {
        // Netscape 6 behaves the same as Netscape 4 in this regard
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
    }

		window.status = "xMousePos=" + xMousePos + ", yMousePos=" + yMousePos + ", xMousePosMax=" + xMousePosMax + ", yMousePosMax=" + yMousePosMax;
}
function getStyleById(i, p) {
	var n = document.getElementById(i);
	var s = eval("n.style." + p);
	var res = new Array();
	var cou =0;
	// try inline
	if((s != "") && (s != null)) {
		res[0] = s;
		return res;
	}

	// try currentStyle
	if(n.currentStyle) {
		var s = eval("n.currentStyle." + p);
		if((s != "") && (s != null)) {
			res[0] = s;
			return res;
		}
	}

	// try styleSheets
	var sheets = document.styleSheets;
	if(sheets.length > 0) {
		// loop over each sheet
		for(var x = 0; x < sheets.length; x++) {
			// grab stylesheet rules
			var rules = sheets[x].cssRules;
//			if(x==1) document.write(sheets[x].href);
			if(rules.length > 0) {
				// check each rule
				for(var y = 0; y < rules.length; y++) {
					var z = rules[y].style;
					// selectorText broken in NS 6/Mozilla: see
					// http://bugzilla.mozilla.org/show_bug.cgi?id=51944

//					document.write(rules[y].selectorText);
/*					ugly_selectorText_workaround();
					if(allStyleRules)
					{
						if(allStyleRules[y] == i) 
						{
							return z[p];
						}
					} else 
					{
						// use the native selectorText and style stuff*/

														//document.write(rules[y].selectorText);
						if(rules[y].selectorText == "#"+i)
						{
//document.write();
							if((z[p] != "") && (z[p] != null))
							{					   
								res[cou]=z[p];
								cou++;
							}
						}
					
				}
			}
		}
	}
	if(res.length>0) return res[res.length-1];
	return null;
}
function setTxtInLayer(layername,txt)
{
	

}
