
	 var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{	 string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 	 string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

var isie6 = (BrowserDetect.browser=='Explorer'&&BrowserDetect.version<7);
var isie7 = (BrowserDetect.browser=='Explorer'&&BrowserDetect.version==7);


	var fnDomain = 'http://www.foxnews.com';

function getElementStyle(e,p) {
	//var e = $s(i);
	if(document.defaultView) {
		return document.defaultView.getComputedStyle(e, null).getPropertyValue(p);
	} else if(e.currentStyle) {
		var p = p.replace(/-\D/gi, function(toCamelCase)
		{
			return toCamelCase.charAt(toCamelCase.length - 1).toUpperCase();
		});
		return e.currentStyle[p];
	}
	else return null;
}

function appendEventListener(obj,evt,fun,cap) {//usage like window,"load",f,false
	cap = cap?true:false;

	// W3C Event Model
	if (obj.addEventListener) {
		obj.addEventListener(evt,fun,cap);
		return true;
	}
	// IE Event Model
	if (obj.attachEvent) {
		obj.attachEvent("on"+evt,fun);
		return true;
	}
	return false;
}

function getParent(e) {
	return e.parentNode?e.parentNode:(e.parentElement?e.parentElement:null);
}

function getUpdatedTime(d) {


	var now = new Date();
	now.setHours(now.getHours()+(now.getTimezoneOffset()-300)/60);
	var frc = (now.getTime()-Date.parse(d))/60000;
	var udt = Math.floor(frc);
	
	 var def = new Date(d).formatDate('n/d g:i A \E\T');
	 console.log(def);
	return udt<0?def:(udt==0?Math.floor(frc*60)+' secs ago':(udt==1?udt+' min ago':(udt<60?udt+' mins ago':def)));
}


function getUqeTime(d) {
 	var shortMonth = d.substr(0,3);
	var longMonth;
	
	switch(shortMonth){
		case "Jan":
		longMonth = "January"
		break;
		case "Feb":
		longMonth = "February"
		break;
		case "Mar":
		longMonth = "March"
		break;
		case "Apr":
		longMonth = "April"
		break;
		case "May":
		longMonth = "May"
		break;
		case "Jun":
		longMonth = "June"
		break;
		case "Jul":
		longMonth = "July"
		break;
		case "Aug":
		longMonth = "August"
		break;
		case "Sept":
		longMonth = "September"
		break;
		case "Oct":
		longMonth = "October"
		break;
		case "Nov":
		longMonth = "November"
		break;
		case "Dec":
		longMonth = "December"
		
	}
	
	return longMonth + " " + d.substr(3,d.length - 3).replace(".",",");
	
}

Object.extend(Event, {
	observe: function(element, name, observer, useCapture) {
		var element = $(element);
		useCapture = useCapture || false;
		if (name == 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.attachEvent)) {
			name = 'keydown';
		}
		if (name == 'load' && element.screen) {
			this._observeLoad(element, name, observer, useCapture);
		} else {
			this._observeAndCache(element, name, observer, useCapture);
		}
	},
	_observeLoad : function(element, name, observer, useCapture) {
		if (!this._readyCallbacks) {
			var loader = this._onloadWindow.bind(this);
			if (document.addEventListener) {
				document.addEventListener("DOMContentLoaded", loader, false);
			}
			/*@cc_on @*/
			/*@if (@_win32)
			if (! $("__ie_onload")) {
				document.write("<scr"+"ipt id='__ie_onload' defer='true' src='://'><\/scr"+"ipt>");
				var script = $("__ie_onload");
				script.onreadystatechange = function() { if (this.readyState == "complete") loader(); };
			} else {
				loader();
			}
			/*@end @*/
			if (navigator.appVersion.match(/Konqueror|Safari|KHTML/i)) {
				Event._timer = setInterval(function() {if(/loaded|complete/.test(document.readyState))loader();}, 10);
			}
			Event._readyCallbacks =  [];
			this._observeAndCache(element, name, loader, useCapture);
		}
		Event._readyCallbacks.push(observer);
	},
	_onloadWindow : function() {
		if (arguments.callee.done) {return;}
		arguments.callee.done = true;
		if (this._timer) {clearInterval(this._timer);}
		this._readyCallbacks.each(function(f) { f() });
		this._readyCallbacks = null;
	}
});

