var Global_height = 0; var Global_width; var Global_timeout = 0; var Global_show_frame = false; var GO = false; var curr_url = window.location+""; var array_url = Split_into_Array(url); var loc_url = ""+window.location; var EMF_parameters = loc_url.substring(loc_url.indexOf('?')+1,loc_url.length) if (gup("vw_sort_order").length>0) window.vw_sort_order = gup("vw_sort_order"); if (gup("vw_arrange_order").length>0) window.vw_arrange_order = gup("vw_arrange_order"); if (gup("vw_search_terms").length>0) window.vw_search_terms= gup("vw_search_terms"); if(loc_url.indexOf('#')!=-1) { //This comment may fix the safari issue. window.location.href = loc_url.substring(0,loc_url.indexOf('#')); } else { var Video_item = false; if((array_url[array_url.length-1]=="galleryonly"||array_url[array_url.length-1]=="crosschannel"||!isNaN(array_url[array_url.length-1]))&&curr_url.indexOf("pageref")==-1) GO = true; var script_tag = document.createElement('script'); script_tag.src = get_calculate_height_URL(url,vw_widget_name); script_tag.language = "javascript"; script_tag.type = "text/javascript"; script_tag.id = "getHeight"; var adUrl; var parameters=""; try { adUrl = Split_into_Array(getDartEnterpriseUrl("PREROLL",1)); parameters = "ad_url="+escape(adUrl[adUrl.length-1]); }catch(e){} if(GO) script_tag.src = script_tag.src + "&go=true" document.getElementsByTagName('head').item(0).appendChild(script_tag); var genurl = url+ "?vw_widget_name="+vw_widget_name; /*var currval = 1; if(Get_Cookie(vw_widget_name)) currval = Get_Cookie(vw_widget_name); if(parseInt(currval)>=3) { genurl = genurl + "&show_playerads=true"; Delete_Cookie(vw_widget_name, '/', ''); currval = 1; } else*/ genurl = genurl + "&show_playerads=false"; genurl = genurl+"&style_path="+style_path+ "&widgetrequrl="+escape(window.location); if (window.vw_layout) { genurl = genurl + "&vw_layout="+vw_layout; } if (window.vw_show_by) { genurl = genurl + "&vw_show_by="+vw_show_by; } if (window.vw_show_stats) { genurl = genurl + "&vw_show_stats="+vw_show_stats; } if (window.vw_show_views) { genurl = genurl + "&vw_show_views="+vw_show_views; } if (window.vw_show_date_taken) { genurl = genurl + "&vw_show_date_taken="+vw_show_date_taken; } if (window.vw_show_date_upload) { genurl = genurl + "&vw_show_date_upload="+vw_show_date_upload; } if (window.vw_show_nav) { genurl = genurl + "&vw_show_nav="+vw_show_nav; } if (window.vw_show_sizes) { genurl = genurl + "&vw_show_sizes="+vw_show_sizes; } if (window.vw_show_slideshow) { genurl = genurl + "&vw_show_slideshow="+vw_show_slideshow; } if (window.vw_show_ads) { genurl = genurl + "&vw_show_ads="+vw_show_ads; } if (window.vw_show_ratings) { genurl = genurl + "&vw_show_ratings="+vw_show_ratings; } if (window.vw_show_voting) { genurl = genurl + "&vw_show_voting="+vw_show_voting; } if (window.vw_allow_voting) { genurl = genurl + "&vw_allow_voting="+vw_allow_voting; } if (window.vw_show_story) { genurl = genurl + "&vw_show_story="+vw_show_story; } if (window.vw_show_emf) { genurl = genurl + "&vw_show_emf="+vw_show_emf; } if (window.vw_show_embedcode) { genurl = genurl + "&vw_show_embedcode="+vw_show_embedcode;} if (window.vw_no_items_text) { genurl = genurl + "&vw_no_items_text="+vw_no_items_text;} if (window.vw_ad_main_img_url) { genurl = genurl + "&vw_ad_main_img_url="+vw_ad_main_img_url; } if (window.vw_ad_logo_img_url) { genurl = genurl + "&vw_ad_logo_img_url="+vw_ad_logo_img_url; } if (window.vw_ad_link_url) { genurl = genurl + "&vw_ad_link_url="+vw_ad_link_url; } if (window.vw_search_terms){ genurl = genurl + "&vw_search_terms="+vw_search_terms;} if (window.vw_sort_order){ genurl = genurl + "&vw_sort_order="+vw_sort_order;} if (window.vw_show_pagination){ genurl = genurl + "&vw_show_pagination="+vw_show_pagination;} if (window.vw_show_maxItems){ genurl = genurl + "&vw_show_maxItems="+vw_show_maxItems;} if (window.vw_show_mode){ genurl = genurl + "&vw_show_mode="+vw_show_mode;} if (window.vw_arrange_order){ genurl = genurl + "&vw_arrange_order="+vw_arrange_order;} if (window.vw_external_user_name) { genurl=genurl+"&vw_external_user_name="+vw_external_user_name; } if (window.vw_from_email) { genurl = genurl + "&vw_from_email="+vw_from_email; } if (window.vw_external_id) { genurl = genurl + "&vw_external_id="+vw_external_id; }else { genurl = genurl + "&vw_external_id=0"; } genurl += genurl + "&emf_parameters="+escape(EMF_parameters); if (parameters!=""){genurl = genurl + "&" +parameters;} genurl = genurl + "&location=" + document.domain; document.write(""); var pickle_container = document.getElementById('picklecontainer'); var loading_unit = ""; document.write(loading_unit); setTimeout('showLoading()',500); if (navigator.userAgent.indexOf('Safari')>-1) setTimeout('showFrame()', 2500); } function showLoading() { if (!Global_show_frame) { document.getElementById('loading_layer').style.display = "block"; } if (Global_show_frame) //avoid race condition { document.getElementById('loading_layer').style.display = "none"; } } var count =0; var temp; var bool = false; var once = true; var attempts = 0; var lastReceived = 1; function smellLocationBar() { try{ var a = ""+window.location; backup = a.substring(0,a.indexOf('#')); var temp = Split_into_Array_WSep(a,"#"); if(lastReceived != temp[1] && temp[1].indexOf("reloadimagead")!=-1) { lastReceived = temp[1]; setDartEnterpriseBanner("", MavenAd("BIGBOX", "", 5)); } else if(lastReceived != temp[1] && temp[1].indexOf("reloadimagead")==-1) { lastReceived = temp[1]; var url = a.substring((a.indexOf('#')+1),a.lastIndexOf('-')); var format = a.substring((a.lastIndexOf('-')+1),a.length); //alert(url); setDartEnterpriseBanner(format,url); //window.location = backup+"#"; } }catch(e){} } function getSrc() { if(once) { var backup ; try { var a = ""+window.location; var type ; backup = a; if(a.indexOf('#')!=-1) { backup = a.substring(0,a.indexOf('#')); //window.location = backup+"#"; var splitted_url = Split_into_Array_WSep(a,"#"); if(trim(splitted_url[1]).length==0) { window.clearInterval(temp); window.setInterval('getSrc()', 5000); return; } //var url = a.substring((a.indexOf('#')+1),a.lastIndexOf('-')); //var format = a.substring((a.lastIndexOf('-')+1),a.length); setDartEnterpriseBanner("", MavenAd("BIGBOX", "", 5)); once = false; window.clearInterval(temp); window.setInterval('getSrc()', 5000); return; } else if(parseInt(count)<50) { window.clearInterval(temp); smellLocationBar(); temp = window.setInterval('smellLocationBar()', 1000); count++; } else { window.clearInterval(temp); return; Video_item = false; } }catch(e){window.clearInterval(temp);window.setInterval('smellLocationBar()', 5000);} } } var finished = false; function showFrame() { Global_show_frame = true; var location_url = ""+window.location; if (Global_timeout < 2 && Global_height == 0) { Global_timeout = Global_timeout + 1; setTimeout('showFrame()',1000); } else if (Global_timeout < 2) { document.getElementById('loading_layer').style.display = "none"; document.getElementById('picklecontainer').style.height = Global_height+"px"; if(location_url.indexOf("pageref=pplayer")!=-1) Global_width = 607; document.getElementById('picklecontainer').style.width = Global_width+"px"; } else { document.getElementById('loading_layer').style.display = "none"; document.getElementById('picklecontainer').style.height = 1000+"px"; document.getElementById('picklecontainer').style.width = 650+"px"; } //setDartEnterpriseBanner("", MavenAd("BIGBOX", "", 5)); smellLocationBar(); temp = window.setInterval('smellLocationBar()', 2000); } function setGlobal_height_width(height,width,isVideo) { Video_item = isVideo; if (array_url[array_url.length-1]=="crosschannel") { if(width<500) Global_width = 500; else Global_width = width; Global_height = height; } else if (array_url[array_url.length-1]=="galleryonly") { Global_height = height; if(width<500) Global_width = 500; else Global_width = width; } else { Global_height = height; if(width<550) Global_width = 535; else Global_width = width; } } function setGlobal_height_width_BR(height,width,isVideo) { //alert('Global_width: '+width); Video_item = isVideo; if (array_url[array_url.length-1]=="crosschannel") { if(width<260) Global_width = 260; else Global_width = width; Global_height = height; } else if (array_url[array_url.length-1]=="galleryonly") { Global_height = height; if(width<260) Global_width = 260; else Global_width = width; } else { Global_height = height; if(width<260) Global_width = 260; else Global_width = width; } //alert('Global_width: '+Global_width); } function get_calculate_height_URL(url,widget_reference) { var Parent_url = ""+window.location; var w = widget_reference; var return_url = url.substring(0,url.indexOf("pro"))+"calculateheight.do"; if(Parent_url.indexOf("pageref")==-1) { var a; var f; var arr_ele = Split_into_Array(url); for(i=0;i0) { document.getElementById('picklecontainer').style.height = tokens[0]+"px"; } else{ document.getElementById('picklecontainer').style.height = "510px"; }*/ } function showcontainer() { document.getElementById('picklecontainer').style.visibility = "visible"; } String.prototype.tokenize = tokenize; function tokenize() { var input = ""; var separator = " "; var trim = ""; var ignoreEmptyTokens = true; try { String(this.toLowerCase()); } catch(e) { return; } if(typeof(this) != "undefined") input = String(this); if(typeof(tokenize.arguments[0]) != "undefined") separator = String(tokenize.arguments[0]); if(typeof(tokenize.arguments[1]) != "undefined") trim = String(tokenize.arguments[1]); if(typeof(tokenize.arguments[2]) != "undefined") { if(!tokenize.arguments[2]) ignoreEmptyTokens = false; } var array = input.split(separator); if(trim) for(var i=0; i