function actionswap(a){a.action=a.selectbox.value;a.submit()}function pop_getEl(a){return document.getElementById(a)}var videowindow="";function OpenVideoWindow(a){if(!videowindow.closed&&videowindow.location)videowindow.location.href=a;else{videowindow=window.open(a,"videowindow","resizable=no,toolbar=no,width=820,height=530");if(!videowindow.opener)videowindow.opener=self}if(videowindow.focus)videowindow.focus();return false}var images=[],chooseImageClicked=false;function loadimage(d,e,c,f,b){var a={};a.setAttribute("src",d);a.setAttribute("width",e);a.setAttribute("height",c);a.setAttribute("alt",f);a.setAttribute("copyright",b);return a}function loadimages(a){var c="breadcrumb",b=document.getElementById("largeimageloading");if(b){b.innerHTML="";b.style.display="none"}var d=document.getElementById("returnlink");d.href=a.pgreturnurl.value;d.innerHTML=a.returnlinkprefix.value+a.pgtitle.value+a.returnlinksuffix.value;window.document.title=a.pgtitle.value+" - "+window.document.title;if(document.getElementById(c).firstChild.firstChild.firstChild.childNodes.length>3){document.getElementById(c).firstChild.firstChild.firstChild.childNodes[1].firstChild.innerHTML=a.pgtitle.value;document.getElementById(c).firstChild.firstChild.firstChild.childNodes[1].firstChild.href=a.pgreturnurl.value}displayImage(a)}function displayImage(f){var i="largeimagecopyright",h="largeimageframe",d=parseInt(f.pgimageindex.value);if(isNaN(d))d=1;var j=f.pgimagearray.value,g=j.split(";"),a=g[d-1].split("|"),b=parseInt(a[2]),e=parseInt(a[3]);if(b>400){imageScaler=400/b;b=b*imageScaler;e=e*imageScaler}var c=document.getElementById("largeimage");c.setAttribute("src",a[1]);c.setAttribute("width",b);c.setAttribute("height",e);c.setAttribute("title",a[4]);c.setAttribute("alt",a[4]);document.getElementById(h).style.width=b;document.getElementById(i).style.width=b.toString()+"px";document.getElementById(h).style.textAlign="center";document.getElementById("largeimagetitle").innerHTML=a[4];document.getElementById("largeimagecount").innerHTML=d+"&#160;"+f.of_string.value+"&#160;"+g.length.toString();document.getElementById("largeimagebuttons").style.width=b+4;document.getElementById(i).innerHTML=a[5].length>0?"&copy;&#160;"+a[5]:""}function chooseImage(e,b){var d=b.pgimagearray.value,c=d.split(";");if(!chooseImageClicked){var a=parseInt(b.pgimageindex.value);if(!isNaN(a)){a+=e;if(a>c.length)a=1;else if(a<1)a=c.length;document.forms["pgform"].elements["pgimageindex"].value=a;chooseImageClicked=true;b.submit()}}}function image_onclick(b,a){document.pgform.PGimageindex.value=a;document.pgform.PGreturnurl.value=document.location.href}var msnV=null;function msnvDwd(d,a,c,f,g,b,e){msnvDw(d,a,c,f,g,b,e)}function msnvDw(i,g,a,d,e,b,c){if(a==""||a==undefined)a="us";if(!d)d="";if(!e)e="";if(!c)c="";var h=msnvVU(a),f="v.htm",j=document.URL;if(b!=null&&b!=undefined&&b.length>0)f=b+".htm";var k=window.open(h+"/v/"+a+"/"+f+"?f="+i+"&g="+g+"&p="+d+"&t="+e+"&rf="+j+"&fg="+c,"msnVDWd","width=788,height=710,status=1,scrollbars=1,resizable=1")}function msnvSdw(f,d,a,c,b){if(a==""||a==undefined)a="us";if(!c)c="";if(!b)b="";var e=msnvVU(a),g=document.URL,h=window.open(e+"/v/"+a+"/dw.htm?p="+f+"&g="+d+"&m="+a+"&pl="+c+"&rf="+g+"&fg="+b,"msnVDW","width=750,height=363,status=1")}function msnvJs(j,g,b,a,f,e){var c="','";if(a==""||a==undefined)a="us";if(!f)f="";if(!e)e="";var k=document.URL,h=msnvReq();if(h!=0){b.innerHTML="<iframe frameborder='0' scrolling='no' src='http://video.msn.com/v/"+a+"/req.aspx?r="+h+"&h="+location.href+"' width='750' height='363'>";return}if(!window["msnVinh"]){var d=document.createElement("<div id='msnVinh' class='msnVa'>");if(b!=null&&(typeof b=="object"&&b.tagName.toLowerCase()=="div"))b.appendChild(d);else document.body.appendChild(d);var i=document.createElement("<script language='javascript' src='http://video.msn.com/v/"+a+"/msnvinp.js' onreadystatechange=\"msnvJsR(this,'"+g+c+f+c+j+c+e+c+k+"');\">");d.appendChild(i)}else msnV.Play(g)}function msnvJsR(e,d,f,a,b,c){if(e.readyState=="loaded"){msnV=new msnvINP(msnVinh,"msnV",a);msnV.oF=a;msnV.oFG=b;msnV.oRF=c;msnV.Build();msnV.Play(d,f)}}function msnvReq(){var a=0,b=navigator.userAgent.toLowerCase();if(b.indexOf("mediacenter")>-1||b.indexOf("stb")>-1&&b.indexOf(" istb ")==-1){var f=document.referrer,d=location.search&&location.search.indexOf("?")>=0?"&":"?",e=location.search?location.search:"";pLoc="http://g.msn.com/0VD0/36/61";location.replace(pLoc+e+d+"rf="+f);return 16}if(b.indexOf("mac")>-1)a=32;else if(navigator.appName=="Netscape")a=8;else{a+=parseFloat(b.slice(b.indexOf("msie")+5))>5.9?0:1;var c=new msnvTC("var w=new ActiveXObject('WMPlayer.OCX');return w.versionInfo;","return 0;");a+=parseInt(c.tc())>=9?0:2;c=new msnvTC("var w=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');return 0;","return 4;");a+=c.tc()}return a}function msnvTC(b,a){this.tc=new Function("try{"+b+"}catch(e){"+a+"}")}function oMvsLink(a,g,b,h,j,i,c,k,l,f){b=b==1||b==true?0:Math.min(b*1+1,2);if(a.indexOf("/")<1)a+="/64";if(a!="40/98"&&a!="50/98"&&a!="51/98"){var e="";switch(a){case "39/83":e="en-au";break;case "43/119":e="es-us";break;case "37/81":e="en-ca";break;case "38/82":e="fr-ca"}msnvDw(a,g+(c?","+c:""),e,f?escape(f):"");return}var d="http://g.msn.com/0VD0/"+a+"?t="+b;if(arguments.length>1){d+=f?"&p="+escape(f):"";d+=h?"&m="+h+"&mi="+j:"";c=g+(c?","+c:"");d+=(!k?"&i=":"&r=")+c}if(b){var m=window.open(d,"ovp","width=788,height=598,status=1");if(i)location.href=i}else location.href=d}function msnvVU(b){var c="http://video.msn.com",a=c;if(b!=null&&b!=undefined&&b.length>0)switch(b.toLowerCase()){case "es-us":a="http://latino.video.msn.com";break;case "ja-jp":a="http://jp.video.msn.com";break;case "en-ca":a="http://video.sympatico.msn.com";break;case "fr-ca":a="http://video.fr.sympatico.msn.com";break;case "en-au":a="http://ninemsn.video.msn.com";break;case "en-gb":a="http://video.uk.msn.com";break;case "en-ap":a="http://video.ap.org";break;case "us":a=c;break;case "fr-fr":a="http://video.fr.msn.com";break;default:a=c}return a}function getQueryParam(c){var a=top.document.location.search,b=new RegExp("^.*?&?"+c+"=([^&]+)","i");if(b.test(a))return a.match(b)[1];return null}function displayImageFromCollection(e,a,c,d){var b=e[c];a.src=d+b.location;a.alt=b.alt;a.width=b.width;a.height=b.height;return c}function moveGalleryImage(a,c,b){a+=c;if(a==b.length)a=0;else if(a<0)a=b.length-1;return b[a].imageid}function navigateToGalleryUrl(e,c,f,d,b){var a=document.location.href;a=a.substring(0,a.indexOf("?")+1);a+=b+"="+moveGalleryImage(e,c,imageColl.image);a+=d;document.location.href=a}function locationRequired(a){if(trimAll(document.getElementById("P_Location").value).length==0){alert(a);return false}}function trimAll(a){while(a.substring(0,1)==" ")a=a.substring(1,a.length);while(a.substring(a.length-1,a.length)==" ")a=a.substring(0,a.length-1);return a}function clearText(a){if(a.value==a.defaultValue)a.value=""};