function Cookie(document, name, hours, path, domain, secure)
{
	this.$document = document;
	this.$name = name;
	this.$expiration = hours?new Date((new Date()).getTime() + hours*3600000):null;
	this.$path = path?path:null;
	this.$domain = domain?domain:null;
	this.$secure = secure?true:false;
}

Cookie.prototype.store = function() {
	var cookieval = "";
	for(var prop in this) {
		// Ignore properties with names that begin with '$' and also methods
		if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function')) {
			continue;
		}
		if (cookieval != "") cookieval += '&';
		cookieval += prop + ':' + escape(this[prop]);
	}

	var cookie = this.$name + '=' + cookieval;
		cookie += this.$expiration?'; expires=' + this.$expiration.toGMTString():'';
		cookie += this.$path?'; path=' + this.$path:'';
		cookie += this.$domain?'; domain=' + this.$domain:'';
		cookie += this.$secure?'; secure':'';

	this.$document.cookie = cookie;
}

Cookie.prototype.load = function() { 
	var allcookies = this.$document.cookie;
	if (allcookies == "") return false;

	var start = allcookies.indexOf(this.$name + '=');
	if (start == -1) return false;
	start += this.$name.length + 1;
	var end = allcookies.indexOf(';', start);
	if (end == -1) end = allcookies.length;
	var cookieval = allcookies.substring(start, end);

	var a = cookieval.split('&');
	for(var i=0; i < a.length; i++) {
		a[i] = a[i].split(':');
	}

	for(var i = 0; i < a.length; i++) {
		this[a[i][0]] = unescape(a[i][1]);
	}

	return true;
}

Cookie.prototype.remove = function() {
	var cookie;
	cookie = this.$name + '=';
	cookie += this.$path?'; path=' + this.$path:'';
	cookie += this.$domain?'; domain=' + this.$domain:'';
	cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT';

	this.$document.cookie = cookie;
}

function getCookieValue(n) {
	if (!document.cookie) {
		return '';
	}
	c = document.cookie;
	var v = "";
	index = c.indexOf(n + "=" );
	if (index<0) {
		return '';
	}
	var countbegin = (c.indexOf("=", index)+1);
	if (0<countbegin){
		var countend = c.indexOf(";", countbegin);
		if (countend < 0 ) {
			countend = c.length;
		}
		return c.substring(countbegin, countend);
	}
	return '';
}

function trim(s){
	while(s.charAt(0)==" "){
		s = s.replace(s.charAt(0),"");
	}
	while(s.charAt((s.length -1))==" "){
		s = s.substring(0,s.length-1);
	}
	return s;
}

function getVelocityValue(x) {
	return 20+((x-1)*5);
}

function checkSliderButtons(i,t,p,o) {
	 var headroom = 25;
	if (t=='gallery') {
		if (window.rst) {
			var next = function(){window.rst.next($('next_'+i));return false;}
		} else {
			var next = function(){window.re.next($('next_'+i));return false;}
		}
	} else {
		var next = function(){window.rs.next($('next_'+i));return false;}
	}
	if (p>o+headroom) {
		$('next_'+i).className='next';
		$('next_'+i).onclick=next;
	} else {
		$('next_'+i).className='next off';
		$('next_'+i).onclick=function(){return false;};
	}
	if (p<0) {
		$('prev_'+i).className='prev';
	} else {
		$('prev_'+i).className='prev off';
	}
}

function moveNext(i,t,f,x){
	var x=x?x:0;
	var o = $(t+'_content_'+i);

	var offst = $('clipper_'+i).offsetWidth-o.offsetWidth;
	var pleft = parseInt(o.style.left);
	var headroom = 0;
 if (t=='gallery') {
		headroom = 0;
		if (pe_nav_type=='numeric') {
			headroom = 5;
		}
	} else {
		 if (i==2&&window.speed==220) {
			headroom = 5;
		} else {
			headroom = 20;
		}
	}
	if (pleft>offst+headroom) { o.style.left=pleft-(speed/f)+"px";
		x++;
		var ti;
		if (x<(speed/(speed/f))) {
			ti = getVelocityValue(x);
			setTimeout("moveNext("+i+",'"+t+"',"+f+","+x+")",ti);
		}
	}
	checkSliderButtons(i,t,parseInt(o.style.left),offst);
	 updateCount(t+'_counter_'+i,Math.floor((Math.abs(pleft-(speed/f))/speed)+1),Math.floor(o.offsetWidth/speed),"/");
}

