var IE=document.all?true:false;if(!IE){document.captureEvents(Event.MOUSEMOVE);}var tempX=0;var tempY=0;function getMouseXY(e){if(IE){tempX=event.clientX+document.body.scrollLeft;tempY=event.clientY+document.body.scrollTop;}else{tempX=e.pageX;tempY=e.pageY;}if(tempX<0){tempX=0;}if(tempY<0){tempY=0;}}document.onmousemove=getMouseXY;var CPANEL=1;function setVoteElement(id,message){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById(id).outerHTML="<p id='"+id+"' style='color:#999999;display:inline;font-size:12px;margin:0;padding:0 1px;width:auto;'>"+message+"</p>";}else{var parentNode=document.getElementById(id).parentNode;var currentNode=document.getElementById(id);var newNode=document.createElement("p");newNode.setAttribute("id",id);newNode.setAttribute("style","color:#999999;display:inline;font-size:12px;margin:0;padding:0 1px;width:auto;");parentNode.replaceChild(newNode,currentNode);document.getElementById(id).innerHTML=message;}}function updateVote(contentId,contentType,voteType,vTypeDiv,vNumDiv,uid,counter){var userid=uid;var uid=readCookie("userid");var coldDiv=contentId+"_cold_"+counter;var favDiv=contentId+"_fav_"+counter;if(!uid>0){show_new_popup();window.scrollTo(0,0);}else{if(voteType==1){document.getElementById(vTypeDiv).innerHTML='<img alt="You\'ve voted this Hot" title="You\'ve voted this Hot" src=\''+CONTEXT_IMAGEURL+"/vote_hot_btn_grey.gif'/>";setVoteElement(coldDiv,"You've voted this Hot");}ratingService.updateAndRefreshVotes(contentId,uid,contentType,voteType,{callback:function(data){updateVoteTypeHTML(contentId,userid,contentType,data.voteType,data.voteCount,vTypeDiv,vNumDiv,counter);},async:false});}return false;}function updateVoteTypeHTML(contentId,uid,contentType,vote,votecount,vTypeDiv,vNumDiv,counter){var coldDiv=contentId+"_cold_"+counter;var votect="";if(vote==-1){setVoteElement(coldDiv,"You've voted this cold");}else{if(vote==1){if(readCookie("fb_id")>0){window.scrollTo(0,0);callPublish(readCookie("name"),gTitle,"",gHref,gDesbody,"Hot");}if(readCookie("tw_id")>0){popupTwitter(DOMAINNAME+CONTEXT_ROOT+"/content/"+gHref,"fulltitle"+contentId+"_"+counter);}document.getElementById(vTypeDiv).innerHTML='<img alt="You\'ve voted this Hot" title="You\'ve voted this Hot" src=\''+CONTEXT_IMAGEURL+"/vote_hot_btn_grey.gif'/>";setVoteElement(coldDiv,"You've voted this Hot");}}if(vNumDiv!=""){document.getElementById(vNumDiv).innerHTML=votecount;}}function updatevoteFB(title,href,body,action){var body;var title=document.getElementById(title).innerHTML;try{if(document.getElementById(body).innerHTML!=null||document.getElementById(body).innerHTML!=""){body=document.getElementById(body).innerHTML;}}catch(e){body=" ";}gTitle=title;gHref=href;gDesbody=body;}function updatevoteFB1(title,href,body,action){var body;var title=document.getElementById(title).value;try{if(document.getElementById(body).value!=null||document.getElementById(body).value!=""){body=document.getElementById(body).value;}}catch(e){body=" ";}gTitle=title;gHref=href;gDesbody=body;}function updateVoteFrame(contentId,contentType,voteType,vTypeDiv,vNumDiv,uid,counter){var userid=uid;var uid=readCookie("userid");if(!uid>0){show_new_popup();window.scrollTo(0,0);}else{if(voteType==1){document.getElementById(vTypeDiv).innerHTML='<img alt="You\'ve voted this Hot" title="You\'ve voted this Hot" src=\''+CONTEXT_IMAGEURL+"/vote_hot_btn_grey.gif'/>";}ratingService.updateAndRefreshVotes(contentId,uid,contentType,voteType,{callback:function(data){updateVoteTypeHTMLFrame(contentId,userid,contentType,data.voteType,data.voteCount,vTypeDiv,vNumDiv,counter);},async:false});}return false;}function updateVoteTypeHTMLFrame(contentId,uid,contentType,vote,votecount,vTypeDiv,vNumDiv,counter){var votect="";if(vote==1){if(readCookie("fb_id")>0){callPublish(readCookie("name"),gTitle,"",gHref,gDesbody,"Hot");}if(readCookie("tw_id")>0){popupTwitter(DOMAINNAME+CONTEXT_ROOT+"/content/"+gHref,"fulltitle"+contentId+"_"+counter);}document.getElementById(vTypeDiv).innerHTML='<img alt="You\'ve voted this Hot" title="You\'ve voted this Hot" src=\''+CONTEXT_IMAGEURL+"/vote_hot_btn_grey.gif'/>";}if(vNumDiv!=""){document.getElementById(vNumDiv).innerHTML=votecount;}}function loadModule(pCatId,catId,mediaType,cType,timeSlot,src,pnum){var lContentDiv="popular";var lWaitDiv="media";preloader(lContentDiv);document.getElementById("paginationDiv").style.display="none";ContentServiceAjax.getModuleString(catId,pCatId,mediaType,cType,timeSlot,pnum,function(data){document.getElementById(lContentDiv).innerHTML=data[0];document.getElementById("paginationDiv").style.display="none";gapi.plusone.go();});}function streamPublish(name,userPrompt,hrefTitle,hrefLink,description){var browserName=navigator.appName;if(browserName=="Netscape"){var ScrollTop=document.body.scrollTop;document.getElementById("fb-root").style.top=ScrollTop+"px";document.getElementById("fb-root").style.position="relative";}FB.ui({method:"stream.publish",message:"",attachment:{name:name,caption:"",description:(description),href:hrefLink},user_prompt_message:userPrompt},function(response){if(fanadded==1){fanadded=0;location.reload(true);}});}function callPublish(srcarg,pubarg,link,href,description,action){var pubHref="";var pubLink="";var src="";var name="";name=srcarg.replace(/"/g,"");if(action=="add_link"){pubHref="http://"+DOMAINURL+CONTEXT_ROOT+"/content/"+href;src=name+" has added "+pubarg+" on Hotklix";}if(action=="add_comment"){pubHref="http://"+DOMAINURL+CONTEXT_ROOT+"/content/"+href;pubLink="http://"+DOMAINURL+CONTEXT_IMAGEURL+"/"+link;src=name+" has commented on "+pubarg+" on Hotklix";}if(action=="Hot"){pubHref="http://"+DOMAINURL+CONTEXT_ROOT+"/content/"+href;src=name+"  has voted "+pubarg+" as "+action+" on Hotklix";}if(action=="add_to_fev"){pubHref="http://"+DOMAINURL+CONTEXT_ROOT+"/content/"+href;pubLink="http://"+DOMAINURL+CONTEXT_IMAGEURL+"/"+link;src=name+" has added "+pubarg+" as favourites on Hotklix";}if(action=="add_fan"){fanadded=1;pubHref="http://"+DOMAINURL+CONTEXT_ROOT+"/user/"+href;src=name+" is now fan of "+pubarg+" on Hotklix";}if(action=="invite"){pubHref="http://"+DOMAINURL+CONTEXT_ROOT;pubLink=link;src=name+" has invited "+pubarg+" to join Hotklix";}FB.api("/me",function(response){streamPublish(src,"",pubarg,pubHref,description);});}function trim(str){return str.replace(/^\s+|\s+$/g,"");}function becomeFan(buid,nm,unm,type){var fanOf=buid;var uid=readCookie("userid");if(fanOf==uid){}else{if(!uid>0){show_new_popup();window.scrollTo(0,0);}else{FanService.insertFan(uid,fanOf,function(data){showFanConfirmation(buid,nm,unm,type);});}}}function showFanConfirmation(buid,unm,uname,type){var cnt="becomefanOf_"+buid;var ct="";if(type=="b"){ct=ct+'<span onmouseover=\'this.className="filter_selected_tab";document.getElementById("deletefan").style.display="block";\' onmouseout=\'this.className="";document.getElementById("deletefan").style.display="none";\'>';ct=ct+"<span class='hotklix_button_grey' title='Already a Fan' alt='Already a Fan' style='padding: 4px 4px 0 4px; text-align: left; float: left; width: 150px; height: 20px;'>";ct=ct+"<span style='float:left; width:auto;'>You are a fan</span>";ct=ct+"<span style='float:left; padding:0 0px 0px 4px; width:auto;'>";ct=ct+"<img align='absmiddle' style='' class='' src='"+CONTEXT_IMAGEURL+"/filter_arrow_a.gif' alt='Filters'/></span></span>";ct=ct+"<div id='deletefan' class='filter_module' style='display:none;'>";ct=ct+"<div id='filter_popup' style='top:0px;left:58px'>";ct=ct+"<p><label><a style='cursor:pointer;' onclick=del_fan_profile('"+buid+"'); class='link_b'>Remove fan</a></label></p>";ct=ct+"</div></div></span>";}else{if(type=="upop"){ct=ct+'<span onmouseover=\'this.className="filter_selected_tab";document.getElementById("deletefan").style.display="block";\' onmouseout=\'this.className="";document.getElementById("deletefan").style.display="none";\'>';ct=ct+"<span class='hotklix_button_grey' title='Already a Fan' alt='Already a Fan' style='padding: 4px 4px 0 4px; text-align: left; float: left; width: 150px; height: 20px;'>";ct=ct+"<span style='float:left; width:auto;'>You are a fan</span>";ct=ct+"</span></span>";}else{ct=ct+"<a style='color: gray;' class='link_b font_11'>Added as fan</a>";}}document.getElementById(cnt).innerHTML=ct;var fbId=readCookie("fb_id");activityInsert("add_fan",buid,"",buid);if(fbId>0){var name=readCookie("name");callPublish(name,unm,"",uname,"","add_fan");}else{location.reload(true);}}function showDelPopup(){document.getElementById("deleteBecomeFan").style.display="";}function addToFav(userid,contentid,div,title,seoTitle,body,image){var uid=readCookie("userid");var fbId=readCookie("fb_id");var twId=readCookie("tw_id");var lUid=userid;if(!uid>0){show_new_popup();window.scrollTo(0,0);return false;}if(uid==lUid){return false;}var body;var title=document.getElementById(title).innerHTML;try{if(document.getElementById(body).innerHTML!=null||document.getElementById(body).innerHTML!=""){body=document.getElementById(body).innerHTML;}}catch(e){body=" ";}var contid=contentid;var permission="public";setVoteElement(div,"Added to Favorite");UserContentService.AddtoFevourite(uid,contid,permission);if(fbId>0){var name=readCookie("name");callPublish(name,title,"",seoTitle,body,"add_to_fev");}var count=new Array();count=div.split("_");if(twId>0){popupTwitter(DOMAINNAME+CONTEXT_ROOT+"/content/"+seoTitle,"fulltitle"+contentid+"_"+count[2]);}return false;}function sendEmail(title_div,seotitle,cid,id){idval=id;var title=document.getElementById(title_div).value;var uid=readCookie("userid");if(!uid>0){show_new_popup();window.scrollTo(0,0);}else{var posX=0;var posY=0;if(document.getElementById("videoObjectCode")){var videoObjectCode=document.getElementById("videoObjectCode").innerHTML;if(videoObjectCode!=""||videoObjectCode!=null){posX=findPosX(document.getElementById(id))-200;posY=findPosY(document.getElementById(id))+30;}}else{posX=findPosX(document.getElementById(id))-200;posY=findPosY(document.getElementById(id))-200;}var ct="";ct=ct+"<div style='width: 325px; z-index: 1000;left:0px;top:0px;' id='forward_link_form_";ct=ct+cid;ct=ct+"' class='login-box-module member_popup'>";ct=ct+" <div class='popup_header'>";ct=ct+"<span><b>E-mail Link</b></span>";ct=ct+"<span  style='width:0px' class='close'><a onclick=close_login('forward_link_form_";ct=ct+cid;ct=ct+"');return false; href='#'>X</a></span>";ct=ct+"</div>";ct=ct+"<div style='padding-left: 10px; width: 300px;' class='submit-link'>";ct=ct+" <p>Share this link with your friends</p>";ct=ct+"<p><a target='_blank' href='"+CONTEXT_ROOT+"/content/";ct=ct+seotitle;ct=ct+"'>";ct=ct+title;ct=ct+"</a></p><p>Friend(s) email id: (Separate multiple email ids by comma)</p><span>";ct=ct+"<input type='text' size='31' name='email' id='email_id1";ct=ct+"'/></span>";ct=ct+"<span class='subhead_a' style='display:none'><b id='description_rcount' class='count color_b'></b></span>";ct=ct+"  <p style='width: 300px;'>Personalised Message</p><span>";ct=ct+"<textarea rows='0' cols='36' name='message'  onkeypress='return imposeMaxLength(this, 350,\"description_rcount\");' id='message_";ct=ct+cid;ct=ct+"'></textarea></span><p style='width: 300px; padding-top: 3px;'>";ct=ct+" <em style='float: right; padding-right: 30px;'>Character limit: 350</em></p><br/>";ct=ct+" <p style='width: 300px; padding-top: 3px;'>";ct=ct+" <strong class='error_block_a' style='padding: 1px 0pt 5px 0pt;width:300px;'>";ct=ct+" <small style='display: none;padding:4px 1px 4px 19px' class='error_msg' id='message_privacy'></small></strong></p><br/>";ct=ct+" <p style='width: 300px; padding-top: 3px;'>";ct=ct+"<input type='checkbox' name='add_emails' id='add_emails_to_book'/>  Add above contacts to your address book.</p>";ct=ct+"<p style='width: 300px; padding-top: 3px;text-align:center;'><i>";ct=ct+"<input type='submit' class='hotklix_button' onclick=\"sendMail(";ct=ct+cid+",";ct=ct+"'";ct=ct+title_div+"'";ct=ct+");return false;\" id='forward_";ct=ct+cid;ct=ct+"' value='Send' name='forward'/></i><i style='padding-left:5px;'>";ct=ct+"<input type='submit' class='hotklix_button'  style='margin: 0pt; padding: 0pt; width: 100px;' onclick='fetch_email_id_form(id);return false;' id='get_ids' value='Import email' name='forward'/></i><i>";ct=ct+" <input type='submit' class='hotklix_button' style='margin: 0pt; padding: 0pt; width: 114px;' onclick='find_contacts(1);return false;' id='address_book'  value='Select contacts' name='forward'/></i></p></div></div>";document.getElementById("email").style.top=posY+"px";document.getElementById("email").style.left=posX+"px";document.getElementById("email").innerHTML=ct;}}function sendVoteHotEmail(title_div,seotitle,cid,id){idval=id;var title=document.getElementById(title_div).innerHTML;var uid=readCookie("userid");if(!uid>0){show_new_popup();window.scrollTo(0,0);}else{var posX=0;var posY=0;if(document.getElementById("videoObjectCode")){var videoObjectCode=document.getElementById("videoObjectCode").innerHTML;if(videoObjectCode!=""||videoObjectCode!=null){posX=findPosX(document.getElementById(id))-200;posY=findPosY(document.getElementById(id))+30;}}else{posX=findPosX(document.getElementById(id));posY=findPosY(document.getElementById(id));}var ct="";ct=ct+"<div style='width: 325px; z-index: 1000;left:0px;top:0px;' id='forward_link_form_";ct=ct+cid;ct=ct+"' class='login-box-module member_popup'>";ct=ct+" <div class='popup_header'>";ct=ct+"<span><b>E-mail Link</b></span>";ct=ct+"<span  style='width:0px' class='close'><a onclick=close_login('forward_link_form_";ct=ct+cid;ct=ct+"');return false; href='#'>X</a></span>";ct=ct+"</div>";ct=ct+"<div style='padding-left: 10px; width: 300px;' class='submit-link'>";ct=ct+" <p>Share this link with your friends</p>";ct=ct+"<p><a target='_blank' href='"+CONTEXT_ROOT+"/content/";ct=ct+seotitle;ct=ct+"'>";ct=ct+title;ct=ct+"</a></p><p>Friend(s) email id: (Separate multiple email ids by comma)</p><span>";ct=ct+"<input type='text' size='31' name='email' id='email_id1";ct=ct+"'/></span>";ct=ct+"<span class='subhead_a' style='display:none'><b id='description_rcount' class='count color_b'></b></span>";ct=ct+"  <p style='width: 300px;'>Personalised Message</p><span>";ct=ct+"<textarea rows='0' cols='36' name='message'  onkeypress='return imposeMaxLength(this, 350,\"description_rcount\");' id='message_";ct=ct+cid;ct=ct+"'></textarea></span><p style='width: 300px; padding-top: 3px;'>";ct=ct+" <em style='float: right; padding-right: 30px;'>Character limit: 350</em></p><br/>";ct=ct+" <p style='width: 300px; padding-top: 3px;'>";ct=ct+" <strong class='error_block_a' style='padding: 1px 0pt 5px 0pt;width:300px;'>";ct=ct+" <small style='display: none;padding:4px 1px 4px 19px' class='error_msg' id='message_privacy'></small></strong></p><br/>";ct=ct+" <p style='width: 300px; padding-top: 3px;'>";ct=ct+"<input type='checkbox' name='add_emails' id='add_emails_to_book'/>  Add above contacts to your address book.</p>";ct=ct+"<p style='width: 300px; padding-top: 3px;text-align:center;'><i>";ct=ct+"<input type='submit' class='hotklix_button' onclick=\"sendMail(";ct=ct+cid+",";ct=ct+"'";ct=ct+title_div+"'";ct=ct+");return false;\" id='forward_";ct=ct+cid;ct=ct+"' value='Send' name='forward'/></i><i style='padding-left:5px;'>";ct=ct+"<input type='submit' class='hotklix_button'  style='margin: 0pt; padding: 0pt; width: 100px;' onclick='fetch_email_id_form(id);return false;' id='get_ids' value='Import email' name='forward'/></i><i>";ct=ct+" <input type='submit' class='hotklix_button' style='margin: 0pt; padding: 0pt; width: 114px;' onclick='find_contacts(1);return false;' id='address_book'  value='Select contacts' name='forward'/></i></p></div></div>";document.getElementById("email").style.top=posY+"px";document.getElementById("email").style.left=posX+"px";document.getElementById("email").innerHTML=ct;}}function imposeMaxLength(obj,maxLen,divId){if(obj.value.length>maxLen){obj.value=obj.value.substring(0,maxLen);obj.scrollTop=obj.scrollHeight;return false;}else{remainingCount(obj.value,maxLen,divId);}}function sharePopup(url){window.open(url,"name","height=500,width=500,resizable=yes");return false;}function popupTwitter(url,title){var title=document.getElementById(title).value;if(title==""){var firstpos=url.lastIndexOf("/")-2;var lastpos=url.length;var Namer=url.substring(firstpos,lastpos);twitterTitle=Namer.replace(/-/g," ");}else{twitterTitle=title;}ContentServiceAjax.urlShortning(url,shurl);}function shurl(data){var url="http://twitter.com/home?status=";var shurl="@hotklix "+twitterTitle+" "+data;url=url+encodeURIComponent(shurl);twitterTitle="";window.open(url,"name","height=500,width=500,resizable=yes, scrollbars=yes");}function fetch_email_id_form(id){var posX=0;var posY=0;posX=findPosX(document.getElementById(id))+392;posY=findPosY(document.getElementById(id))+13;var ct="";ct=ct+"<div style='width: 325px; z-index: 1010;'  id='fetch_emails_div' class='login-box-module'>";ct=ct+"<div style='width: 310px;' class='username'>";ct=ct+"<label style='width: 200px;'><b>Add friends from your Web emails</b></label>";ct=ct+"<em style='float: right;'><img onclick=close_login('fetch_emails_div'); src='"+CONTEXT_IMAGEURL+"/cross-img.gif'/></em></div>";ct=ct+"<div style='margin: 5px; padding: 5px;'>";ct=ct+"<p style='padding-left: 12px; padding-bottom: 5px;'><label>E-mail id:</label><span class='email_box'>";ct=ct+"<i><input type='text' value='' id='username1' name='username1' style='width: 200px;'/></i></span></p>";ct=ct+"<p style='margin-left: 5px;'><label>Password:</label><span>";ct=ct+"<input type='password' value='' id='psw' name='psw' style='width: 200px;'/><br/>";ct=ct+"<dfn>( Your Password & E-mail id will not be saved )</dfn></span></p><p><label></label><span>";ct=ct+"<input type='image' onclick='find_contacts(0);return false;' alt='' src='"+CONTEXT_IMAGEURL+"/find_friends_btn.gif'/>";ct=ct+"</span></p></div></div>";document.getElementById("fetch_emails").style.top=posY+"px";document.getElementById("fetch_emails").style.left=posX+"px";document.getElementById("fetch_emails").innerHTML=ct;}function find_contacts(findfrom){var uid=readCookie("userid");if(findfrom==0){contactsFindFrom="Address List";var username=document.getElementById("username1").value;var password=document.getElementById("psw").value;InviteService.importAddressBook(username,password,displayContacts);document.getElementById("username1").value="";document.getElementById("psw").value="";document.getElementById("fetch_emails_div").style.display="none";}else{contactsFindFrom="Address Book";InviteService.fetchLocalAddressBook(uid,displayContacts);}}function checkUncheckAll(){if(document.getElementById("checkall").checked){checkall_fields("inviteFriends","check","message");}else{checkall_fields("inviteFriends","uncheck","message");}}function displayContacts(list){var posX=0;var posY=0;posX=findPosX(document.getElementById(idval))-211;posY=findPosY(document.getElementById(idval))+91;var newhtml='<div style="background:#F26522 none repeat scroll 0% 0%; width:300px; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; z-index: 1020;" class="address_book_popup" id="fetched_email_ids_list"><div style="width: 290px ! important; padding:5px; background:url('+CONTEXT_IMAGEURL+'/popup_header_bg.gif) repeat-x; float: left;"><label style="float: left; width: 100px;"><b>'+contactsFindFrom+'</b></label><em style="float: right; width: auto;"><img onclick="close_login(\'fetched_email_ids_list\');" src= "'+CONTEXT_IMAGEURL+'/cross-img.gif"/></em></div><div style="width: 300px ! important; overflow-y:auto;overflow-y:auto;overflow-x:hidden; float:left; border:none;" class="email-addresses-module">';var i;if(contactsFindFrom=="Address Book"){if(list!=null&&list.length>0){newhtml=newhtml+"<form id='inviteFriends'>";newhtml=newhtml+"<div style='width: 290px; font-weight: normal; font-style: normal; color: blue;' class='email-address-parent'>";newhtml=newhtml+"<input type='checkbox' onclick='checkUncheckAll();' id='checkall' name='checkall'/>select all / unselect all</div>";for(i=0;i<list.length;i++){newhtml=newhtml+'<div style="width: 290px;" id="my_fr_con_'+i+'" class="email-address-parent"><span style="width: 280px;"><em><input type="checkbox" value="'+list[i].friendEmail+'" id="friend_name_'+i+'" name="email_id"/></em><em>'+list[i].friendName+'</em></span><label style="width: 280px; padding-left: 20px;">'+list[i].friendEmail+"</label></div>";}newhtml=newhtml+"</form>";}else{newhtml=newhtml+'<div style="width: 290px;" id="my_fr_con_0" class="email-address-parent"><span style="width: 280px;">No Friends in Address Book</div>';}}else{if(list.length>1){newhtml=newhtml+"<form id='inviteFriends'>";newhtml=newhtml+"<div style='width: 270px; font-weight: normal; font-style: normal; color: blue;' class='email-address-parent'>";newhtml=newhtml+"<input type='checkbox' onclick='checkUncheckAll();' id='checkall' name='checkall'/>select all / unselect all</div>";for(i=0;i<list.length-1;i++){newhtml=newhtml+'<div style="width: 270px;" id="my_fr_con_'+i+'" class="email-address-parent"><span style="width: 260px;"><em><input type="checkbox" value="'+list[i+1].email+'" id="friend_name_'+i+'" name="email_id"/></em><em>'+list[i+1].name+'</em></span><label style="width: 260px; padding-left: 20px;">'+list[i+1].email+"</label></div>";}newhtml=newhtml+"</form>";}else{newhtml=newhtml+'<div style="width: 270px;" id="my_fr_con_0" class="email-address-parent"><span style="width: 260px;">'+list[0]+"</div>";}}newhtml=newhtml+'<input type="hidden" id="total_friends_value" value="'+i+'"/></div><div style="text-align: center; width: 100%;">';if((contactsFindFrom=="Address Book"&&list!=null&&list!=""&&list.length>0)||(contactsFindFrom=="Address List"&&list.length>1)){newhtml=newhtml+'<input type="button" onclick="return set_email_ids_in_box();" value="add addresses" name="invite"/>';}newhtml=newhtml+'<input type="button" onclick="close_login(\'fetched_email_ids_list\');" value="cancel"/></div></div>';document.getElementById("overlap_div").style.top=posY+"px";document.getElementById("overlap_div").style.left=posX+"px";document.getElementById("overlap_div").style.border="1px solid #7F9DB9";document.getElementById("overlap_div").style.zIndex="10000";document.getElementById("overlap_div").innerHTML=newhtml;}function loadProfileSummary(){}function get_object(id){var object=null;if(document.layers){object=document.layers[id];}else{if(document.all){object=document.all[id];}else{if(document.getElementById){object=document.getElementById(id);}}}return object;}function is_child_of(parent,child){if(child!=null){while(child.parentNode){if((child=child.parentNode)==parent){return true;}}}return false;}function fixOnMouseOut(element,event,JavaScript_code){var current_mouse_target=null;if(event.toElement){current_mouse_target=event.toElement;}else{if(event.relatedTarget){current_mouse_target=event.relatedTarget;}}if(!is_child_of(element,current_mouse_target)&&element!=current_mouse_target){eval(JavaScript_code);}}function show_message(message){document.getElementById("userpopupdiv").style.display="none";}function GetZoomFactor(){var factor=1;if(document.body.getBoundingClientRect){var rect=document.body.getBoundingClientRect();var physicalW=rect.right-rect.left;var logicalW=document.body.offsetWidth;factor=Math.round((physicalW/logicalW)*100)/100;}return factor;}var newposX=0;var newposY=0;var cflag=0;var localUname="";var divId="";function resetDivId(dId){if(divId==dId){divId="";}}function displayProfileSummary(d,div,uname,username){var unuid=readCookie("userid");divId=d;var posX=0;var posY=0;var winHeight=0;var newHeight=getPosY(d);localUname=uname;var scrollLeft=0;var scrollTop=0;if(window.pageXOffset===undefined){zoomFactor=GetZoomFactor();scrollLeft=Math.round(document.documentElement.scrollLeft/zoomFactor);scrollTop=Math.round(document.documentElement.scrollTop/zoomFactor);winHeight=Math.round(document.documentElement.scrollTop/zoomFactor);}else{winHeight=window.pageYOffset;}var iNewHeight2=newHeight-winHeight;if(iNewHeight2<=210){posY=getPosY(d)-(iNewHeight2-10);}else{if(winHeight<700){posY=getPosY(d)-(210);}else{posY=getPosY(d)-210;}}posX=getPosX(d)-150;if(posX<0){posX=10;}if(posY<0){posY=10;}newposX=posX;newposY=posY;var obj="";setTimeout(function(){if(divId==d){ContentServiceAjax.getUsersProfile(uname,function(data){obj=data;if(obj!=null){var ct="";ct=ct+"<div id='createpop' style='margin:0;position:absolute;width:230px;z-index:10000;'>";ct=ct+"<div class='member_popup' style='height:220px;'><p class='popup_header'><span>";ct=ct+obj.name;ct=ct+"</span><span class='close' onclick='close_login(\"userpopupdiv\");return false;'><a href='#'>X</a></span></p>";ct=ct+"<div class='member_info'>";if(obj.picture!=null&&obj.picture!=""){ct=ct+"<em><img src='";ct=ct+obj.picture;ct=ct+"' title='Member' alt='Member' height='60px' width='60px'/></em>";}else{ct=ct+"<em><img src='"+CONTEXT_IMAGEURL+"/hotklixers_snap.gif'";ct=ct+" title='Member' alt='Member' height='60px' width='60px'/></em>";}ct=ct+"<p class='popup_detail'><span><b>Links: </b>";if(obj.contentcount>0){ct=ct+"<a href='"+CONTEXT_ROOT+"/viewmore.html?viewmore=profilemylinks&uid=";ct=ct+obj.uid;ct=ct+"' class='link_b'>";ct=ct+obj.contentcount;ct=ct+"</a></span>";}else{ct=ct+obj.contentcount;ct=ct+"</span>";}ct=ct+" <span><b>Fans: </b>";if(obj.fancount>0){ct=ct+"<a href='"+CONTEXT_ROOT+"/viewmore.html?viewmore=myfans&uid=";ct=ct+obj.uid;ct=ct+"' class='link_b'>";ct=ct+obj.fancount;ct=ct+"</a></span>";}else{ct=ct+obj.fancount;ct=ct+"</span>";}if(obj.city!=null){ct=ct+"<span><b>Location: </b>";ct=ct+obj.city;}ct=ct+"</span></p></div>";ct=ct+"<div class='member_info'><span><b><a class='link_b' href='"+CONTEXT_ROOT+"/user/";if(username!=null&&username!=""){ct=ct+username;}else{ct=ct+uname;}ct=ct+"'>View Profile</a></b></span></div>";if(obj.link1!=null||obj.link2!=null){ct=ct+"<div class='member_desc'><span><b>Recent Links</b></span>";if(obj.link1!=null){ct=ct+"<span><i><img alt='Bullet' title='Bullet' src='/Hotklix/theme/images/red_bullet.gif'/></i>";ct=ct+"<b class='links'>";ct=ct+obj.link1;ct=ct+"</b></span>";}if(obj.link2!=null){ct=ct+"<span><i><img alt='Bullet' title='Bullet' src='/Hotklix/theme/images/red_bullet.gif'/></i>";ct=ct+"<b class='links'>";ct=ct+obj.link2;ct=ct+"</b></span>";}}else{ct=ct+"<div class='member_desc'><span><b></b></span>";ct=ct+"<span style='height:20px;'>";ct=ct+"<b class='links'>";ct=ct+"</b></span>";ct=ct+"<span>";ct=ct+"<b class='links'>";ct=ct+"</b></span>";}if(obj.uid==unuid){ct=ct+"<span style='padding: 4px 40px 0 4px; text-align: right; float: right; width:auto; height: 20px;'>";if(obj.link1!=null||obj.link2!=null){ct=ct+"<span><a href='"+CONTEXT_ROOT+"/viewmore.html?viewmore=profilemylinks&uid=";ct=ct+obj.uid;ct=ct+"' class='link_b'>more</a></span>";}ct=ct+"</span>";}else{if(obj.fanOf==true){ct=ct+"<span class='hotklix_button_grey' title='Already a Fan' alt='Already a Fan' style='padding: 4px 4px 0 4px; text-align: left; float: left; width:auto; height: 20px;'>";ct=ct+"<span style='float:left; width:auto;'>You are a fan</span>";ct=ct+"</span>";}else{ct=ct+"<span id='becomefanOf_";ct=ct+obj.uid;ct=ct+"'><a class='link_b' onclick='becomeFan(";ct=ct+obj.uid+',"';ct=ct+obj.name+'","';ct=ct+uname;ct=ct+'","upop");return false;\'>';ct=ct+"<input type='button' style='cursor:pointer' alt='Become a Fan' title='Become a Fan' class='hotklix_button' value='Become a Fan'/>";ct=ct+"</a></span>";}}ct=ct+"</div></div>";document.getElementById(div).innerHTML=ct;document.getElementById(div).style.top=posY+"px";document.getElementById(div).style.left=posX+"px";var tX=tempX;var tY=tempY;if(document.getElementById("pagenm")!=null&&document.getElementById("pagenm").value=="display"){if(divId==d){document.getElementById(div).style.top=(posY-8)+"px";document.getElementById(div).style.display="block";}else{document.getElementById(div).style.display="none";}}else{if(divId==d){document.getElementById(div).style.display="block";}else{document.getElementById(div).style.display="none";}}}});}},800);}function usernmout(div){jQuery(document).mousemove(function(e){var x=e.pageX;var y=e.pageY;xcor=newposX;ycor=newposY;tX=xcor+240;tY=ycor+220;if(x>=tX||y>=tY||y<=ycor){document.getElementById("userpopupdiv").style.display="none";}else{document.getElementById("userpopupdiv").style.display="block";}});}function getPosY(el){yPos=document.getElementById(el).offsetTop;tempEl=document.getElementById(el).offsetParent;while(tempEl!=null){yPos+=tempEl.offsetTop;tempEl=tempEl.offsetParent;}return yPos;}function getPosX(el){xPos=document.getElementById(el).offsetLeft;tempEl=document.getElementById(el).offsetParent;while(tempEl!=null){xPos+=tempEl.offsetLeft;tempEl=tempEl.offsetParent;}return xPos;}function collectUname(text){ContentServiceAjax.getUsersummaryCsv(text,function(data){if(profileCache==null){profileCache=new Object();}for(var x in data){profileCache[x]=data[x];}});}function activityInsert(type,ownerUid,media,contentid){var viewedby=readCookie("userid");if(viewedby>0){var location=document.URL;var parentid=contentid;ActivityLogService.insertActivity(ownerUid,type,parentid,viewedby,location,media,ip);}}
