/*RCS19*/ function findPos(obj) { var curleft = curtop = 0; if(obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while((obj = obj.offsetParent) && (obj.style.position != "relative") && (obj.id != "ohpage") && (obj.id != "ohbody")) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } function emailVideo(clipId, title) { var emailurl = defaultPlayerUrl; var reg = /player$/; if(reg.test(defaultPlayerUrl)) { emailurl = defaultPlayerUrl.replace(reg, "p/") + clipId; }else { emailurl += "?clip="+clipId; } emailurl = "http://"+ window.location.hostname+ emailurl; //alert("emailurl is "+emailurl); mp_email(emailurl, title); } function clipSelected(clipId, clipName, playlistName) { //alert("playing clip "+clipId+":"+clipName+" from playlist "+playlistName); window.frames['metrics'].location.href = "/video/mediaplayer/" + playlistName + "/" + clipId + "?mpname=" + clipName + "&mpisap=false" } function showHomeOverlayAd(clipId, adflash, adurl) { showHomeOverlay(clipId); /* if(adflash != 'undefined') { var adDiv = document.getElementById("mpadoverlay"); adDiv.style.backgroundColor = "transparent"; adDiv.style.position = "absolute"; adDiv.style.zIndex = "100"; adDiv.style.height = "70px"; adDiv.style.width = "400px"; var adPos = findPos(document.getElementById("mpHomeVidThumbDiv")); adDiv.style.top = (adPos[1] + 133) + "px"; adDiv.style.left = (adPos[0] + 56) + "px"; var adso = new SWFObject(adflash, 'mpoverlayad', '400', '70', '8'); adso.addParam("wmode", "transparent"); adso.addVariable("clickTag", adurl); adDiv.innerHTML = adso.getSWFHTML(); } */ } function showOverlayAdHP(adflash, adurl) { //alert("Hey there!, I'm going to show an ad!"); //alert("showOverlayAd called! - "+flashURL); var args = getArgs(); if(args["adSWF"] != 'undefined') { adflash = unescape(args["adSWF"]); adurl = unescape(args["adURL"]); // alert("using the ad in the query string!"); } if(adflash != 'undefined') { var adDiv = document.getElementById("mpadoverlay"); adDiv.style.backgroundColor = "transparent"; adDiv.style.position = "absolute"; adDiv.style.zIndex = "101"; adDiv.style.height = "70px"; adDiv.style.width = "268px"; var adPos = findPos(document.getElementById("mpHomeVidThumbDiv")); adDiv.style.top = (adPos[1] + 133) + "px"; adDiv.style.left = (adPos[0] + 6) + "px"; var adso = new SWFObject(adflash, 'mpoverlayad', '268', '70', '8'); adso.addParam("wmode", "transparent"); adso.addVariable("clickTag", adurl); adDiv.innerHTML = adso.getSWFHTML(); //var adFlash = new FlashTag(flashURL, 400, 70, false, true); //adFlash.setFlashvars("clickTag="+clickurl); //$('adcontent').innerHTML = "