function movePrev(i,t,f,x){
	var x=x?x:0;
	var o = $(t+'_content_'+i);
	var pleft = parseInt(o.style.left);
	if (pleft<0) {
		o.style.left=pleft+(speed/f)+"px";
		x++;
		var ti;
		if (x<(speed/(speed/f))) {
			ti = getVelocityValue(x);
			setTimeout("movePrev("+i+",'"+t+"',"+f+","+x+")",ti);
		}
	}
	checkSliderButtons(i,t,parseInt(o.style.left),$('clipper_'+i).offsetWidth-o.offsetWidth);
	updateCount(t+'_counter_'+i,Math.floor((Math.abs(pleft-(speed/f))/speed)+1),Math.floor(o.offsetWidth/speed),"/");
}

function updateCount(e,n,t,s){
	var m = '<span style="font-size:.9166em;font-weight:bold;color:#444;">Scroll for more stories</span> - ';
	//var exist=typeof($(e))=="undefined"?false:true;
	//if(exist){$(e).innerHTML = m + n + s + t;}	
	if($(e)){$(e).innerHTML = m + n + s + t;}
}

function pop(mypage, myname, w, h, scroll, menu) {
	var winl = Math.floor(((screen.width - w) / 2) - 5);
	var wint = Math.floor(((screen.height - h) / 2) - 25);
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no';
	if (menu=='yes') {winprops += ',menubar=yes,toolbar=yes,locationbar=yes';}
	 win = window.open(mypage, myname, winprops);
	if (win) {win.focus();}
}

// Pop for Business Portfolio
function popPort() {
	var height = ((screen.width>800) && (screen.height>600)) ? 680 : 520;
	pop("/business/tools/portfolio.html?page=portfolio",'portfolio','750',height,'no','no');
}
// Pop for Cashin' In Challenge Game
function popGame() {
	popPort();
}

function popTracker() {
	pop("/politics/youdecide2006/tracker/index.html", "tracker", 790, 451, 0, 0);
}

// Map Pop Script to launch daughter win w/ image
function mapPop(imageUrl,title,w,h) {
	var dimensions = "width="+w+",height="+h;
	var winName = title.replace(/ /g,"");
	var title = title+" -- FOXNews.com";
	var win = window.open("",winName,dimensions);
	if (win) {
		var d = win.document;
		d.writeln('<html><head><title>'+title+'</title></head>');
		d.writeln('<body style="margin:0;padding:0;" onload="window.focus();">');
		d.writeln('<img src="'+imageUrl+'" style="border:0;">');
		d.writeln('</body></html>');
		d.close(); 
	}
}

