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<\/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 (0o+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 = 'Scroll for more stories - '; //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(''+title+''); d.writeln(''); d.writeln(''); d.writeln(''); d.close(); } } var vidUrlFile = ""; function videoPlayer(vidFile,headline,format,hd,category,relID,channel,duration) { var category = category.replace(/'/g, "'"); var channel = typeof(channel) == "undefined" ? "" : channel.replace(/'/g, "'"); 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(/&#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 = '
'; s += '
'; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += '

SEARCH

'; s += ''; s += ''; s += '
'; document.write(s); } function footer() { var f = '
'; f += 'Click here for FOX News RSS Feeds

' f += 'Advertise on FOX News Channel, FOXNews.com and FOX News Radio'; f += '
Jobs at FOX News Channel.'; f += '
Internships At Fox News (Summer Application Deadline is March 15, 2007)'; f += '
Terms of use.  Privacy Statement.  For FOXNews.com comments write to'; f += '
foxnewsonline@foxnews.com;  For FOX News Channel comments write to'; f += '
comments@foxnews.com
© Associated Press. All rights reserved.'; if (section_id == 3 || section_id == 0) { f += '

SMARTMONEY ® © 2006 SmartMoney. SmartMoney is a joint publishing venture of Dow Jones & Company, Inc. and Hearst SM Partnership. All Rights Reserved.'; f += '
All quotes delayed by 20 minutes. Delayed quotes provided by ComStock.'; f += '
Historical prices and fundamental data provided by Hemscott, Inc.' f += '
Mutual fund data provided by Lipper. Mutual Fund NAVs are as of previous day\'s close.'; f += '
Earnings estimates provided by Zacks Investment Research.'; f += '
Upgrades and downgrades provided by Briefing.com.
'; } f += '
This material may not be published, broadcast, rewritten, or redistributed.'; var curdate = new Date(); var year = curdate.getFullYear(); f += '

Copyright '+ year +' FOX News Network, LLC. All rights reserved.
All market data delayed 20 minutes.'; f += '
'; 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 += '
  • '+ (i + 1) +'

    ' + item.title + '

    »

  • '; //'
  • ' + item.title + '
  • '; if ( i == 10 ) return false; }); jQuery('#link_list_most_read').html(mrContent); }