// EffectElement represents a DOM element to fade //-------------------------------------------------------------------------------------------------------------------------------- function EffectElement(_element, _startAlpha, _endAlpha, _timeInSeconds){ this.element = _element; this.startAlpha = _startAlpha; this.endAlpha = _endAlpha; this.timeInSeconds = _timeInSeconds; this.started = false; this.startTime = 0; this.alphaRange = _startAlpha - _endAlpha; } //Controller class to manage the alpha effects //-------------------------------------------------------------------------------------------------------------------------------- function AlphaEffect(){ this.BeginFade = BeginFadeMethod; } AlphaEffect.ProcessFade = ProcessFadeMethod; AlphaEffect.objectsToFade = new Array(); AlphaEffect.isProcessing = false; AlphaEffect.processingInterval = null; //Runs on an interval when there are elements to be processed, this method caluclates the current alpha value for //each element in the AlphaEffects controller //-------------------------------------------------------------------------------------------------------------------------------- function ProcessFadeMethod(vard){ //Track elements whose alpha transitions have finished for later removal elementsToRemove = new Array(); //Cycle through each element undergoing an alpha transition for(i=0;i currentEffectElement.timeInSeconds){ timePassed = currentEffectElement.timeInSeconds; elementsToRemove.push(i); } //Calculate the current alpha value alphaValue = Math.abs(currentEffectElement.alphaRange)*timePassed/currentEffectElement.timeInSeconds; if(currentEffectElement.alphaRange<0) alphaValue += currentEffectElement.startAlpha; else alphaValue = currentEffectElement.startAlpha - alphaValue; //Set the elements alpha value in a cross-browser way currentEffectElement.element.style.opacity = alphaValue; currentEffectElement.element.style.filter = 'alpha(opacity=' + alphaValue*100 + ')'; //Again check if this is the first processing cycle if(currentEffectElement.started == false){ currentEffectElement.started = true; //If this element is not being displayed, display it if(currentEffectElement.element.style.display=="none"){ currentEffectElement.element.style.display="block"; } } } //elementsToRemove tracks the indices of elements to be removed. As elements are removed, the indices will become incorrect due //to the decreasing array size. deleteOffset tracks the number of deletions to correct the indices deleteOffest = 0; //Cycle through all elements that are finished processing for(i=0;i0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var C={},A=arguments,B;for(B=0;B=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.3.1",build:"541"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B0){B=H[0];}try{G=L.fn.call(K,B,L.obj);}catch(F){this.lastError=F;}}else{try{G=L.fn.call(K,this.type,H,L.obj);}catch(F){this.lastError=F;}}if(false===G){if(!this.silent){}return false;}}}if(I){var J=[],C=this.subscribers;for(D=0,E=C.length;D=0){Q=I[R];}if(!M||!Q){return false;}if(this.useLegacyEvent(M,L)){var O=this.getLegacyIndex(M,L);var N=E[O];if(N){for(P=0,S=N.length;P0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var M,L,O,N;for(M=0,L=F.length;M0){for(var R=0,S=T.length;R0){O=I.length;while(O){N=O-1;M=I[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N);}O=O-1;}M=null;R.clearCache();}for(P=0,L=G.length;P");B=document.getElementById("_yui_eu_dr");}if(B){B.onreadystatechange=function(){if("complete"===this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};}else{}B=null;}else{if(D.webkit){D._drwatch=setInterval(function(){var F=document.readyState;if("loaded"==F||"complete"==F){clearInterval(D._drwatch);D._drwatch=null;D._ready();}},D.POLL_INTERVAL);}else{D._simpleAdd(document,"DOMContentLoaded",D._ready);}}D._simpleAdd(window,"load",D._load);D._simpleAdd(window,"unload",D._unload);D._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{}; var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C * Copyright (c) 2007, Yahoo! Inc. All rights reserved. * Code licensed under the BSD License: * http://developer.yahoo.net/yui/license.txt * * @requires yahoo, event * @namespace YAHOO.util * @title IFrame Message Routing Utility */ /** * The CrossFrame singleton allows iframes to safely communicate even * if they are on different domains. This utility requires a proxy HTML * file (proxy.html) * * @class CrossFrame */ YAHOO.util.CrossFrame = (function () { var r1 = /^(((top|parent|frames\[((['"][a-zA-Z\d-_]*['"])|\d+)\]))(\.|$))+/; var r2 = /top|parent|frames\[(?:(?:['"][a-zA-Z]*['"])|\d+)\]/; function parseQueryString(s) { var r, a, p; r = {}; a = s.split('&'); for (i = 0; i < a.length; i++) { p = a[i].split('='); if (p.length === 2 && p[0].length > 0) { r[p[0]] = unescape(p[1]); } } return r; } if (YAHOO.env.ua.opera) { // Opera does not allow reading any property (including parent, frames) // if the domain of the caller and the domain of the target window do // not match. We work around this by chaining calls, and using Opera's // postMessage function... document.addEventListener("message", function (evt) { var o = parseQueryString(evt.data); if (YAHOO.lang.hasOwnProperty(o, "target") && YAHOO.lang.hasOwnProperty(o, "message") && YAHOO.lang.hasOwnProperty(o, "domain") && YAHOO.lang.hasOwnProperty(o, "uri")) { if (o.target.length > 0) { // Send the message to the next document in the chain. YAHOO.util.CrossFrame.send(null, o.target, o.message, o.domain, o.uri); } else { // Let the application know a message has been received. YAHOO.util.CrossFrame.onMessageEvent.fire(o.message, o.domain, o.uri); } } }, false); } return { /** * Fired when a message is received. * * @event onMessageEvent */ onMessageEvent: new YAHOO.util.CustomEvent("onMessage"), /** * Sends a message to an iframe, using the specified proxy. * * @method send * @param {string} proxy Complete path to the proxy file. * @param {string} target Target iframe e.g: parent.frames["foo"] * @param {string} message The message to send. */ send: function (proxy, target, message) { var m, t, d, u, s, el; // Match things like parent.frames["aaa"].top.frames[0].frames['bbb'] if (!r1.test(target)) { throw new Error("Invalid target: " + target); } if (YAHOO.env.ua.opera) { // Opera is the only A-grade browser that does not allow // reading properties like parent.frames when this document and // its parent are on separate domains. The solution is to use // the parent as a "hub" to route messages to the appropriate // IFrame, and use the Opera's postMessage function... m = r2.exec(target); // safe to eval... t = eval(m[0]).document; // Remove one element from the target chain. target = target.substr(m[0].length + 1); // Compose the message... d = arguments.length > 3 ? arguments[3] : document.domain; u = arguments.length > 4 ? arguments[4] : location.href; s = "target=" + escape(target) + "&message=" + escape(message) + "&domain=" + escape(d) + "&uri=" + escape(u); // ...and send it! t.postMessage(s); } else { // Create a new hidden iframe. el = document.createElement("iframe"); el.style.position = "absolute"; el.style.visibility = "hidden"; el.style.top = el.style.left = "0"; el.style.width = el.style.height = "0"; document.body.appendChild(el); // Listen for the onload event. YAHOO.util.Event.addListener(el, "load", function () { // First, remove the event listener or the iframe // we intend to discard will not be freed... YAHOO.util.Event.removeListener(this, "load", arguments.callee); // Discard the iframe... setTimeout(function () { document.body.removeChild(el); }, 1000); }); // Compose the message... s = "target=" + escape(target) + "&message=" + escape(message) + "&domain=" + escape(document.domain) + "&uri=" + escape(location.href); // Set its src first... el.src = proxy + "#" + s; // ...and then append it to the body of the document. document.body.appendChild(el); return "x"; } } }; })();// JavaScript Document MoveEffect_selfref=new Array(); function RemoteEffects(){ //this.axis; this.x_distance; this.y_distance; this.total_distance; this.time; this.interval; this.MoveEffect = MoveEffectFunc; this.MoveEffectI = MoveEffectInterval; this.Cancel=CancelFunc; this.timePassed=0; this.inter=10; this.vinit=3; this.vfinal=0; this.acc=0; this.x_startpos=0; this.x_sign=1; this.y_sign=1; this.angle=0; this.lastTimestamp; function MoveEffectInterval(cpos){ sr = MoveEffect_selfref[cpos]; td = new Date(); var ctime = td.getTime(); sr.timePassed+=(ctime-sr.lastTimestamp); sr.lastTimestamp = ctime; finished=false; displacement = (sr.vinit * (sr.timePassed/1000))+(.5*(sr.acc)*((sr.timePassed/1000) * (sr.timePassed/1000))) x_displacement = Math.cos(sr.angle) * displacement; y_displacement = Math.sin(sr.angle) * displacement; cvel = Number(sr.vinit)+(Number(sr.acc)*Number(Number(sr.timePassed)/1000)) xval=Number(sr.x_startpos)+(Number(x_displacement)*sr.x_sign); yval=Number(sr.y_startpos)+(Number(y_displacement)*sr.y_sign); if(Math.abs(Number(displacement))>=Math.abs(Number(sr.total_distance)) || cvel<=0){ xval=Number(sr.x_startpos)+(Number(sr.x_distance)*sr.x_sign); yval=Number(sr.y_startpos)+(Number(sr.y_distance)*sr.y_sign); finished=true; } sr.domObj.style.left=Math.round(xval)+'px'; sr.domObj.style.top =Math.round(yval)+'px'; if(finished==true){ window.clearInterval(sr.interval); if(typeof(sr.finish) == "function") sr.finish(); } } function CancelFunc(){ window.clearInterval(sr.interval); } function MoveEffectFunc( x_distance, y_distance, time, domObj, finishFunc){ if(x_distance<0) this.x_sign=-1; else this.x_sign=1; if(y_distance<0) this.y_sign=-1; else this.y_sign=1; this.angle = (Math.atan(Math.abs(y_distance/x_distance))); x_distance=Math.abs(x_distance); y_distance=Math.abs(y_distance); this.x_distance = x_distance; this.y_distance = y_distance; this.total_distance = Math.sqrt((x_distance*x_distance)+(y_distance*y_distance)); this.d = new Date(); this.lastTimestamp = this.d.getTime(); this.time = time; this.domObj = document.getElementById(domObj); this.finish = finishFunc; this.timePassed=0; if(this.domObj.style.left) this.x_startpos = MoveEffectRemovePX(this.domObj.style.left); else this.x_startpos=0; if(this.domObj.style.top) this.y_startpos = MoveEffectRemovePX(this.domObj.style.top);else this.y_startpos=0; cpos = MoveEffect_selfref.length; MoveEffect_selfref[cpos]=this; this.vinit = ((this.total_distance*2)/this.time); this.acc = (this.vfinal - this.vinit)/this.time; this.interval = window.setInterval("MoveEffect_selfref["+cpos+"].MoveEffectI("+cpos+")", this.inter); } function MoveEffectRemovePX(strName){ return strName.substring(0, strName.length-2); } } var alphaController = new AlphaEffect(); //Object to create fade effect var smart_tags; //Collection of all smart tags var smartsite_is_IE6=false; var smartsite_pollInterval; var smartsite_checkvar; var smartsite_curr_load=-1; var registered_scripts = new Array(); var autoplay=""; var autoplay_popup=""; var evid=""; var smart_oid = "y3xA2yB22"; var waitingForImageCounter=0; var l_image = new Array(); //Array of icon images for each SmartObject tool var smart_v_included=false; smart_effectobj = new RemoteEffects(); var finished_adding_images=false; //Structure representing an x and y position, as well as a sliding direction, for smartobject icons //-------------------------------------------------------------------------------------------------- function smart_custom_pos(x,y,dir) { this.x=x; this.y=y; this.dir=dir; } //Read variables from the page's query string //-------------------------------------------------------------------------------------------------- if((start_index=window.location.href.indexOf("?"))!=-1){ if((endpos = window.location.href.indexOf("#"))==-1) endpos = window.location.href.length; qstring = (window.location.href.substr(start_index+1, (window.location.href.length-start_index-(window.location.href.length-endpos))-1)).split("&"); for(i=0;i0){ //Assign the smartobject tag's attributes to the attribs array //-------------------------------------------------------------------------------------------------- scan_attribs= smart_tags[0].attributes; attribs=new Array(); for(j=0;j5000) break; //Just in case of unforseen error causing infinite loop } finished_adding_images = true; //If obsolete, Zyte-style tools have been embedded in the page, add the z_proc script to create the actual tool content if(include_zproc==true) addScript("http://www.elocallink.tv/zyte/zproc"+m+".php?x="+ic+qs, 0); } //smartsite_createDiv creates an empty div //-------------------------------------------------------------------------------- function smartsite_createDiv(id){ divNode = document.createElement("DIV"); divNode.style.padding="0px"; divNode.style.display="block"; divNode.style.margin="0px"; divNode.style.borderWidth="0px"; divNode.style.position="relative"; divNode.id=id; return divNode; } function load_ctt(target_div, image, text, w, h, pos){ if(image!=null){ writeImage(image, target_div, w, h, 'cursor:pointer;', 'onclick="window.open(\'http://www.smartsite.tv/full_modules/click_to_text/remote_ctt.php?pid=y3xA2yB22\',\'click_to_text_window\',\'width=400,height=300,toolbar=no,location=no,status=no,menubar=no\'); return false;"', 'ctc'+pos); } else{ target_div.innerHTML=""+text+" "; } } smartlibrary_opening=false; smartlibrary_database_response=new Array(); smartlibrary_opening=false; smartlibrary_closing=false; smartlibrary_opened=false; smartlibrary_swapping=false; smartlibrary_now_opened=-1; smartlibrary_originalZ=0; smartlibrary_initialX=new Array(); smartlibrary_initialY=new Array(); smartlibrary_muted=false; smartlibrary_phoneSelected=false; smartlibrary_waitForInput=null; smartlibrary_lcodes = new Array(); smartlibrary_activation_begun=new Array(); smartlibrary_custom_pos=new Array(); smartlibrary_autocenter_vars=new Array(); smartlibrary_numFaces_original=new Array(); smartlibrary_allowed_advances=new Array(); smartlibrary_current_advances=new Array(); smartlibrary_continueScrolling=true; smartlibrary_specialCase=new Array(); smartlibrary_testimonialsContent=new Array(); smartlibrary_currentPos=-1; smartlibrary_currentscroll=1; var smartlibrary_scrollInterval=null; smartlibrary_nowPlaying=-1; smartlibrary_showClickTransitioning=false; smartlibrary_showClickOpen=false; smartlibrary_mtoplay=new Array();; smartlibrary_opening_effectobj = new RemoteEffects(); smartlibrary_closing_effectobj = new RemoteEffects(); smartlibrary_click_effectobj = new RemoteEffects(); smartlibrary_scroll_num_min=9; smartlibrary_pos_values=new Array(); smartlibrary_cookie_based_open_allowed=new Array(); smartlibrary_trackingClientIDs = new Array(); smartlibrary_CCEmail = new Array(); smartlibrary_NetReceipts = new Array(); function custom_pos(x,y,dir) { this.x=x; this.y=y; this.dir=dir; } function load_smartlibrary(target_div, image, image2, image3, w, h, lcode, open_x, open_y, open_direction, autoc, pos, autoopen, netReceiptID){ smartlibrary_NetReceipts[pos] = netReceiptID; smartlibrary_pos_values.push(pos); if(autoopen=="true") smartlibrary_cookie_based_open_allowed.push(true); else smartlibrary_cookie_based_open_allowed.push(false); //******************************************************************************************************************************************************************* //Create divs for buttons //******************************************************************************************************************************************************************* target_div.style.width=w+"px"; target_div.style.height=h+"px"; divNode = document.createElement("DIV"); divNode.style.position="absolute"; divNode.id="smartlibrary_icon_standard"+pos; divNode.style.width=w+"px"; divNode.style.height=h+"px"; target_div.appendChild(divNode); divNode = document.createElement("DIV"); divNode.style.position="absolute"; divNode.id="smartlibrary_icon_over"+pos; divNode.style.width=w+"px"; divNode.style.height=h+"px"; divNode.style.display="none"; target_div.appendChild(divNode); divNode = document.createElement("DIV"); divNode.style.position="absolute"; divNode.id="smartlibrary_icon_close"+pos; divNode.style.width=w+"px"; divNode.style.height=h+"px"; divNode.style.display="none"; target_div.appendChild(divNode); smartlibrary_lcodes[pos]=lcode; smartlibrary_activation_begun[pos]=false; smartlibrary_mtoplay[pos]=0; smartlibrary_originalZ=document.getElementById('smartsite_smartlibrary'+pos).style.zIndex; if(open_x!=null && open_y!=null && open_direction!=null){ smartlibrary_custom_pos[pos]=new custom_pos(open_x,open_y,open_direction); } else smartlibrary_custom_pos[pos]=null; if(autoc!=null) smartlibrary_autocenter_vars[pos]=autoc; else smartlibrary_autocenter_vars[pos]=null; //******************************************************************************************************************************************************************* //Write button images //******************************************************************************************************************************************************************* writeImage(image, document.getElementById("smartlibrary_icon_standard"+pos), w, h, 'cursor:pointer;', 'onMouseOver="smartlibrary_showRollover('+pos+')"', 'smartlibrary_image'+pos); writeImage(image2, document.getElementById("smartlibrary_icon_over"+pos), w, h, 'cursor:pointer;', "onMouseOut='smartlibrary_hideRollover("+pos+")' onclick='Activatesmartlibrary("+pos+")'", 'smartlibrary_image_over'+pos); writeImage(image3, document.getElementById("smartlibrary_icon_close"+pos), w, h, 'cursor:pointer;', 'onclick="smartlibrary_closeAvatarDiv('+pos+')"', 'smartlibrary_image_close'+pos); } function smartlibrary_checkAutoCenter(num){ if(smartlibrary_database_response[num].autocenter==true){ var smartlibrary_screenWidth=800; var smartlibrary_screenHeight=600; if(window.innerWidth){ smartlibrary_screenWidth=window.innerWidth; smartlibrary_screenHeight=window.innerHeight; if(document.body.scrollTop) scrolldist=document.body.scrollTop; else scrolldist=document.documentElement.scrollTop; }else{ smartlibrary_screenWidth=document.documentElement.clientWidth; smartlibrary_screenHeight=document.documentElement.clientHeight; scrolldist=document.documentElement.scrollTop; if(smartlibrary_screenWidth==0){ smartlibrary_screenWidth=document.body.clientWidth; smartlibrary_screenHeight=document.body.clientHeight; scrolldist=document.body.scrollTop; } } smartlibrary_leftDistance=document.getElementById('smartsite_smartlibrary'+num).offsetLeft; smartlibrary_topDistance=document.getElementById('smartsite_smartlibrary'+num).offsetTop; if(document.getElementById("smartlibrarydebug"))document.getElementById("smartlibrarydebug").innerHTML+="!!"+smartlibrary_topDistance+"!"; cNode=document.getElementById('smartsite_smartlibrary'+num).offsetParent; while(cNode!=null && cNode.offsetLeft!=null && cNode.offsetTop!=null){ if(document.getElementById("smartlibrarydebug")) document.getElementById("smartlibrarydebug").innerHTML+=" "+cNode.tagName; if(cNode.tagName!=="TD" && cNode.tagName!="TABLE"){ smartlibrary_leftDistance+=cNode.offsetLeft; smartlibrary_topDistance+=cNode.offsetTop; if(document.getElementById("smartlibrarydebug"))document.getElementById("smartlibrarydebug").innerHTML+="*"+cNode.offsetTop+"*"+cNode.tagName+"*"+cNode.id; } cNode=cNode.offsetParent; } smartlibrary_cpointx=smartlibrary_screenWidth/2; smartlibrary_cpointy=smartlibrary_screenHeight/2; smartlibrary_database_response[num].left=smartlibrary_cpointx-smartlibrary_leftDistance-280; smartlibrary_database_response[num].top=smartlibrary_cpointy-smartlibrary_topDistance+134+scrolldist; if(smartlibrary_database_response[num].left>-120) smartlibrary_database_response[num].direction='right'; else smartlibrary_database_response[num].direction='left'; } } function smartlibrary_refreshDependentPositions(num){ if(document.getElementById("smartlibrary_desctext"+num)){ document.getElementById("smartlibrary_desctext"+num).style.left=(Number(smartlibrary_database_response[num].left)+23)+"px"; document.getElementById("smartlibrary_desctext"+num).style.top=(Number(smartlibrary_database_response[num].top)+16)+"px"; } if(document.getElementById("smartlibrary_pauseplay"+num)){ document.getElementById("smartlibrary_pauseplay"+num).style.left=(Number(smartlibrary_database_response[num].left)+480)+"px"; document.getElementById("smartlibrary_pauseplay"+num).style.top=(Number(smartlibrary_database_response[num].top)+11)+"px"; } if(document.getElementById("smartlibrary_soundmute"+num)){ document.getElementById("smartlibrary_soundmute"+num).style.left=(Number(smartlibrary_database_response[num].left)+510)+"px"; document.getElementById("smartlibrary_soundmute"+num).style.top=(Number(smartlibrary_database_response[num].top)+11)+"px"; } if(document.getElementById("smartlibrary_calldiv"+num)){ document.getElementById("smartlibrary_calldiv"+num).style.left=(Number(smartlibrary_database_response[num].left)+80)+"px"; document.getElementById("smartlibrary_calldiv"+num).style.top=(Number(smartlibrary_database_response[num].top)-378)+"px"; } } //******************************************************************************************************************************************************************* //Show button rollover //******************************************************************************************************************************************************************* function smartlibrary_showRollover(pos){ document.getElementById('smartlibrary_icon_standard'+pos).style.display="none"; document.getElementById('smartlibrary_icon_over'+pos).style.display="block"; document.getElementById('smartlibrary_icon_close'+pos).style.display="none"; } //******************************************************************************************************************************************************************* //Hide button rollover //******************************************************************************************************************************************************************* function smartlibrary_hideRollover(pos){ if(!smartlibrary_opening){ document.getElementById('smartlibrary_icon_standard'+pos).style.display="block"; document.getElementById('smartlibrary_icon_over'+pos).style.display="none"; document.getElementById('smartlibrary_icon_close'+pos).style.display="none"; } } function Activatesmartlibrary(pos){ if(document.getElementById('smartsite_smartlibrary'+pos)==null) return; if(smartlibrary_activation_begun[pos]==false){ smartlibrary_activation_begun[pos]=true; addScript("http://www.smartsite.tv/full_modules/smartsite_responder.php?action_request=load_smartlibrary&pos="+pos+"&lcode="+smartlibrary_lcodes[pos]+"&pid=y3xA2yB22", 1); } else if(smartlibrary_database_response[pos]!=null) open_smartlibrary(pos); } function load_smartlibrary_func(r, pos){ smartlibrary_trackingClientIDs[pos] = r.enc_tcid; smartlibrary_CCEmail[pos] = r.remote_cc_email; smartlibrary_database_response[pos]= r; if(smartlibrary_custom_pos[pos]!=null){ r.left=smartlibrary_custom_pos[pos].x; r.top=smartlibrary_custom_pos[pos].y; r.direction=smartlibrary_custom_pos[pos].dir; } if(smartlibrary_autocenter_vars[pos]!=null){ if(smartlibrary_autocenter_vars[pos]=="false") smartlibrary_autocenter_vars[pos]=0; else if(smartlibrary_autocenter_vars[pos]=="true") smartlibrary_autocenter_vars[pos]=1; r.autocenter=smartlibrary_autocenter_vars[pos]; } smartlibrary_numFaces_original[pos]=r.videos.length; smartlibrary_allowed_advances[pos]=-1; smartlibrary_current_advances[pos]=0; smartlibrary_specialCase[pos]=-1; /* if(r.videos.length==2){ smartlibrary_specialCase[pos]=2; smartlibrary_allowed_advances[pos]=1; r.videos[2]=r.videos[0]; r.videos[3]=r.videos[1]; } else if(r.videos.length==3){ smartlibrary_specialCase[pos]=3; smartlibrary_allowed_advances[pos]=2; r.videos[3]=r.videos[0]; r.videos[4]=r.videos[1]; r.videos[5]=r.videos[2]; } */ smartlibrary_testimonialsContent[pos] ="
"; for(i=0;i"+smartlibrary_database_response[pos].videos[i].moviename+"
"; } smartlibrary_testimonialsContent[pos] += "
"; if(r.videos.length>=smartlibrary_scroll_num_min){ for(i=0;i"+smartlibrary_database_response[pos].videos[i].moviename+"
"; } } smartlibrary_testimonialsContent[pos] += ""; document.getElementById('smartsite_smartlibrary'+pos).innerHTML+=""; document.getElementById('smartsite_smartlibrary'+pos).innerHTML+=""; //Write divs and images to document document.getElementById('smartsite_smartlibrary'+pos).innerHTML+=""; document.getElementById('smartsite_smartlibrary'+pos).innerHTML+=''; document.getElementById('smartlibrary_avatar'+pos).innerHTML+='
'; document.getElementById('smartlibrary_avatar'+pos).innerHTML+=''; document.getElementById('smartlibrary_avatar'+pos).innerHTML+=''; document.getElementById('smartlibrary_avatar'+pos).innerHTML+="
"+smartlibrary_testimonialsContent[pos]+"
Would you like to share this with a friend?
Recipient Address (e.g. jane@site.com)

