var aryQuickCal = new Array(3);
var intQuickCal = 0;

// Array of month Names
var monthNames = new Array("January","February","March","April","May","June","July",
													 "August","September","October","November","December");

// ########### WEATHER IN HEADER
	function changeWeather(divIden,obj)
	{
		showMenu(divIden,'showWeather','weathHead')		
		obj.style.fontWeight='bold';
	}

	// INITIATE WEATHER
	if (document.getElementById('weathIden1')!=null)
	{
		changeWeather('1',document.getElementById('weathIden1'));
	}

//---------------------------	
function NewWindow(width,height,url) {
//---------------------------	
	window.open(url,"PopUp","menubars=0,scrollbars=1,resizable=1,height="+height+",width="+width);
}
//-------------------
function closeDivs(clsName) 
//-------------------
	{if (document.getElementsByTagName('div')) 
		{var arrayOfDivs = document.getElementsByTagName('div');
			var howMany = arrayOfDivs.length - 1;
			for (var i=0; i < howMany; i++) 
				{	var thisDiv = arrayOfDivs[i];
					var styleClassName = thisDiv.className;
					if (styleClassName == clsName)
					{if(thisDiv.style.display=='inline')
						{thisDiv.style.display='none'}
					}}} 
		else 
		{if (document.styleSheets[0].showMenu) 
			{ if(document.styleSheets[0].showMenu.display=='inline')
						 {document.styleSheets[0].showMenu.display='none'}
				}}}    
//-------------------
function showMenu(menuNumber, clsName, preId) 
//-------------------	
	{
		closeDivs(clsName);
    var menuId = preId + menuNumber;
    if(changeObjectVisibility(menuId,'inline')) {
			return true;
    	} else {return false;}}    
//-------------------
function getStyleObject(objectId) 
//-------------------
{
    if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {	
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	return document.layers[objectId];
    } else {
	return false;}}
//-------------------
function changeObjectVisibility(objectId,newDisplay) 
//-------------------
{
var styleObject = getStyleObject(objectId);
  if(styleObject){	
  	styleObject.display = newDisplay;
		return true;
  } else {
	  return false;
  }
} 				
//-------------------
function writeMonth()
//-------------------
{
	var d = document.write(monthNames[nNow.getMonth()] + " " + nNow.getDate());	
	return d;
}
//-------------------
function ShowHide(id)
//-------------------
 {
    obj = document.getElementsByTagName("div");
    if (obj[id].style.visibility == 'visible'){
    obj[id].style.visibility = 'hidden';
    }
    else {
    obj[id].style.visibility = 'visible';
    }
}


//-------------------
function CountDown(intSecs)
//-------------------
{
	intSecs -= 1;

	if (intSecs <= 0)
	{ 
		return 0;
	}
	else 
	{
		setTimeout("CountDown(" + intSecs + ")",1000);
	}
}


//-------------------
function switch_tab_newslist(intThisId, strBase, intTotalIds)
//-------------------
{
	document.getElementById(strBase+intThisId).style.display='block';
	document.getElementById(strBase+'Tab'+intThisId).style.backgroundColor='#FFFFFF';
	document.getElementById(strBase+'Tab'+intThisId).style.zIndex='60';

	for (var i=1; i<=intTotalIds; ++i)
	{
		if (i != intThisId)
		{
			document.getElementById(strBase+i).style.display='none';
			document.getElementById(strBase+'Tab'+i).style.background='#EEEEEE';
			document.getElementById(strBase+'Tab'+i).style.zIndex='40';
		}
	}

}

//-------------------
function checkIt(string)
//-------------------
{
	var detect = navigator.userAgent.toLowerCase();
	var place,thestring;
	place = detect.indexOf(string) + 1;
	return place;
}


