/*this is the new vlaunch*/ /*var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")*/ function day() { if(the_day < 10) { the_day = "0"+the_day; } return the_day; } function cutoverDate(yr,m,d){ var the_date = new Date(); var todayy=the_date.getYear() if (todayy < 1000) todayy+=1900 var cutdatestring=month[the_month]+" "+day()+", "+the_year; var paststring=month[m-1]+" "+d+", "+yr var difference=(Math.round((Date.parse(cutdatestring)-Date.parse(paststring))/(24*60*60*1000))*1) return difference; } var isChoice = getCookieValue("UserChoice"); /*this functin returns one of three player types old, new, and help*/ function vlaunch(file){ /*var vfile = "clip=20011009/rather_cbs_01100918rumsfeld&title=Dan$@$Rather$@$Reports"; clip=/media/2003/03/26/video546111.rm&sec=500194&vidId=22222&title=Chad$@$reports clip=LiveWebCast&title=Chad$@$reports clip=/media/2003/03/26/video546111.rm */ var thisdate = ""; var one = ""; var dateinfo = ""; var clipinfo = ""; var params =""; var clip = ""; var title = ""; var castNum = ""; var date = ""; var end = ""; var isLive = false; var old_date = "20020225"; var cut_date = "20031120"; var currentdate = the_year+" "+eval(parseInt(the_month)+1)+" "+day(); /*returns the clip string*/ function returnclip() { clipinfo = file.split('clip='); if(clipinfo[1].indexOf('.smil')!=-1 && isChoice=='wmv'){theclip = clipinfo[1].replace(/.smil/ig, ".asx");} else{theclip = clipinfo[1];/*alert("this is the clip info: "+clip);*/} return theclip; } /*returns the date && (!clip.indexOf('.smil') || !clip.indexOf('.asx'))*/ clip = returnclip(); if(clip.indexOf('.')!=-1 ){ clipinfo = file.split('.'); one = clipinfo[0].split('='); dateinfo = one[1].split('/'); thisdate = dateinfo[2]+","+dateinfo[3]+","+dateinfo[4]; } /*end return date*/ date = dateinfo[2]+""+dateinfo[3]+""+dateinfo[4]; var videoDateDifference = cutoverDate(dateinfo[2],dateinfo[3],dateinfo[4]); var player = isReal; thisclip = returnclip(); isLive = thisclip.indexOf('Live')!=-1; /*alert(date);*/ /*alert("this is the new cut date: "+videoDate + " this is the old cut date: " + old_date);*/ var templ3="http://www.cbsnews.com/htdocs/videoplayer/newVid/framesource2.html?clip=LiveWebCast" + castNum; /*alert(videoDateDifference);*/ var playerVersion = playerResults(); /*alert(playerVersion);*/ if( !playerResults() && isReal == "no") { var nWin = templ5+"?clip="+thisclip; } /*alert(isReal);alert("videodate :"+date+ " cut_date:"+ cut_date);*/ else if((thisclip.indexOf('.asx')!=-1 && playerVersion) || (thisclip.indexOf('.smil')!=-1 && isReal=="yes")){var nWin = templ1+"?"+thisclip;} else if(isLive) { /*if(isChoice == "wmv"){var nWin = templ3;}else{if(playerVersion){var nWin = templ3;}else{alert("This file is a windows format:\nPlease download the latest copy of realplayer\nin order to view it.\nThanks");var nWin = templ2;}}*/ if(playerVersion){var nWin = templ3;}else{var nWin = templ2;} }/*else if(thisclip.indexOf('.smil')!=-1 && isReal){var nWin = templ1+"?"+thisclip;}else if(thisclip.indexOf('.asx')!=-1 && playerVersion){var nWin = templ1+"?clip="+thisclip;}*/ else if(videoDateDifference <= 30 && date >= cut_date) { if(isChoice){ if(isChoice == "wmv"){if(playerVersion){thisclip = thisclip.replace(/.rm/ig, ".wmv");var nWin = templ1+"?clip="+thisclip;}else{var nWin = templ6+"?clip="+thisclip;}} else if(isChoice == "rm" && isReal){var nWin = templ1+"?clip="+thisclip;}else{var nWin = templ7+"?clip="+thisclip;} }else{var nWin = templ4+"?clip="+thisclip;} } else if(date < old_date) { if(isReal){ var nWin = templ0+"?"+file;}else{var nWin = templ7+"?clip="+thisclip;} } else if((videoDateDifference > 30) && (date >= cut_date)) { thisclip = thisclip.replace(/.rm/ig, ".wmv"); if(playerVersion){var nWin = templ1+"?clip="+thisclip;}else{var nWin = templ6+"?clip="+thisclip;} } else if(date < cut_date && date >= old_date) { thisclip = returnclip().replace(/.wmv/ig, ".rm"); if(isReal){var nWin = templ1+"?clip="+thisclip;}else{var nWin = templ7+"?clip="+thisclip;} } /*alert(nWin);*/ if(ie5||ie6||ns6||ns7||aol||opera||linux||Mac) { //alert(Mac); //alert("this is:" + bname); //if(ns6 && nUser.toLowerCase().indexOf("gecko") != -1){alert("Your Browser is: "+ bname +"\n Your Version is: " + ver + "\n Code Name: "+ codename + "\n User Agent: "+ nUser);} nWindow = window.open(nWin, 'vvviewer', 'width=610,height=470,scrollbars=0,location=0,menubar=0,resizable=0');//); nWindow.focus(); } else { alert("We\'re sorry, the CBS video player requires a version 5 broswer\nClick ok to continue to our browser download page\n Hit cancel to return"); window.open('http://download.microsoft.com/download/a/b/b/abb44141-f5d9-4bca-b85c-9cdbee344f14/q828750.exe', '', ''); } }