Sender Address (e.g. jane@site.com)

Send via e-mail Send via SmartPhone
CC email to this video's owner
Request net receipt

"; document.getElementById('smartlibrary_avatar'+pos).innerHTML+=" "; document.getElementById('smartlibrary_avatar'+pos).innerHTML+=""; writeImage("http://www.elocallink.tv/zyte/zyte_images/talklowerbar.png",document.getElementById("smartlibrary_lowerbarcontainer"+pos), 559, 47, '','', "smartlibrary_lowerbar"+pos); //writeImage("http://www.elocallink.tv/zyte/zyte_images/nowplaying.png", document.getElementById("smartlibrary_nowplayingdiv"+pos), 140, 23, '','', "nowplayingimage"+pos); writeImage("http://www.elocallink.tv/zyte/zyte_images/callpanel.png", document.getElementById("smartlibrary_calldivback"+pos), 412,57, '','', "calldivbackimage"+pos); writeImage("http://www.elocallink.tv/zyte/zyte_images/talkupper_smart.png", document.getElementById("smartlibrary_image_placholder"+pos), 559,338, "","",""); if(smartlibrary_NetReceipts[pos]!=""){ document.getElementById("smartlibrary_postframe"+pos).src="http://www.smartsite.tv/client_sites/shared/remote_netrec_check.php?evid="+smartlibrary_NetReceipts[pos]; } open_smartlibrary(pos); } function smartlibrary_sendTheForm(num){ if(document.getElementById("smartlibrary_sendaddress"+num).value=="") alert("Please enter an e-mail address."); else{ sendCC = "false"; if(document.getElementById("smartlibrary_sendCC"+num).checked == true) sendCC = "true"; else sendCC = "false"; senderEmail = document.getElementById("smartlibrary_fromaddress"+num).value; recipientEmail = document.getElementById("smartlibrary_sendaddress"+num).value; if(document.getElementById("smartlibrary_sendTypeGroupEmail"+num).checked == true) sendType = "email"; else if(document.getElementById("smartlibrary_sendTypeGroupSmartphone"+num).checked == true) sendType = "smartphone"; if(document.getElementById("smartlibrary_sendNetReceipt"+num).checked == true) requestNetReceipt = "1"; else requestNetReceipt = "0"; var emailRE = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if(!recipientEmail.match(emailRE) || !senderEmail.match(emailRE)){ alert("Please enter sender and receipient e-mail addresses in the format recipient@domain.com"); return; } var carrier = document.getElementById("smartlibrary_carrier"+num).value; var pageURL = smartlibrary_getPageURL(); var queryString = escape(smartlibrary_getQueryString()); document.getElementById('smartlibrary_postframe'+num).src = 'http://www.smartsite.tv/scripts/share_video_with_mid_v2.php?to='+recipientEmail+'&from='+senderEmail+'&sendtype='+sendType+'&netrec='+requestNetReceipt+'&cc_biz='+sendCC+'&addt_qstring='+queryString+'&enctcid='+smartlibrary_trackingClientIDs[num]+'&encpid=y3xA2yB22&typeofplayer=smartLibraryPopUp&carrier='+carrier+'&cc_email='+smartlibrary_CCEmail[num]+'&page_url='+pageURL+'&unique_id='+num+'¤tPlaying='+smartlibrary_nowPlaying; document.getElementById('smartlibrary_postframe2'+num).src="http://www.smartsite.tv/tracking/universal_tracking.php?pid=y3xA2yB22&insert_type=sharewebvideo&etx="+smartlibrary_database_response[num].videos[smartlibrary_nowPlaying].enc_moviename+"&cc="+sendCC+"&from_email="+senderEmail+"&to_email="+recipientEmail; document.getElementById("smartlibrary_fromaddress"+num).value=""; document.getElementById("smartlibrary_sendaddress"+num).value=""; document.getElementById('smartlibrary_response'+num).innerHTML='Message Sent'; setTimeout(function(){smartlibrary_closeAvatarDiv(num); document.getElementById('smartlibrary_response'+num).innerHTML='';}, 2000); } } function open_smartlibrary(num){ smartlibrary_checkAutoCenter(num); smartlibrary_refreshDependentPositions(num); if(smartlibrary_opening==true || smartlibrary_closing==true) return; if(smartsite_requestPermission()==false) return; smartlibrary_nowPlaying=0; /* for(p=0;p "; document.getElementById('smartlibrary_icon_standard'+num).style.display="none"; document.getElementById('smartlibrary_icon_over'+num).style.display="none"; document.getElementById('smartlibrary_icon_close'+num).style.display="block"; newVal=document.getElementById('smartsite_smartlibrary'+num).style.top; pos=newVal.indexOf("p"); newVal=String(newVal).substr(0,pos); newVal4=document.getElementById("smartsite_smartlibrary"+num).style.height; pos4=newVal4.indexOf("p"); newVal4=Number(String(newVal4).substr(0,pos4))/2; newVal=newVal4-23; if(smartlibrary_database_response[num].direction=="left"){ document.getElementById('smartlibrary_lowerbarcontainer'+num).style.top=String(Number(newVal))+'px'; document.getElementById('smartlibrary_lowerbarcontainer'+num).style.left='-559px'; document.getElementById('smartlibrary_lowerbar'+num).style.left="559px"; smartlibrary_opening_effectobj.MoveEffect(-559,0, 1, "smartlibrary_lowerbar"+num, function(){smartlibrary_moveBarDown(num);}); // new Effect.Move ("smartlibrary_lowerbar"+num,{ x: -559, y: 0, mode: 'relative', afterFinish:function(){smartlibrary_moveBarDown(num);}}); } else{ newVal3=document.getElementById("smartsite_smartlibrary"+num).style.width; pos3=newVal3.indexOf("p"); newVal3=Number(String(newVal3).substr(0,pos3)); document.getElementById('smartlibrary_lowerbarcontainer'+num).style.top=String(Number(newVal))+'px'; document.getElementById('smartlibrary_lowerbarcontainer'+num).style.left=String(Number(newVal3))+'px'; document.getElementById('smartlibrary_lowerbar'+num).style.left="-559px"; smartlibrary_opening_effectobj.MoveEffect(559,0, 1, "smartlibrary_lowerbar"+num, function(){smartlibrary_moveBarDown(num);}); // new Effect.Move ("smartlibrary_lowerbar"+num,{ x: 559, y: 0, mode: 'relative', afterFinish:function(){smartlibrary_moveBarDown(num);}}); } smartlibrary_opening=true;smart_z_lock(); document.getElementById('smartlibrary_avatar'+num).style.display="block"; } function smartlibrary_moveBarDown(num){ smartlibrary_initialX[num]=document.getElementById('smartlibrary_lowerbarcontainer'+num).style.left; pos=smartlibrary_initialX[num].indexOf("p"); smartlibrary_initialX[num]=String(smartlibrary_initialX[num]).substr(0,pos); smartlibrary_initialY[num]=document.getElementById('smartlibrary_lowerbarcontainer'+num).style.top; pos=smartlibrary_initialY[num].indexOf("p"); smartlibrary_initialY[num]=String(smartlibrary_initialY[num]).substr(0,pos); smartlibrary_opening_effectobj.MoveEffect(smartlibrary_database_response[num].left-smartlibrary_initialX[num], smartlibrary_database_response[num].top-smartlibrary_initialY[num], 1, "smartlibrary_lowerbarcontainer"+num, function(){smartlibrary_showLoweredBar(num);}); //new Effect.Move ("smartlibrary_lowerbarcontainer"+num,{ x: smartlibrary_database_response[num].left, y: smartlibrary_database_response[num].top, mode: 'absolute', afterFinish:function(){smartlibrary_showLoweredBar(num);}}); } function smartlibrary_showLoweredBar(num){ document.getElementById('smartlibrary_controls'+num).style.display="block"; newVal=document.getElementById('smartlibrary_lowerbarcontainer'+num).style.left; pos=newVal.indexOf("p"); newVal=String(newVal).substr(0,pos); newVal2=document.getElementById('smartlibrary_lowerbarcontainer'+num).style.top; pos2=newVal2.indexOf("p"); newVal2=String(newVal2).substr(0,pos2); document.getElementById('smartlibrary_flashavatar'+num).style.left=String(Number(newVal)+9)+'px' document.getElementById('smartlibrary_flashavatar'+num).style.top=String(Number(newVal2)-292)+'px' //Put panel div in correct position----------------------------------------------- document.getElementById('smartlibrary_textAreaContainer'+num).style.top=String(Number(newVal2)-330)+'px'; document.getElementById('smartlibrary_textAreaContainer'+num).style.left=String(Number(newVal))+'px'; // new Effect.Move ("smartlibrary_textArea"+num,{ x: 0, y: -400, mode: 'relative', afterFinish:function(){smartlibrary_fullyOpened(num);}}); smartlibrary_opening_effectobj.MoveEffect(0, -400, 1.5, "smartlibrary_textArea"+num, function(){smartlibrary_fullyOpened(num);}); } function smartlibrary_fullyOpened(num){ if(smartlibrary_database_response[num].videos.length>=smartlibrary_scroll_num_min) smartlibrary_scrollInterval=setInterval(smartlibrary_slowScroll, 100); smartlibrary_highlight(smartlibrary_mtoplay[num], num); document.getElementById('smartlibrary_flashavatar'+num).style.display="block"; document.getElementById('smartlibrary_flashavatar'+num).src="http://www.elocallink.tv/sandbox2/large_viewer.php?value="+smartlibrary_database_response[num].videos[smartlibrary_mtoplay[num]].mid; //document.getElementById('smartlibrary_flashavatar'+num).src="http://www.elocallink.tv/sandbox2/large_viewer_older.php?value="+smartlibrary_database_response[num].videos[smartlibrary_mtoplay[num]].mid; ctitle=smartlibrary_database_response[num].videos[smartlibrary_mtoplay[num]].short_moviename; document.getElementById('smartlibrary_desctext'+num).innerHTML=ctitle; document.getElementById('smartlibrary_desctext'+num).style.display="block"; document.getElementById("smartlibrary_postframe2"+num).src="http://www.smartsite.tv/tracking/universal_tracking.php?pid=y3xA2yB22&insert_type=webvideo&etx="+smartlibrary_database_response[num].videos[smartlibrary_mtoplay[num]].enc_moviename; overwriteImage("http://www.elocallink.tv/zyte/zyte_images/talklowerbarpartial.png",document.getElementById("smartlibrary_lowerbarcontainer"+num), 559,47, '','', "smartlibrary_lowerbar"+num); smartlibrary_opening=false; smart_z_unlock(); smartlibrary_opened=true; setSwapFunc(smartlibrary_closeAvatarDiv, num); } function smartlibrary_PauseScroll(){ smartlibrary_continueScrolling=false; } function smartlibrary_ResumeScroll(){ smartlibrary_continueScrolling=true; } function smartlibrary_slowScroll(){ if(smartlibrary_continueScrolling==false) return; intop = document.getElementById("smartlibrary_scroll_"+smartlibrary_currentscroll+"-"+smartlibrary_currentPos); ttop=smartlibrary_removePX(intop.style.marginTop); ttop-=1; intop.style.marginTop=ttop+'px'; if(Number(ttop)<((intop.offsetHeight)*-1)){ cnode = intop.cloneNode(true); intop.parentNode.removeChild(intop); cnode.style.marginTop="0px"; if(smartlibrary_currentscroll == 1) smartlibrary_currentscroll=2; else smartlibrary_currentscroll=1; document.getElementById("smartlibrary_faces"+smartlibrary_currentPos).appendChild(cnode); } } function smartlibrary_removePX(strName){ return strName.substring(0, strName.length-2); } function smartlibrary_closeAvatarDiv(num){ if(smartlibrary_closing==true || smartlibrary_opening==true) return; smartlibrary_closing=true; smart_z_lock(); smartlibrary_opened=false; clearSwapFunc(); document.getElementById('smartlibrary_calldiv'+num).style.display='none'; document.getElementById('smartlibrary_calldivback'+num).style.top="57px"; smartlibrary_showClickTransitioning=false; smartlibrary_showClickOpen=false; clearInterval(smartlibrary_scrollInterval); overwriteImage("http://www.elocallink.tv/zyte/zyte_images/talklowerbar.png", document.getElementById("smartlibrary_lowerbarcontainer"+num), 559,47, '','', "smartlibrary_lowerbar"+num); document.getElementById('smartlibrary_flashavatar'+num).style.display="none"; document.getElementById('smartlibrary_flashavatar'+num).src="about:blank"; document.getElementById('smartlibrary_icon_standard'+num).style.display="block"; document.getElementById('smartlibrary_icon_over'+num).style.display="none"; document.getElementById('smartlibrary_icon_close'+num).style.display="none"; smartlibrary_closing_effectobj.MoveEffect(0, 400, 1.5, "smartlibrary_textArea"+num, function(){smartlibrary_closeBar(num);}); //new Effect.Move ("smartlibrary_textArea"+num,{ x: 0, y: 400, mode: 'relative', afterFinish:function(){smartlibrary_closeBar(num);}}); } function smartlibrary_closeBar(num){ document.getElementById('smartlibrary_sendtofrienddiv'+num).style.display="none"; document.getElementById('smartlibrary_desctext'+num).style.display="none"; document.getElementById('smartlibrary_controls'+num).style.display="none"; cx=document.getElementById('smartlibrary_lowerbarcontainer'+num).style.left; pos=cx.indexOf("p"); cx=String(cx).substr(0,pos); cy=document.getElementById('smartlibrary_lowerbarcontainer'+num).style.top; pos=cy.indexOf("p"); cy=String(cy).substr(0,pos); smartlibrary_closing_effectobj.MoveEffect(smartlibrary_initialX[num]-cx, smartlibrary_initialY[num]-cy, 1, "smartlibrary_lowerbarcontainer"+num, function(){smartlibrary_retractBar(num);}); //new Effect.Move ("smartlibrary_lowerbarcontainer"+num,{ x: smartlibrary_initialX[num], y: smartlibrary_initialY[num], mode: 'absolute', afterFinish:function(){smartlibrary_retractBar(num);}}); } function smartlibrary_retractBar(num){ if(smartlibrary_database_response[num].direction=="left"){ smartlibrary_closing_effectobj.MoveEffect(577, 0, 1, "smartlibrary_lowerbar"+num, function(){smartlibrary_hideAvatarDiv(num);}); //new Effect.Move ("smartlibrary_lowerbar"+num,{ x: 559, y: 0, mode: 'relative', afterFinish:function(){smartlibrary_hideAvatarDiv(num);}}); } else{ smartlibrary_closing_effectobj.MoveEffect(-577, 0, 1, "smartlibrary_lowerbar"+num, function(){smartlibrary_hideAvatarDiv(num);}); //new Effect.Move ("smartlibrary_lowerbar"+num,{ x: -559, y: 0, mode: 'relative', afterFinish:function(){smartlibrary_hideAvatarDiv(num);}}); } } function smartlibrary_muteMov(num){ var t=YAHOO.util.CrossFrame.send("http://www.elocallink.tv/zyte/proxy/proxy.html", "frames['smartlibrary_flashavatar"+num+"']","mute"); if(smartlibrary_muted==false){ document.getElementById('smartlibrary_soundmute'+num).innerHTML=" "; smartlibrary_muted=true; } else{ document.getElementById('smartlibrary_soundmute'+num).innerHTML=" "; smartlibrary_muted=false; } } function smartlibrary_hideAvatarDiv(num){ document.getElementById('smartlibrary_avatar'+num).style.display="none"; document.getElementById('smartlibrary_flashavatar'+num).src="about:blank"; document.getElementById('smartsite_smartlibrary'+num).style.zIndex=smartlibrary_originalZ; smartlibrary_closing=false; smart_z_unlock(); } function smartlibrary_pauseMov(num){ var t=YAHOO.util.CrossFrame.send("http://www.elocallink.tv/zyte/proxy/proxy.html","frames['smartlibrary_flashavatar"+num+"']", "pause"); document.getElementById('smartlibrary_pauseplay'+num).innerHTML=" "; } function smartlibrary_playMov(num){ var t=YAHOO.util.CrossFrame.send("http://www.elocallink.tv/zyte/proxy/proxy.html","frames['smartlibrary_flashavatar"+num+"']", "play"); document.getElementById('smartlibrary_pauseplay'+num).innerHTML=" "; } function smartlibrary_showClickCall(num){ if(smartlibrary_showClickTransitioning==true) return; if(smartlibrary_showClickOpen==true) {smartlibrary_retractClickCall(num); return;} smartlibrary_showClickTransitioning=true; document.getElementById('smartlibrary_calldiv'+num).style.display='block'; smartlibrary_click_effectobj.MoveEffect(0, -45, 1, "smartlibrary_calldivback"+num, function(){smartlibrary_showClickTransitioning=false;smartlibrary_showClickOpen=true;}); // new Effect.Move ("calldivback",{ x: 0, y: -45, mode: 'relative', afterFinish:function(){smartlibrary_showClickTransitioning=false;smartlibrary_showClickOpen=true;}}); document.getElementById('tocall'+num).value="Enter Your Phone Number"; } function smartlibrary_ccInitiate(num){ //If the panel is in the process of being closed, don't allow this action if(smartlibrary_showClickTransitioning==true) return; if(document.getElementById('tocall'+num).value=="" || document.getElementById('tocall'+num).value=="Enter Your Phone Number") { alert("Please enter your phone number."); } else { document.getElementById('smartlibrary_postframe'+num).src='http://www.elocallink.tv/zyte/call_it_s.php?number='+document.getElementById('tocall'+num).value+'&destcall='+smartlibrary_database_response[num].remote_click_to_call_phone+'&cc_notify='+smartlibrary_database_response[num].remote_cc_email; smartlibrary_retractClickCall(num); } } function smartlibrary_showFriendDivNoTimeout(num){ document.getElementById('smartlibrary_pauseplay'+num).innerHTML=" "; document.getElementById('smartlibrary_flashavatar'+num).style.display="none"; document.getElementById('smartlibrary_flashavatar'+num).src="about:blank"; document.getElementById('smartlibrary_sendtofrienddiv'+num).style.display="block"; } function smartlibrary_retractClickCall(num){ if(smartlibrary_showClickTransitioning==true) return; smartlibrary_showClickTransitioning=true; document.getElementById('smartlibrary_calldiv'+num).style.display='block'; smartlibrary_click_effectobj.MoveEffect(0, 45, 1, "smartlibrary_calldivback"+num, function(){smartlibrary_showClickTransitioning=false;smartlibrary_showClickOpen=false;document.getElementById('smartlibrary_calldiv'+num).style.display='none';}); } function smartlibrary_deleteText(num){ if(document.getElementById('tocall'+num).value=="Enter Your Phone Number") document.getElementById('tocall'+num).value=""; } function smartlibrary_getQueryString(){ page_url=location.href; query_string = ""; if (page_url.indexOf("?")!=-1){ var arr = window.location.href.split('?'); query_string = "&"+arr[1]; } else if (page_url.indexOf("#")!=-1){ var arr = window.location.href.split('#'); query_string = "#"+arr[1]; } var removesmartlibraryRE = /&*smartlibrary=\d+?,\d+?/g; query_string = query_string.replace(removesmartlibraryRE, ""); var removeSmartvideoRE = /&*smartvideo=\d*/g; query_string = query_string.replace(removeSmartvideoRE, ""); var removeEvidRE = /&*evid=\w*/g; query_string = query_string.replace(removeEvidRE, ""); return query_string; } function smartlibrary_getPageURL(){ page_url=location.href; if (page_url.indexOf("?")!=-1){ var arr = window.location.href.split('?'); page_url=arr[0]; } if (page_url.indexOf("#")!=-1){ var arr = window.location.href.split('#'); page_url=arr[0]; } return page_url; } function smartlibrary_highlight(newVal, num){ for(i=0;i "; document.getElementById('smartlibrary_desctext'+num).innerHTML=smartlibrary_database_response[num].videos[newVal].short_moviename; document.getElementById("smartlibrary_postframe2"+num).src="http://www.smartsite.tv/tracking/universal_tracking.php?pid=y3xA2yB22&insert_type=webvideo&etx="+smartlibrary_database_response[num].videos[newVal].enc_moviename; document.getElementById('smartlibrary_flashavatar'+num).style.display="block"; document.getElementById('smartlibrary_sendtofrienddiv'+num).style.display="none"; document.getElementById('smartlibrary_pauseplay'+num).innerHTML=" "; } String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); } //parseStyles sets styles expressed in a string to a div //-------------------------------------------------------------------------------- function parseStyles(el, styleString){ if(styleString==""){return;} strs=styleString.split(";"); for(c=0;c'; else div.innerHTML+=''; } //Dynamically add an image to the beginning of a div, using browser detection to correct for IE6's lack of support for PNGs //-------------------------------------------------------------------------------- function writeImageToBeginning(imageName, div, width, height, style_extras, extras, id){ if(smartsite_is_IE6 && imageName.indexOf(".png")!=-1) div.innerHTML=div.innerHTML+''; else div.innerHTML=div.innerHTML+''; } //Read a cookie //-------------------------------------------------------------------------------- function smartsite_readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } //Create a cookie //-------------------------------------------------------------------------------- function smartsite_createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function overwriteImage(imageName, div, width, height, style_extras, extras, id){ if(smartsite_is_IE6 && imageName.indexOf(".png")!=-1) div.innerHTML=''; else div.innerHTML=''; } //Add a script to the HEAD section of the page dynamically, causing it to run immediately //-------------------------------------------------------------------------------- function addScript(sc_scr, clr){ if(clr) clearOldScripts(); var oScript= document.createElement("script"); oScript.type = "text/javascript"; oScript.src = sc_scr; document.getElementsByTagName('HEAD').item(0).appendChild( oScript ); } //Each time certain SmartConnect tools are used, the smartsite_responder.php script (which outputs javascript) is added to the HEAD section of the page. //This function clears existing script tags referencing the responder scripts, which are no longer needed once they are run once //-------------------------------------------------------------------------------- function clearOldScripts(){ scrs=document.getElementsByTagName("script"); for(z=0;z