function openWindow(url, name, properties, openerName)
 {
		var agent = navigator.userAgent.toLowerCase(); 
		if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) == 4 && agent.indexOf("msie 5") == -1 && agent.indexOf("msie5") == -1 && agent.indexOf("win") != -1 && url.indexOf("http://") == 0)
			{
				winReference = window.open('about:blank', name, properties);
				setTimeout('if (winReference && !winReference.closed) winReference.location.replace("' + url + '")', 300);
			}
 }

//else winReference = window.open(url, name, properties);
//setTimeout('if (winReference && !winReference.closed) winReference.focus()', 200);if (openerName) self.name = openerName;return winReference;

	function closeDialog(dialog)
	{
		if(dialog && dialog.closed != true)
			dialog.close();
	}

	function closeParentDialog()
	{
		if(top.opener && isWindowPopup(top.opener))
			{
				root = top.opener.top.opener;
				top.opener.close();
				top.opener = root;
			}
	}
	
	function isWindowPopup(win)
	{
		return ((win.opener) ? true : false);
	}
 
  var Days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
  var today = new Date();
  var Year = takeYear(today);
  var Month = leadingZero(today.getMonth()+1);
  var DayName = Days[today.getDay()];
  var Day = leadingZero(today.getDate());
  
  function takeYear(theDate)  
  {
  	x = theDate.getYear();
  	var y = x % 100;
  	y += (y < 38) ? 2000 : 1900;
  	return y;
  }
  
  function leadingZero(nr)
  {
  	if (nr < 10) nr = "0" + nr;
  	return nr;
  }
  
  var DHTML = (document.getElementById || document.all || document.layers);
  
  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];
  		}
  }
  
  function setmarketplace()
  {
  	if(DayName == 'Monday' || DayName == 'Tuesday')
  		{
  			var z = new getObj('menu1');
  			z.style.visibility = 'visible';
  		}
  	if(DayName == 'Wednesday' || DayName == 'Thursday')
  		{
  			var z = new getObj('menu3');
  			z.style.visibility = 'visible';
  		}
  	if(DayName == 'Friday')
  		{
  			var z = new getObj('menu4');
  			z.style.visibility = 'visible';
  		}
  	if(DayName == 'Saturday' || DayName == 'Sunday')
  		{
  			var z = new getObj('menu2');
  			z.style.visibility = 'visible';
  		}
  }
  
  function change(vis)
  {
  	for(i=1; i<5; i++)
  	{
  		if (!DHTML) return;
  		var x = new getObj('menu'+i);
  		x.style.visibility = 'hidden';
  	}
  	
  	var x = new getObj(vis);
  	x.style.visibility = 'visible';
  }
  
  function show(name)
  {
  	var x = new getObj(name);
  	x.style.visibility = 'visible';
  }
  
  function hide(name)
  {
  	var x = new getObj(name);
  	x.style.visibility = 'hidden';
  }
  
  function P7_JumpMenu(selObj,restore)
  {
  	var theFullString = selObj.options[selObj.selectedIndex].value;
  	
  	if (restore)
  		selObj.selectedIndex=0;
  	
  	var theLength = theFullString.length;
  	var endPos = theFullString.lastIndexOf("~");
  	var theUrl, theTarget, theParent;
  	
  	if (endPos > 0)
	  	theUrl = theFullString.substring(0,endPos);
  	else
  		theUrl = theFullString;
  	
  	endPos++;
  	
  	if (endPos < theLength)
  		theTarget = theFullString.substring(endPos,theLength)
  	else
  		theTarget = "window:Main";
  	
  	if (theTarget == "window:New")
  		window.open(theUrl);
  	else if (theTarget == "window:Main")
  		eval("parent.location='"+theUrl+"'");
  	else
  		eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");
	}
	
	var detect = navigator.userAgent.toLowerCase();
	var OS,browser,total,thestring;
	var version = 0;
	
	if (checkIt('konqueror'))
		{
			browser = "Konqueror";
			OS = "Linux";
		}
	else if (checkIt('opera'))
		browser = "Opera";
	else if (checkIt('webtv'))
		browser = "WebTV";
	else if (checkIt('msie'))
		browser = "Internet Explorer";
	else if (!checkIt('compatible'))
		{
			browser = "Netscape Navigator";
			version = detect.charAt(8);
		}
	else
		browser = "An unknown browser";
	
	if (!version)
		version = detect.charAt(place + thestring.length);
	
	if (!OS)
		{
			if (checkIt('linux'))
					OS = "Linux";
			else if (checkIt('x11'))
				OS = "Unix";
			else if (checkIt('mac'))
				OS = "Mac";
			else if (checkIt('win'))
				OS = "Windows";
			else
				OS = "an unknown operating system";
		}
	
	function checkIt(string)
	{
		place = detect.indexOf(string) + 1;
		thestring = string;
		return place;
	}