var vidUrlFile = "";
function videoPlayer(vidFile,headline,format,hd,category,relID,channel,duration) {
	var category = category.replace(/'/g, "&#39;");
	var channel = typeof(channel) == "undefined" ? "" : channel.replace(/'/g, "&#39;");
	var duration = typeof(duration) == "undefined" ? 180 : duration;
	if(!hd || hd == "") {hd = "acc";}
	if(format == "Campaign_Carl" || format == "5_-_You_Decide") hd = "elec";
	if(vidUrlFile == "") {vidUrlFile = "resize05.html";}
//	var h = (screen.width > 1000 && BrowserDetect.browser != "Opera") ? 655 : 510;
	sLiveStream = vidFile.split("_::_");
	var h = (sLiveStream[0]=="liveSiteStream" && sLiveStream[2]=='chat') ? 700 : 325;
	var winState = (screen.width > 1000 && BrowserDetect.browser != "Opera") ? "exp" : "col";
	var vidUrl = fnDomain+"/video2/"+vidUrlFile+"?"+vidFile+"&"+escape(format)+"&"+escape(headline)+"&"+escape(hd)+"&"+escape(category)+"&"+relID+"&"+escape(channel)+"&"+duration+"&"+winState;
	var winl = ((screen.width - 700) / 2) - 5;
	winprops = 'height='+h+',width=700,top=5,left='+winl;
	fncVidWin = window.open(vidUrl, 'fncVidPlayer', winprops);
	if (fncVidWin) {fncVidWin.focus();}
}

function videoPlayerEmbed(v){
	location.href = location.href.split('?')[0]+'?referralObject='+v;
}

function foxVideoPlayer(sMPID, sMPlaylistID, videoTitle) {
  videoURL = 'http://video.foxnews.com'
  if (sMPID != "") {
  	videoURL += '/' + sMPID;
  }
  if (videoTitle != "") {
	videoURL += "/" + videoTitle.toLowerCase().replace(/ /g, "-").replace(/[^-a-zA-Z0-9]/g, "");
  }
  if (sMPlaylistID != "") {
    videoURL += + '/?categoryID=' + sMPlaylistID;
  }
  window.location = videoURL;
  return false;
}

// Video Player Launch Scripts
function videoMPlayer(sMPID, sMPlaylistID){
 videoURL = 'http://video.foxnews.com'
  if (sMPID != "") {
  	videoURL += '/' + sMPID;
  }
  if (sMPlaylistID != "") {
    videoURL += + '/?categoryID=' + sMPlaylistID;
  }
  window.location = videoURL;
  return false;
}

// Live Site Stream
function siteStreamPlayer(n, sChat){
	if(typeof(n)=="undefined"){
			liveFile = 'liveSiteStream';
		} else{
			liveFile = 'liveSiteStream_::_'+n+'_::_'+sChat;
		}
		videoPlayer(liveFile,'Live%20Stream','Live_Site_Stream','acc','Live%20Stream','-1','News',180);
}

function siteStreamFlashPlayer(n, site) {
	var s = typeof(n) == 'undefined' ? 1 : n;
	var d = typeof(site) == 'undefined' ? 'foxnews' : site;
	var w = 850;
	var h = 506;
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings  ='height='+h+',';
	settings +='width='+w+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='toolbar=no,';
	settings +='location=no,';
	settings +='scrollbars=no,';
	settings +='status=no,';
	settings +='resizable=no,';
	settings +='fullscreen=no';
	var win = window.open('http://interactive.' + d + '.com/livestream/live.html?chanId='+s+'&openAIR=true','livePlayer',settings);
	win.focus();
}

// Live Radio Stream
function radioStreamPlayer(){
	videoPlayer('liveRadioStream','FOX%20News%20Talk%20Live%20Stream','Live_Radio_Stream','acc','FOX News Talk','-1','Shows',180);
}

// Fish Bowl Cam
function fishBowlPlayer(){
	videoPlayer('fishBowlStream','Fish%20Bowl%20Cam','Fish_Bowl_Stream','acc','FOX & Friends','-1','Shows',180);
}
function siteSearch(s) {
	var sch = s.replace(/&amp;#39;/g, "'");
	window.open("http://search2.foxnews.com/search?client=my_frontend&proxystylesheet=my_frontend&output=xml_no_dtd&filter=0&getfields=*&sort=date:D:S:d1&site=story&q=" + escape(sch));
}

function accessVideo(file,head,deck,vidHead,img,thumb,related,format,playerHead,category,channel,duration) {
	this.file = file;
	this.head = head;
	this.deck = deck;
	this.vidHead = vidHead;
	this.img = img;
	this.thumb = thumb;
	this.related = related;
	this.format = format;
	this.playerHead = playerHead;
	this.category = category;
	this.channel = typeof(channel) == "undefined" ? "" : channel;
	this.duration = typeof(duration) == "undefined" ? 180 : duration;	
}

function isBlank(v){
	return v.replace(/^s*|s*$/g,"").length == 0 ? true : false;
}

function checkZip(t){
	if(isBlank(t) || parseInt(t) != t || t.length != 5){
		alert("Please submit a valid zip code");
		return false;
	} else {
		return true;
	}
}

function stockSearch(s) {
    window.location = fnDomain + "/business/quote/index.html?searchString="+s+"&story=tickerLookup";
}

function writeSearch(){
	var s = '<div style="position:relative;background-color:#000;padding:0.25em;width:37.5em;margin:0 auto 0.83em;">';
	s += '<form method="get" action="http://search2.foxnews.com/search" style="padding:0;margin:0;">';
	s += '<input type="hidden" name="ie" value="UTF-8" />';
	s += '<input type="hidden" name="oe" value="UTF-8" />';
	s += '<input type="hidden" name="client" value="my_frontend" />';
	s += '<input type="hidden" name="proxystylesheet" value="my_frontend" />';
	s += '<input type="hidden" name="output" value="xml_no_dtd" />';
	s += '<input type="hidden" name="site" value="story" />';
	s += '<input type="hidden" name="getfields" value="*" />';
	s += '<input type="hidden" name="filter" value="0" />';
	s += '<input type="hidden" name="sort" value="date:D:S:d1" />';
	s += '<p style="color:#fff;margin:0;padding:0 0.87em 0 0.17em;display:inline;font-size:0.92em;"><strong>SEARCH</strong></p>';
	s += '<input type="text" name="q" value="" style="width:27.08em;font-size:1.08em;border:0;display:inline;" />';
	s += '<input type="submit" name="submit" value="GO" style="position:absolute;right:0.42em;bottom:0.35em;border:0;font-size:0.92em;font-weight:bold;margin-left:0.71em;width:3em;height:1.5em;"/>';
	s += '</form></div>';
	document.write(s);
}

function footer() {
	var f = '<div class="capblack">';
	f += '<a href="'+fnDomain+'/rss/index.html" style="font-size:12px; font-weight:bold;">Click here for FOX News RSS Feeds</a><br><br>'
	f += '<a href="#" onclick="pop(\''+fnDomain+'/mediakit/ad_firstpage.html\',\'mediaWin\',650,485,\'no\',\'no\');" style="font-size:12px; font-weight:bold;">Advertise on FOX News Channel, FOXNews.com and FOX News Radio</a>';
	f += '<br><a href="'+fnDomain+'/story/0,2933,27906,00.html">Jobs at FOX News Channel.</a>';
	f += '<br><a href="#" onclick="pop(\''+fnDomain+'/projects/internships\',\'internsWin\',640,480,\'no\',\'no\');">Internships At Fox News (Summer Application Deadline is March 15, 2007)</a>';
	f += '<br><a href="'+fnDomain+'/other/termsofuse.html">Terms of use.</a>&nbsp;&nbsp;<a href="'+fnDomain+'/other/privacy.html">Privacy Statement.</A>&nbsp;&nbsp;For FOXNews.com comments write to';
	f += '<br><a href="mailto:foxnewsonline@foxnews.com">foxnewsonline@foxnews.com</a>;&nbsp;&nbsp;For FOX News Channel comments write to';
	f += '<br><a href="mailto:comments@foxnews.com">comments@foxnews.com</a><br>&copy; Associated Press.  All rights reserved.';
		
	if (section_id == 3 || section_id == 0) {
		f += '<br><br><a href="http://www.smartmoney.com" target="_blank">SMARTMONEY &reg;</a> &copy; 2006 SmartMoney. SmartMoney is a joint publishing venture of Dow Jones & Company, Inc. and Hearst SM Partnership. All Rights Reserved.';
		f += '<br>All quotes delayed by 20 minutes. Delayed quotes provided by <a href="http://www.comstock-interactivedata.com/" target="_blank">ComStock</a>.';
		f += '<br>Historical prices and fundamental data provided by <a href="http://www.hemscottdata.com" target="_blank">Hemscott, Inc.</a>'
		f += '<br>Mutual fund data provided by <a href="http://www.lipperleaders.com/" target="_blank">Lipper</a>. Mutual Fund NAVs are as of previous day\'s close.';
		f += '<br>Earnings estimates provided by <a href="http://www.zacks.com/" target="_blank">Zacks Investment Research</a>.';
		f += '<br>Upgrades and downgrades provided by <a href="http://www.briefing.com/" target="_blank">Briefing.com</a>.<br>';
	}
	
	f += '<br>This material may not be published, broadcast, rewritten, or redistributed.';
	var curdate = new Date();
	var year = curdate.getFullYear();
	f += '<br><br>Copyright '+ year +' FOX News Network, LLC.  All rights reserved.<br>All market data delayed 20 minutes.';
	f += '</div>';
	return f;
}

var is_ie='v'=='v';
function slide_u(id, ele, max, ofs){
	//var ele = document.getElementById(id);
	var top = ele.offsetTop;
	check(top, id, ofs);
	if (max>0) {
		ele.style.top = (top + 13) + "px";
		var fn = function(){slide_u(id, ele, max-13, ofs);};
		setTimeout(fn,0.5);
	}
}
function slide_d(id, ele, max, ofs){
	//var ele = document.getElementById(id);
	var top = ele.offsetTop;
	check(top, id, ofs);
	if (max>0) {
		ele.style.top = (top - 13) + "px";
		var fn = function(){slide_d(id, ele, max-13, ofs);};
		setTimeout(fn,0.5);
	}
}
function slide(dir, id){
	var ele = document.getElementById(id);
	var hgt = ele.offsetHeight;
	var how = 5;//how many items #5
	var unt = 26;//height of item #41 
	var ofs = 1-(hgt-(how*unt));
	if (is_ie) ofs+=1;//ie calcs 1 extra pixel
	var scr = 5;//scroll by #5, #10
	var top = ele.offsetTop;
	//alert('old top: '+top);
	if (dir=='down') {
		if (top < 0) {
			slide_u(id, ele, (scr*unt), ofs);
		}
	}
	if (dir=='up') {
		if (top > ofs) {
			slide_d(id, ele, (scr*unt), ofs);
		}
	}
	}
function slide_u2(id, ele, max, ofs, a){
	//var ele = document.getElementById(id);
	var top = ele.offsetTop;
	check(top, id, ofs);
	if (max>0) {
		ele.style.top = (top + a) + "px";
		var fn = function(){slide_u2(id, ele, max-a, ofs, a);};
		setTimeout(fn,0.5);
	}
}
function slide_d2(id, ele, max, ofs, a){
	//var ele = document.getElementById(id);
	var top = ele.offsetTop;
	check(top, id, ofs);
	if (max>0) {
		ele.style.top = (top - a) + "px";
		var fn = function(){slide_d2(id, ele, max-a, ofs, a);};
		setTimeout(fn,0.5);
	}
}
function slide2(dir, id, b){
	var ele = document.getElementById(id);
	var hgt = ele.offsetHeight;
	var how = 5;//how many items #5
	var unt = b;//height of item #41
	var a = 25;
	var ofs = 1-(hgt-(how*unt));
	if (is_ie) ofs+=1;//ie calcs 1 extra pixel
	var scr = 5;//scroll by #5, #10
	var top = ele.offsetTop;
	//alert('old top: '+top);
	if (dir=='down') {
		if (top < 0) {
			slide_u2(id, ele, (scr*unt), ofs, a);
		}
	}
	if (dir=='up') {
		if (top > ofs) {
			slide_d2(id, ele, (scr*unt), ofs, a);
		}
	}
	}
function check(top, id, ofs) {
	 if (top >= ofs) {
		document.getElementById('down_'+id).className="down";
	} else {
		document.getElementById('down_'+id).className="inactive-down";
	}
	if (top >= 0) {
		document.getElementById('up_'+id).className="inactive-up";
	} else {
		document.getElementById('up_'+id).className="up";
	}
}

Rollimage = new Array()

  Rollimage[0]= new Image()
  Rollimage[0].src = fnDomain+"/i/new/feat-shows-blue.gif"

  Rollimage[1] = new Image()
  Rollimage[1].src = fnDomain+"/i/new/feat-shows-white.gif" 

  function SwapOut(){
    document.rollover.src = Rollimage[1].src;
	//alert(Rollimage[1].src);
    return true;
  }

  function SwapBack(){
    document.rollover.src = Rollimage[0].src; 
	//alert(Rollimage[0].src);
    return true;
  }





function overlay(element) {
 el = document.getElementById(element);
 el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible";
 }
 
 
 
 function changeDisplay(id){
    //cleanDisplay();
    if(document.getElementById(id) !=null)
    {
        document.getElementById(id).style.background='#EBF1F6';
        
    }
    return false;
    
}

function cleanDisplay(id){
    if(document.getElementById(id) !=null){
	
        document.getElementById(id).style.background ='#fff';
    }
    
    
}


function cleanDisplayEven(id){
    if(document.getElementById(id) !=null){
        document.getElementById(id).style.background ='#E5E5E5';
    }
    
    
}

function parseLoomia(data) {
	var mrContent="";
	classStyle = "even"		
	jQuery.each(data.recs, function(i,item){
		if( classStyle == "even"){
			classStyle = "odd"
		}
		else{
		 	classStyle = "even";
		}
		mrContent +=  '<li><a href="'+ item.link+'" class="' +classStyle+ '" ><p class="grey-number">'+ (i + 1) +'</p> <p>' + item.title + '</p><p class="more">&raquo;</p></a></li>'; //'<li><a href="'+ item.link +'" >' + item.title + '</a></li>';
		if ( i == 10 ) return false;
	});
	jQuery('#link_list_most_read').html(mrContent);	
}