// STANDARD JAVASCRIPT \\
// SITE VARIABLES
var IBS_Sitekey = 'hou';

if (typeof IBSsite == 'undefined')  IBSsite = new Object();
	IBSsite.siteKey = 'hou';
	IBSsite.city = 'Houston';
	IBSsite.state = 'Texas';
	IBSsite.stateAbv = 'TX';
	IBSsite.channelname ='Click2Houston';
	IBSsite.siteName = 'www.click2houston.com';
//Validate that the browser can open windows
WindowEnabled =  1;

function popUp(URL, ATTRIBUTES)
	//OPEN WINDOW JS
	// takes all attributes in direct format
{
	DEF_ATTRIB = 'width=200,height=200,top=100,left=100,resizable=yes,scrollbars';
	if (ATTRIBUTES == null) ATTRIBUTES = DEF_ATTRIB;
	if (WindowEnabled) {
		child = window.open(URL, "spawn", ATTRIBUTES);
		child.opener = self;
		if	(navigator.appName == 'Microsoft Internet Explorer' && parseInt(navigator.appVersion) == '2') {
		// Do Nothing
		} else {
		child.focus();
		}
	} else {
		document.location = MYURL;
	}
}

function emailafriend(URL, ATTRIBUTES) {
	ATTRIBUTES = 'width=450,height=225,top=100,left=100,resizable=yes,scrollbars';
	MYURL = "http://weather.click2houston.com/services/toafriend/index.cfm?page=" + window.location;
	
		child = window.open(MYURL, "spawn", ATTRIBUTES);
		child.opener = self;
		if	(navigator.appName == 'Microsoft Internet Explorer' && parseInt(navigator.appVersion) == '2') {
			// Do Nothing
		} else {
			child.focus();
		}
}

function Story(url, headline, image, summary) {
	this.url = url;
	this.headline = headline;
	this.image = image;
	this.summary = summary;
}


function health_archive(day)
	//Function closes Health Daily tips window and redirects user to archive
	{
			window.opener.location=("/sh/health/dailytips/"+day+"-archive.html");
			window.close();
	}	

function openVideo(sUrl, sName, sOptions) {
window.open(sUrl,sName,sOptions+',scrollbars=no,resizable=1,top=50,left=50,width=780,height=504');
}

function popUpOlympic(fileName) {
                // open new window
                newOlympicWin = window.open(fileName, 'newOlympicWin', 'status=1,toolbar=no,top=50,left=50,width=610,height=400');
                
}
function jumpTo(form) {

        var myindex=form.menu.selectedIndex
        window.location=form.menu.options[myindex].value;
}