var loadergif="<p style='margin-top:20px;'><img src='http://ishare.rediff.com/images/ajax-loader.gif' align='absmiddle'  /> &#160;&#160; <span class='grey1 f14'>Loading...</span></p>";var pretext='<div class="lightbox_container" style="border: solid 0px #999999;"><div class="div_row" style=" margin:5px 2px 5px 2px;">';var potext="</div></div>";host="http://"+location.hostname+"/";function ajax_call(E,B,D,C){getEl(C).innerHTML=loadergif;var A=new function(){new XHR({method:"post",onSuccess:function(F){$(C).innerHTML=F;},onFailure:function(F){$(C).innerHTML=loadingFailed;}}).send(E,B);};}function ajax_call_pagination(E,B,D,C){getEl(C).innerHTML=loadergif;window.location.href="#";var A=new function(){new XHR({method:"post",onSuccess:function(F){$(C).innerHTML=F;},onFailure:function(F){$(C).innerHTML=loadingFailed;}}).send(E,B);};}var event="";var funtype="";var sendtofriendtype=0;var collectionName="";function chkcookies(C,D,B){event=D;funtype=B;var F=host+"checkcookies.php?vc="+C+"&r="+Math.random();var A="";var G="";var E=new function(){new XHR({method:"GET",onSuccess:function(H){displaycookies(H);},onFailure:function(H){$chkvalue=loadingFailed;}}).send(F,A);};return ;}function displaycookies(C){if(C.indexOf("false")>-1){alert("Please enter correct verification code.");return false;}if(event.indexOf("chkabuse")!=-1){var I=getEl("a1").checked;var G=getEl("a2").checked;var F=getEl("a3").checked;var E=getEl("a4").checked;var D=getEl("a5").checked;var B=getEl("a6").checked;var A=getEl("ivsid").value;chkabuse(I,G,F,E,D,B,A);}else{if(event.indexOf("sendtofriend")!=-1){var A=content_id;var H=getEl("friends_email").value;sendtofriend(H,A);}}}function checksendtofriend(){var A="N";if(gc("uid")!=null){hd("div_sendtofriendlogin");sd("div_FOAF_invitefriendtowatch");javascript:LightBoxManager.showLightBox("div_sharewithyourfriend","Send to friends");}else{sd("div_sendtofriendlogin");hd("div_FOAF_invitefriendtowatch");javascript:LightBoxManager.showLightBox("div_sharewithyourfriend","Send to friends");}}function sendtofriend(G,I,C){var I=content_id;var H;if(sendtofriendtype>0){H=sendtofriendtype;sendtofriendtype=0;}else{H=C;}var G=getEl("friends_email").value;var J=getEl("txt_redirect").value;var D=getEl("fld_fname").value;var B=getEl("fld_lastname").value;for(i=1;i<16;i++){if(getEl("fld_how"+i).checked){fld_how=getEl("fld_how"+i).value;break;}}var C=2;if(J=="stf1"){C=2;}else{if(J=="stf2"){C=3;}else{if(J=="stf3"){C=1;}}}var A=host+"sendtofriends.php?fe="+G+"&iv="+I+"&type="+C+"&to_fname="+D+"&to_lastame="+B+"&contype="+contenttype+"&playlist="+H+"&fld_how='"+fld_how+"'";if(H==1||H==2){A+="&collectionName="+collectionName;}A+="&r="+Math.random();var F="";var E=new function(){new XHR({method:"GET",onSuccess:function(K){sendfriend(K);},onFailure:function(K){$chkvalue=loadingFailed;}}).send(A,F);};}function sendfriend(A){alert("Mail sent successfully");getEl("friends_email").value="";getEl("fld_fname").value="";getEl("fld_lastname").value="";LightBoxManager.closeLightBox();}function chkabuse(I,H,G,F,E,D,J){var A=host+"abuse.php?a1="+I+"&a2="+H+"&a3="+G+"&a4="+F+"&a5="+E+"&a6="+D+"&iv="+J+"&contype="+contenttype+"&playlist="+funtype+"&r="+Math.random();var C="";var B=new function(){new XHR({method:"GET",onSuccess:function(K){reportabuse(K);},onFailure:function(K){$chkvalue=loadingFailed;}}).send(A,C);};}function reportabuse(A){if(A.indexOf("moderatorfile")>-1){alert("Report abuse for this file has been disabled");}else{if(A.indexOf("approved")>-1){alert("Moderator file, abuse for this file has been disabled");}else{if(A.indexOf("Please select atleast one reason")>-1){alert("Please select atleast one reason");}else{alert("Reported successfully to the moderator");}}}LightBoxManager.closeLightBox();}function printmsg(){var A=getEl("fld_fname").value;if(A.length>0){getEl("mesg").innerHTML="How do you know "+A+"?";}}function validateSendFriend(){var D=false;var B="";if(getEl("fld_fname").value==""){B="Enter friend's first name.\n";}if(getEl("fld_lastname").value==""){B+="Enter friend's last name.\n";}if(getEl("friends_email").value==""){B+="Enter the friend's email address.\n";}for(A=1;A<16;A++){if(getEl("fld_how"+A).checked){D=true;break;}}if(!D){B+="Tell us how do you know your friend.\n";}if(B.length>0){alert(B);return false;}else{var C=new Array();C=getEl("friends_email").value.split(",");for(var A=0;A<C.length;A++){if(!echeck(C[A])){return false;}}}return true;}function echeck(D){var A=/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;var C=getEl("friends_email").value;var B=C.length;C=C.slice(0,B-1);var E=C.split(",");var G=true;for(var F=0;F<E.length;++F){if(!E[F].match(A)){G=false;break;}}if(G){return true;}else{alert("Please enter a valid email ID");return false;}}function viewdisplay(){var A=host+"viewscount.php?id="+content_id+"&r="+Math.random();var B="";var C=new function(){new XHR({method:"GET",onSuccess:function(D){setviews(D);},onFailure:function(D){$chkvalue=loadingFailed;}}).send(A,B);};fillsendtofriend();}function viewdisplayplay(){var A=host+"viewscountplay.php?id="+content_id+"&r="+Math.random();var B="";var C=new function(){new XHR({method:"GET",onSuccess:function(D){setviews(D);},onFailure:function(D){$chkvalue=loadingFailed;}}).send(A,B);};fillsendtofriend();}function fillsendtofriend(){var A="N";if(gc("uid")!=null){A=gc("uid");if(A!="N"){}}}function submitvote(D){var B=host+"insertvotes.php?contenttype="+contenttype+"&mv="+D+"&iv="+content_id+"&r="+Math.random();var C="";var A=new function(){new XHR({method:"GET",onSuccess:function(E){displayvote(E);},onFailure:function(E){$chkvalue=loadingFailed;}}).send(B,C);};}function submitvoteplay(D){var B=host+"insertvotesplay.php?contenttype="+contenttype+"&mv="+D+"&iv="+content_id+"&r="+Math.random();var C="";var A=new function(){new XHR({method:"GET",onSuccess:function(E){displayvote(E);},onFailure:function(E){$chkvalue=loadingFailed;}}).send(B,C);};}function displayvote(A){getEl("votediv").innerHTML="<B>Thank you</B>";}function setviews(B){var C=new Array();C=B.split("|");getEl("thumbs_up").innerHTML=C[1];getEl("thumbs_down").innerHTML=C[2];if(contenttype=="1"){var A="Plays : ";}else{var A="Views : ";}getEl("viewscount").innerHTML=A+C[0];}function getCookie(B){var A=document.cookie;var D=B+"=";var C=A.indexOf("; "+D);if(C==-1){C=A.indexOf(D);if(C!=0){return null;}}else{C+=2;}var E=document.cookie.indexOf(";",C);if(E==-1){E=A.length;}return unescape(A.substring(C+D.length,E));}function gc(A){var B=getCookie(A);if(B!=null){return B.replace(/\+/g," ");}else{return B;}}function checkaddtofavorite(){var A="N";if(gc("uid")!=null){A=gc("uid");if(A!="N"){var B=host+"add_favourites.php?item_id="+content_id+"&conttype="+contenttype+"&playlist="+funtype+"&r="+Math.random();var C="";var D=new function(){new XHR({method:"GET",onSuccess:function(E){showfavorite(E);},onFailure:function(E){$chkvalue=loadingFailed;}}).send(B,C);};}else{LightBoxManager.showLightBox("div_Addtoyourfavorite","Add to your favorite");}}else{LightBoxManager.showLightBox("div_Addtoyourfavorite","Add to your favorite");}}function showfavorite(B){var A=getEl("fileName").innerHTML;if(B.indexOf("notlogged")>-1){getEl("div_favoritesuccess").innerHTML=pretext+"Please login first"+potext;}if(B==1){getEl("div_favoritesuccess").innerHTML='<div class="lightbox_container" style="border: solid 0px #999999;"><div class="div_row font14 arial m52" >This file has already been added to your favourites.'+potext;}else{getEl("div_favoritesuccess").innerHTML='<div class="lightbox_container" style="border: solid 0px #999999;"><div class="div_row font14 arial m52" ><b>'+A+"</b> - has been added to your favorites successfully ."+potext;}getEl("addfavlink").innerHTML="Added to your favorite";LightBoxManager.showLightBox("div_favoritesuccess","Add to your favorite");}function user_login(E,A,C){event=C;var B=host+"check_auth.php";var D="username="+E+"&password="+A+"&action=login&r="+Math.random();var F=new function(){new XHR({method:"post",onSuccess:function(G){checklogin(G);},onFailure:function(G){$chektemp=loadingFailed;}}).send(B,D);};}function displaylogininfo(){getEl("main_header_left_links").innerHTML='<a href="http://is.rediff.com/profile.php" class="header_links"><span class=\'txtbold\'> '+gc("Rlo")+' </span></a> | <a href="http://is.rediff.com/webuploader.php" class="header_links">Upload</a> |<A HREF="http://is.rediff.com/logout.php" class="signout">Signout</A>';}function checklogin(A){if(A.indexOf("Exists1")>-1){displaylogininfo();if(event=="favorite"){checkaddtofavorite();}else{if(event=="playlist"){getplaylist();}else{if(event=="InvitFrd"){loginaddtofrd();}else{if(event=="similar_request"){user_similar_request();}else{if(event=="sendtofriend"){hd("div_sendtofriendlogin");sd("div_FOAF_invitefriendtowatch");}}}}}}else{if(A.indexOf("NotExists")>-1){displaylogininfo();var B=host+"member_register.int.php";var C="";var D=new function(){new XHR({method:"post",onSuccess:function(E){$chektemp=E;},onFailure:function(E){$chektemp=loadingFailed;}}).send(B,C);};}else{if(A.indexOf("RfnotExists")>-1){alert("Invalid user name & password");alert("Please enter correct user name & password");getEl("sendusername").value="";getEl("sendpassword").value="";}else{if(A.indexOf("Error Profile")>-1){getEl("div_loginstatus").innerHTML=pretext+"Server response error! Please try after some time"+potext;LightBoxManager.showLightBox("div_loginstatus","Login Error");}else{if(A.indexOf("Error")>-1){getEl("div_loginstatus").innerHTML=pretext+"Server error !Please try after some time"+potext;LightBoxManager.showLightBox("div_loginstatus","Login Error");}}}}}}function setCookiePlay(D,B,E,A){var C=new Date();if(B=="null"||B==null||B=="undefined"){E=-1;}C.setDate(E);if(gc(D)==null||gc(D)=="null"||A==true||(gc(D)!=null&&gc(D).length<2)){document.cookie=D+"="+B+(";  path=/; domain =.rediff.com");}else{document.cookie=D+"="+gc(D)+"|"+B+(";  path=/; domain =.rediff.com");}}function setCookie(D,B,E,A){var C=new Date();if(B=="null"||B==null||B=="undefined"){E=-1;}C.setDate(E);if(gc(D)==null||gc(D)=="null"||A==true||(gc(D)!=null&&gc(D).length<2)){document.cookie=D+"="+B+((E==null)?"":"; expires="+C+"; path=/; domain =ishare.rediff.com");}else{document.cookie=D+"="+gc(D)+"|"+B+((E==null)?"":";  path=/; domain =.rediff.com");}}function addtoplaylist(D,A,C,E){getEl("playlist_msg").innerHTML="";var B="vidplaylist";if(E==2){B="vidplaylist";}else{if(E==1){B="miuplaylist";}}if(gc(B)!=null&&gc(B)!="null"){if(gc(B).indexOf(D+":"+A)==-1){setCookiePlay(B,D+":"+A+":"+C,null,false);}}else{setCookiePlay(B,D+":"+A+":"+C,null,false);}LightBoxManager.showLightBox("div_addtoyourplaylist","Add to your collection");createpalylistlightbox();if(E==2){sd("video_playlist");hd("music_playlist");getEl("videoplaylisttab").className="selected";getEl("musicplaylisttab").className="";}else{if(E==1){sd("music_playlist");hd("video_playlist");getEl("musicplaylisttab").className="selected";getEl("videoplaylisttab").className="";}}hd("div_collectdetails");hd("login_id");hd("playlist_msg");sd("playlist_playlist_holder");hd("div_play_collect_name_msg");sd("playlist");}function addtoplaylist1(D,A,C,G){var B="vidplaylist";if(G==2){B="vidplaylist";}else{if(G==1){B="miuplaylist";}}if(gc(B)!=null&&gc(B)!="null"){if(gc(B).indexOf(D+":"+A)==-1){setCookiePlay(B,D+":"+A+":"+C,null,false);}}else{setCookiePlay(B,D+":"+A+":"+C,null,false);}var F=gc(B);var E=new Array();E=F.split("|");if(E.length>=3){LightBoxManager.showLightBox("div_addtoyourplaylist","Add to your collection");createpalylistlightbox();if(G==2){sd("video_playlist");hd("music_playlist");}else{if(G==1){sd("music_playlist");hd("video_playlist");}}sd("playlist_msg");sd("playlist_playlist_holder");hd("div_play_collect_name_msg");sd("playlist");}}function createpalylistlightbox(){var G=gc("miuplaylist");if(G!=null&&G.length>2&&getEl("playlist_music_playlist")){var F=new Array();F=G.split("|");var A="";for(var B=0;B<F.length;B++){var D=new Array();D=F[B].split(":");A+='      <div class="list_block_music_playlist0">';A+='        <div class="list_icon_music_playlist"><img src="http://ishare.rediff.com/images_new/music_icon.jpg" /> </div>';A+='        <div class="list_data_music_playlist"> '+D[1]+" </div>";A+='        <div class="close_button_music_playlist"><a href="#" onclick="removefromplaylist('+B+',\'miuplaylist\')"> <img src="http://ishare.rediff.com/images_new/close_ltb.jpg" /> </a></div>';A+="      </div>";}getEl("playlist_music_playlist").innerHTML=A;}else{getEl("playlist_music_playlist").innerHTML="";}var E=gc("vidplaylist");if(E!=null&&E.length>2&&getEl("playlist_video_playlist")){var F=new Array();F=E.split("|");var C="<table>";var C="";for(var B=0;B<F.length;B++){var D=new Array();D=unescape(F[B]).split(":");C+="      <table >";C+="      <tr valign='top'>";C+='        <td ><img src="http://'+D[2]+'" width="88" height="68"/> </td>';C+="        <td width='220'><span> "+D[1]+"</span>";C+='        <span class="fontgreyc font12"></span></td>';C+='        <td> <a href="javascript:removefromplaylist('+B+',\'vidplaylist\')"><img src="http://ishare.rediff.com/images_new/close_ltb.jpg" /> </a></td>';C+="      </tr>";C+="      </table>";}getEl("playlist_video_playlist").style.border="2px solid white";getEl("playlist_video_playlist").innerHTML=C;}else{getEl("playlist_video_playlist").innerHTML="";}}function removefromplaylist(B,A){var D=gc(A);var E="";if(D!=null){var F=new Array();F=D.split("|");for(var C=0;C<F.length;C++){if(C!=B){E=E+F[C]+"|";}}}if(E.charAt(E.length-1)=="|"){E=E.substring(0,E.length-1);}if(E==""){setCookiePlay(A,"",null,true);}else{setCookiePlay(A,E,null,true);}createpalylistlightbox();}var currsaveplaylist=2;function saveplaylist(C){currsaveplaylist=C;if(C==1){var B=gc("miuplaylist");if(B==""||B==null){alert("Please select a Music File");return false;}}else{if(C==2){if(document.getElementById("img")){hd("img");}var A=gc("vidplaylist");if(A==""||A==null){alert("Please select a Video File");return false;}}}var D="N";if(C==1){loginmsg="Current collection - Music ("+gc("miuplaylist").split("|").length+")";}else{if(C==2){loginmsg="Current collection - Video ("+gc("vidplaylist").split("|").length+")";}}getEl("login_save_details").innerHTML=loginmsg;if(gc("uid")!=null){D=gc("uid");if(D!="N"){getplaylist();}else{sd("login_id");hd("playlist");}}else{sd("login_id");hd("playlist");}}function getplaylist(){hd("playlist");hd("login_id");getEl("fld_title").value="";getEl("fld_disc").value="";var A="";if(currsaveplaylist==2){A=" You are saving - "+gc("vidplaylist").split("|").length+" video files ";}else{if(currsaveplaylist==1){A=" You are saving - "+gc("miuplaylist").split("|").length+" music files ";}}getEl("div_play_collect_name").innerHTML="Welcome "+gc("Rlo")+",";getEl("div_play_collect_msg").innerHTML=A;getuserplaylist();sd("div_collectdetails");}function getuserplaylist(){var A=gc("uid");var B=host+"getplaylist.php?id="+A+"&type="+currsaveplaylist+"&r="+Math.random();var C="";var D=new function(){new XHR({method:"GET",onSuccess:function(E){setuserplaylist(E);},onFailure:function(E){$chkvalue=loadingFailed;}}).send(B,C);};}function setuserplaylist(A){getEl("div_user_own_playlist").innerHTML=A;}function getEl(A){return document.getElementById(A);}function sd(A){getEl(A).style.display="block";}function hd(A){getEl(A).style.display="none";}function showDiv(A){sd(A);}function hideDiv(A){hd(A);}function trim(A){A=A.replace(/^\s*/,"").replace(/\s*$/,"");return A;}function addlist(){var E=getEl("sel_playlist");var C=E.value;var A=E.options[E.selectedIndex].text;var X=trim(getEl("fld_title").value);var I=trim(getEl("fld_disc").value);var W="!@#$%^&*()+=-[]\\';,./{}|\":<>?";for(var F=0;F<X.length;F++){if(W.indexOf(X.charAt(F))!=-1){alert("Please enter a proper title.");return false;}}for(var F=0;F<I.length;F++){if(W.indexOf(I.charAt(F))!=-1){alert("Please enter a proper tag.");return false;}}if(X==""&&C==""){alert("Please select a Collection or Add a new Collection");getEl("fld_title").focus();return false;}if(C!=""&&X!=""){alert("Please select a Collection OR Add a new Collection");getEl("fld_title").focus();return false;}if(C==""&&I==""){alert("Please enter tag ");getEl("fld_disc").focus();}else{var H=getEl("fld_title").value;var E=getEl("sel_playlist");var B=getEl("fld_disc").value;var K=gc("uid");var J=host+"addtoplaylist.php?playlistname="+X+"&existsplaylistid="+C+"&descrip="+B+"&id="+K+"&type="+currsaveplaylist+"&existsplaylistname="+A+"&r="+Math.random();var G="";var D=new function(){new XHR({method:"GET",onSuccess:function(L){addplaylist(L);},onFailure:function(L){$chkvalue=loadingFailed;}}).send(J,G);};}}function addplaylist(A){if(A.indexOf("ALBUM NOT CREATED")>-1){alert("Collection exists. Please enter a new Collection title.");return false;}if(A.indexOf("Video Added")>-1){var B=new Array();B=A.split("|");collectionName=name=B[2];currsaveplaylist;getEl("div_play_collect_name_msg").innerHTML="Welcome "+gc("Rlo")+",";if(currsaveplaylist==2){getEl("playlist_msg").innerHTML="Your video collection of "+B[1]+' file(s) have been saved as "<a href="http://ishare.rediff.com/collection/videos/'+linkTitle(name)+"/"+B[3]+'">'+name+"</a>\"<br/><br/><img src=\"http://ishare.rediff.com/images/share.gif \" class='vmiddle'/><a href=javascript:LightBoxManager.showLightBox('div_FOAF_invitefriendtowatch','Share&#160;it&#160;with&#160;your&#160;friends');> <b>Share it with your friends</b></a>";content_id=B[3];contenttype=2;sendtofriendtype=2;setCookiePlay("vidplaylist","",null,true);}else{getEl("playlist_msg").innerHTML="Your music collection of "+B[1]+' file(s) have been saved as "<a href="http://ishare.rediff.com/collection/music/'+linkTitle(name)+"/"+B[3]+'">'+name+"\"</a><br/><br/><img src=\"http://ishare.rediff.com/images/share.gif \" class='vmiddle'/><a href=javascript:LightBoxManager.showLightBox('div_FOAF_invitefriendtowatch','Share&#160;it&#160;with&#160;your&#160;friends');><b>Share it with your friends</b></a>";content_id=B[3];contenttype=1;sendtofriendtype=1;setCookiePlay("miuplaylist","",null,true);}createpalylistlightbox();hd("playlist_playlist_holder");sd("playlist");sd("playlist_msg");hd("div_collectdetails");}if(A.indexOf("Video not Added")>-1){alert("Video Not Added.");return false;}}function playlist_mr(E,D){var A=(getEl("showing").value);if(A="mr"){var B=host+"playlist_mr.php?start="+E+"&perpage="+D;var C="";var F=new function(){new XHR({method:"GET",onSuccess:function(G){plyalistmr(G);},onFailure:function(G){$chkvalue=loadingFailed;}}).send(B,C);};}}function playlistmr(A){getEl("playlist_div1").innerHTML=A;}function ExtensionsOkay(B){var D=new Array();var E=B;D[0]=".png";D[1]=".gif";D[2]=".jpg";D[3]=".jpeg";D[4]=".ico";D[5]=".cur";var C=E.substr(E.lastIndexOf("."));for(var A=0;A<D.length;A++){if(C==D[A]){return true;}}alert("Your upload form contains an unapproved file name.");return false;}function gup(A){A=A.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var D="[\\?&]"+A+"=([^&#]*)";var C=new RegExp(D);var B=C.exec(window.location.href);if(B==null){return"";}else{return B[1];}}function chk_login_play(){var B=getEl("play_username").value;var A=getEl("play_password").value;if(B==""){alert("Please Enter Valid Email-id");return false;}else{if(A==""){alert("Please Enter Password");return false;}else{user_login(B,A,"playlist");return false;}}}function showtoaddfrd(A){if(A.indexOf("notlogged")>-1){getEl("div_favoritesuccess").innerHTML=pretext+"Please login first"+potext;}else{getEl("div_favoritesuccess").innerHTML='<div class="lightbox_container" style="border: solid 0px #999999;">'+A+'<div class="div_row" style=" margin:5px 2px 5px 2px;"></div></div>';}LightBoxManager.showLightBox("div_favoritesuccess","Add as a friends");}function loginaddtofrd(){var A="N";if(gc("uid")!=null){A=gc("uid");if(A!="N"){var B=host+"addfriend.php?toId="+toid+"&r="+Math.random();var C="";var D=new function(){new XHR({method:"GET",onSuccess:function(E){showtoaddfrd(E);},onFailure:function(E){$chkvalue=loadingFailed;}}).send(B,C);};}else{LightBoxManager.showLightBox("div_AddtofirnD","Add as a friends");}}else{LightBoxManager.showLightBox("div_AddtofirnD","Add as a friends");}}function selectplaylisttab(A){if(A==1){getEl("musicplaylisttab").className="selected";getEl("videoplaylisttab").className="";}else{if(A==2){getEl("videoplaylisttab").className="selected";getEl("musicplaylisttab").className="";}}}function user_similar_request(){var D=(contenttype==1)?"music":(contenttype==2)?"videos":"photos";var A="N";if(gc("uid")!=null){A=gc("uid");if(A!="N"){var B=host+"user_similar_request.php?id="+content_id+"&contenttype="+contenttype+"&r="+Math.random();var C="";var E=new function(){new XHR({method:"GET",onSuccess:function(F){showsimilar(F);},onFailure:function(F){}}).send(B,C);};}else{LightBoxManager.showLightBox("div_similarrequest","Get similar "+D+" in your mailbox");}}else{LightBoxManager.showLightBox("div_similarrequest","Get similar "+D+" in your mailbox");}}function showsimilar(A){if(A.indexOf("notlogged")>-1){getEl("div_similarsuccess").innerHTML=pretext+"Please login first"+potext;}else{getEl("div_similarsuccess").innerHTML='<div class="lightbox_container" style="border: solid 0px #999999;"><div class="div_row font14 arial" style=" margin:5px 2px 5px 2px;">Rqeuest for Similar content Accepted.'+potext;}LightBoxManager.showLightBox("div_similarsuccess","Request for Similar content");}function chk_login_similar_request(){var B=getEl("username").value;var A=getEl("password").value;if(B==""){alert("Please Enter Valid Email-id");return false;}else{if(A==""){alert("Please Enter Password");return false;}else{user_login(B,A,"similar_request");return false;}}}function openWindow(C,D){var A=gc("Rl");var E=gc("Rsc");var B=gc("fb_sig_user");getEl("email").value=A+"@rediffmail.com";getEl("session_id").value=E;getEl("userid").value=B;getEl("url").value=C;getEl("sociali").action="http://social.rediff.com/"+C;getEl("sociali").submit();}function onclickHide(){getEl("app1062_RESULT_ID").style.display="none";getEl("app1062_RESULT_ID").innerHTML="";}function onclickShow(A){var B=A+"d";data=getEl(B).innerHTML;getEl("app1062_RESULT_ID").style.display="block";getEl("app1062_RESULT_ID").innerHTML=data;}function check(){var I;var J;var G=10;var H=6;jimAuld.utils.flashsniffer.installed===true?I="1":I="0";if(I!="0"){J=jimAuld.utils.flashsniffer.version;}else{var B="Flash not installed on this machine.";document.getElementById("obj").innerHTML=document.getElementById("noflash").innerHTML;}}function chk_abuse(){var C=document.getElementById("verification_code").value;var D=chkcookies(C,"chkabuse",0);return false;}function sendfriends(){if(!validateSendFriend()){return false;}var B=sendtofriend("xyz","sendtofriend");return false;}function chk_login_sendtofriend(){var D="Error";var C=getEl("sendusername").value;var E=getEl("sendpassword").value;if(C==""){alert("Please enter valid email-id",D);return false;}else{if(E==""){alert("Please enter password");return false;}else{user_login(C,E,"sendtofriend");return false;}}}function chk_login_fav(){var D="Error";var C=getEl("username").value;var E=getEl("password").value;if(C==""){alert("Please enter valid email-id",D);return false;}else{if(E==""){alert("Please enter password",D);return false;}else{user_login(C,E,"favorite");return false;}}}function gup(B){B=B.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var A="[\\?&]"+B+"=([^&#]*)";var D=new RegExp(A);var C=D.exec(window.location.href);if(C==null){return"";}else{return C[1];}}function linkTitle(C){var A=C.replace(/[^a-zA-Z0-9]/g,"-");var B=A.replace(/[-]+/g,"-");return B;}var flag=false;var loadingDiv="<div class='font09 fontblue' style='text-align:center;'><img src='http://ishare.rediff.com/images/ajax-loader.gif' align='absmiddle'/></div>";var loadingFailed="<div class='fontgreyb font09'><img src='http://ishare.rediff.com/images/icon_error.png' width='40' height='40' align='absmiddle'/><br/>Sorry!This app is currently unavilable.</div>";function loadAllComponents(){var B=new Array();B=param.split("|");if(B.length>0){var A=new Array();for(i=0;i<B.length;i++){A=B[i].split(",");if(A.length>1){loadComponent(A[0],A[1],A[2],A[3],A[4],flag);}}}}function loadComponent(L,N,D,P,B,J){var I="col"+D;var G=null;G="dynsection_body_"+N;var K=document.createElement("div");K.className="dynsection";K.id="dynsection_"+N;var Q=document.createElement("div");Q.className="dynsection_header";var H=document.createElement("div");H.className="dynsection_header_links";H.id="appmenulink_"+N;var A=document.createElement("div");A.innerHTML="";A.appendChild(H);var F=document.createElement("div");F.innerHTML+="<img id='"+N+"_toggleimg' src='http://ishare.rediff.com/images/icon_dynsection_open.gif' border='0' align='absmiddle' />";F.innerHTML+="<span class='dynsection_header_title'>"+L+"<span>";var C=document.createElement("div");C.className="dynsection_body";C.id="dynsection_body_"+N;Q.appendChild(H);Q.appendChild(F);K.appendChild(Q);C.innerHTML=loadingDiv;K.appendChild(C);K.className="appscssclass";document.getElementById(I).appendChild(K);var E=host+"getappdata.php";var O="appid="+N+"&uid="+uid+"&sid="+sid+"&contentid="+content_id+"&contenttype="+contenttype;if(login!="n"){O=O+"&r="+Math.random();}var M=new function(){new XHR({method:"get",divid:G,onSuccess:function(R){},onFailure:function(R){$(G).innerHTML=loadingFailed;}}).send(E,O);};}var jimAuld=window.jimAuld||{};jimAuld.utils=jimAuld.utils||{};jimAuld.utils.flashsniffer={lastMajorRelease:10,installed:false,version:null,detect:function(){var B,A,D;if(navigator.plugins&&navigator.plugins.length){B=navigator.plugins["Shockwave Flash"];if(B){jimAuld.utils.flashsniffer.installed=true;if(B.description){A=B.description;jimAuld.utils.flashsniffer.version=A.charAt(A.indexOf(".")-1);}}else{jimAuld.utils.flashsniffer.installed=false;}if(navigator.plugins["Shockwave Flash 2.0"]){jimAuld.utils.flashsniffer.installed=true;jimAuld.utils.flashsniffer.version=2;}}else{if(navigator.mimeTypes&&navigator.mimeTypes.length){B=navigator.mimeTypes["application/x-shockwave-flash"];if(B&&B.enabledPlugin){jimAuld.utils.flashsniffer.installed=true;}else{jimAuld.utils.flashsniffer.installed=false;}}else{for(var C=jimAuld.utils.flashsniffer.lastMajorRelease;C>=2;C--){try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+C);jimAuld.utils.flashsniffer.installed=true;jimAuld.utils.flashsniffer.version=C;break;}catch(E){}}if(jimAuld.utils.flashsniffer.installed==null){try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");jimAuld.utils.flashsniffer.installed=true;jimAuld.utils.flashsniffer.version=2;}catch(E){}}if(jimAuld.utils.flashsniffer.installed==null){jimAuld.utils.flashsniffer.installed=false;}D=null;}}},isVersion:function(A){return(jimAuld.utils.flashsniffer.version!=null&&jimAuld.utils.flashsniffer.version==A);},isLatestVersion:function(){return(jimAuld.utils.flashsniffer.version!=null&&jimAuld.utils.flashsniffer.version==jimAuld.utils.flashsniffer.lastMajorRelease);},meetsMinVersion:function(A){return(jimAuld.utils.flashsniffer.version!=null&&jimAuld.utils.flashsniffer.version>=A);}};jimAuld.utils.flashsniffer.detect();function gen_unique(){return ++gen_unique._counter;}gen_unique._counter=0;function ge(F){if(typeof (F)=="undefined"){Util.error("Tried to get an undefined element!");return null;}var D;if(typeof (F)=="string"){D=document.getElementById(F);if(!(ua.ie()>=7)){return D;}if(!D){return null;}else{if(typeof (D.id)=="string"&&D.id==F){return D;}else{var C=document.getElementsByName(F);if(!C||!C.length){return null;}var B=[];for(var A=0;A<C.length;A++){var E=C[A];if(!E.id&&F){continue;}if(typeof (E.id)=="string"&&E.id!=F){continue;}B.push(C[A]);}if(B.length!=1){Util.error("ge() failed in a bizarre complicated edge case. Check comments.");return null;}return B[0];}}}else{return F;}return null;}var ua={ie:function(){return this._ie;},firefox:function(){return this._firefox;},opera:function(){return this._opera;},safari:function(){return this._safari;},windows:function(){return this._windows;},osx:function(){return this._osx;},populate:function(){var A=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso).(\d+\.\d+))|(?:Opera.(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))/.exec(navigator.userAgent);var B=/(Mac OS X;)|(Windows;)/.exec(navigator.userAgent);if(A){ua._ie=A[1]?parseFloat(A[1]):NaN;ua._firefox=A[2]?parseFloat(A[2]):NaN;ua._opera=A[3]?parseFloat(A[3]):NaN;ua._safari=A[4]?parseFloat(A[4]):NaN;}else{ua._ie=ua._firefox=ua._opera=ua._safari=NaN;}if(B){ua._osx=!!B[1];ua._windows=!!B[2];}else{ua._osx=ua._windows=false;}},adjustBehaviors:function(){onloadRegister(addSafariLabelSupport);if(ua.ie()<7){try{document.execCommand("BackgroundImageCache",false,true);}catch(A){}}}};function is_scalar(A){switch(typeof (A)){case"string":case"number":case"null":case"boolean":return true;}return false;}var FBML=(function(){var _addEventListener;var invoked_dialogs=Array();var form_hidden_inputs=null;if(window.addEventListener){_addEventListener=function(obj,eventName,fun){obj.addEventListener(eventName,fun,false);};}else{_addEventListener=function(obj,eventName,fun){obj.attachEvent("on"+eventName,fun);};}var cc=window;var ce=eval;var u=true;var reqs;function clickRewriteAjax(app_id,loggedIn,targetId,url,fId,showLoading,isShareAjax){return _clickRewriteAjax(app_id,loggedIn,targetId,url,fId,showLoading,isShareAjax);return false;}function _clickRewriteAjax(app_id,loggedIn,targetId,url,fId,showLoading,isShareAjax){var doPopulateTagetHTMLFlag;var postdata="";var formId;if(isShareAjax==true){var tempurl_mock="/share_mock_ajax_proxy.php";var querystring="shareurl_mock="+url;var tempdiv=targetId;var xhrFunc=new function(){new XHR({method:"post",evalScripts:true,onSuccess:function(req){$(tempdiv+"_contents").innerHTML=req;},onRequest:function(req){if(showLoading=="true"||showLoading==null){$(tempdiv+"_contents").innerHTML="<img src='http://ishare.rediff.com/images/indicator.gif' />";}}}).send(tempurl_mock,querystring);};return false;}else{if(typeof (fId)=="string"){formId=document.getElementById(fId);}else{formId=fId;}for(i=0;i<formId.elements.length;i++){if(formId.elements[i].name!=""&&(formId.elements[i].tagName=="INPUT"||formId.elements[i].tagName=="SELECT"||formId.elements[i].tagName=="TEXTAREA")){if(formId.elements[i].type=="radio"){if(formId.elements[i].checked){postdata+="&"+formId.elements[i].name+"="+formId.elements[i].value;}}else{if(formId.elements[i].type=="checkbox"){if(formId.elements[i].checked){postdata+="&"+formId.elements[i].name+"="+formId.elements[i].value;}}else{postdata+="&"+formId.elements[i].name+"="+formId.elements[i].value;}}}}var tempurl_mock="/mock_ajax_proxy.php";var querystring="canvasurl_mock="+url+postdata;var tempdiv=targetId;var xhrFunc=new function(){new XHR({method:"post",evalScripts:true,onSuccess:function(req){$(tempdiv).innerHTML=req;if(LightBoxManager.isOpen){LightBoxManager.closeLightBox();}}}).send(tempurl_mock,querystring);};return false;}}function clickToShow(targetId){return clickToSetDisplay(targetId,"");}function clickToHide(targetId){return clickToSetDisplay(targetId,"none");}function clickToToggle(targetId){var target=ge(targetId);if(!target){return err("Could not find target "+targetId);}else{target.style.display=(target.style.display=="none")?"":"none";return false;}}function clickToSetDisplay(targetId,disp){var target=ge(targetId);if(!target){return err("Could not find target "+targetId);}else{target.style.display=disp;return false;}}function clickToEnable(targetId){return clickToSetDisabled(targetId,"");}function clickToDisable(targetId){return clickToSetDisabled(targetId,"disabled");}function clickToSetDisabled(targetId,disabled){var target=ge(targetId);if(!target){return err("Could not find target "+targetId);}else{target.disabled=disabled;return false;}}return{clickToShow:clickToShow,clickRewriteAjax:clickRewriteAjax,clickToHide:clickToHide,clickToToggle:clickToToggle,clickToEnable:clickToEnable,clickToDisable:clickToDisable};})();if(window.XMLHttpRequest&&!(window.ActiveXObject)){try{req1=new XMLHttpRequest();}catch(e){req1=false;}}else{if(window.ActiveXObject){try{req1=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{req1=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){req1=false;}}}}function setRecommandation(){document.getElementById("rel").innerHTML=loadergif;var A=document.getElementById("url_id").value;var B=document.getElementById("url_type").value;if(req1){req1.open("get",host+"recommandation.php?urlid="+A+"&urltype="+B+"&r="+Math.random(),true);req1.onreadystatechange=processReqChangeReco;req1.send("");}}function processReqChangeReco(){if(req1.readyState==4){if(req1.status==200){if(req1.responseText!=""){document.getElementById("rel").innerHTML=req1.responseText;}}}}