var LightBoxManager={lbContentId:null,isOpen:false,showLightBox:function(C,A){LightBoxManager.isOpen=true;LightBoxManager.lbContentId=C;var B=Window.getHeight()+Window.getYScroll();$("lightbox_underlay").show();$("lightbox_popup_body").innerHTML=$(LightBoxManager.lbContentId).innerHTML;$(LightBoxManager.lbContentId).innerHTML="";$("lightbox_popup").show();$("lightbox_popup").invisible();$("lightbox_popup").style.position="absolute";$("lightbox_popup").style.left=parseInt($("lightbox_popup").getCenteredOffsets().x)+"px";$("lightbox_popup").style.top=parseInt($("lightbox_popup").getCenteredOffsets().y)+"px";$("lightbox_popup_title").innerHTML=A;$("lightbox_popup").visible();},closeLightBox:function(){$("lightbox_underlay").hide();$("lightbox_popup").hide();$("lightbox_popup").invisible();$(LightBoxManager.lbContentId).innerHTML=$("lightbox_popup_body").innerHTML;LightBoxManager.isOpen=false;}};var $extend=function(){var A=arguments;if(!A[1]){A=[this,A[0]];}for(var B in A[1]){A[0][B]=A[1][B];}return A[0];};var Abstract=function(A){A=A||{};A.extend=$extend;return A;};var DOMElement={extend:function(name,fn){if(!document.all){eval("HTMLElement.prototype."+name+" = fn");}else{var _createElement=document.createElement;document.createElement=function(tag){var _elem=_createElement(tag);eval("_elem."+name+" = fn");return _elem;};var _getElementById=document.getElementById;document.getElementById=function(id){var _elem=_getElementById(id);eval("_elem."+name+" = fn");return _elem;};var _getElementsByTagName=document.getElementsByTagName;document.getElementsByTagName=function(tag){var _arr=_getElementsByTagName(tag);for(var _elem=0;_elem<_arr.length;_elem++){eval("_arr[_elem]."+name+" = fn");}return _arr;};}}};var $=function(A){if(document.getElementById(A)){return document.getElementById(A);}};DOMElement.extend("whoAmI",function(){return this.id;});DOMElement.extend("getOffsets",function(){var A=this,C=0,B=0;do{C+=A.offsetLeft||0;B+=A.offsetTop||0;A=A.offsetParent;}while(A);return{x:C,y:B};});DOMElement.extend("getSize",function(){var C=this,A=0,B=0;A=C.offsetWidth||0;B=C.offsetHeight||0;return{w:A,h:B};});DOMElement.extend("getCenteredOffsets",function(){var A=this,C=0,B=0;C=(Window.getWidth()-this.getSize().w)/2+parseInt(Window.getXScroll());B=(Window.getHeight()-this.getSize().h)/2+parseInt(Window.getYScroll());return{x:C,y:B};});DOMElement.extend("hide",function(){this.style.display="none";return true;});DOMElement.extend("show",function(){this.style.display="block";return true;});DOMElement.extend("visible",function(){this.style.visibility="visible";return true;});DOMElement.extend("invisible",function(){this.style.visibility="hidden";return true;});DOMElement.extend("about","DOMElement v0.1");var Window=new Abstract(window);Window.extend({getXScroll:function(){var A;if(self.pageXOffset){A=self.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollLeft){A=document.documentElement.scrollLeft;}else{if(document.body){A=document.body.scrollLeft;}}}return A;},getYScroll:function(){var A;if(self.pageYOffset){A=self.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollTop;}else{if(document.body){A=document.body.scrollTop;}}}return A;},getHeight:function(){xheight=0;if(window.innerHeight){xheight=window.innerHeight-18;}else{if(document.documentElement&&document.documentElement.clientHeight){xheight=document.documentElement.clientHeight;}else{if(document.body&&document.body.clientHeight){xheight=document.body.clientHeight;}}}return xheight;},getWidth:function(){xwidth=0;if(window.innerWidth){xwidth=window.innerWidth-18;}else{if(document.documentElement&&document.documentElement.clientWidth){xwidth=document.documentElement.clientWidth;}else{if(document.body&&document.body.clientWidth){xwidth=document.body.clientWidth;}}}return xwidth;}});var Document=new Abstract(document);Document.extend({getHeight:function(){doc=this;var C=0,A,B;if(doc.height){C=doc.height;}else{if(doc.body){if(doc.body.scrollHeight){C=A=doc.body.scrollHeight;}if(doc.body.offsetHeight){C=B=doc.body.offsetHeight;}if(A&&B){C=Math.max(A,B);}}}return C;}});function testAlert(A){alert("TEST ALERT :"+A);}var iRemoteProcedure=0;var tRemoteProcedures={};function XHR(){var A=XHR.arguments;this.init(A);this.req=null;this.id=++iRemoteProcedure;tRemoteProcedures[this.id]=this;this.timer=null;}XHR.prototype={options:{method:"post",divid:"",onRequest:function(){},onSuccess:function(){},onFailure:function(){}},init:function(A){if(A[0].method){this.options.method=A[0].method;}if(A[0].onSuccess){this.options.onSuccess=A[0].onSuccess;}if(A[0].onFailure){this.options.onFailure=A[0].onFailure;}if(A[0].onRequest){this.options.onRequest=A[0].onRequest;}this.divid=A[0].divid;},send:function(B,A){if(this.showPatience()){alert(this.showPatience());return this;}if(this.options.method=="get"){A+=(A.indexOf("?")==-1?"?":"&")+"Rand="+Math.random();B=B+(B.indexOf("?")!=-1?"&":"?")+A;A=null;}if(window.XMLHttpRequest){this.req=new XMLHttpRequest();this.req.onreadystatechange=new Function("tRemoteProcedures["+this.id+"].processReqChange()");}else{if(window.ActiveXObject){this.req=new ActiveXObject("Microsoft.XMLHTTP");if(this.req){this.req.onreadystatechange=new Function("tRemoteProcedures["+this.id+"].processReqChange()");}}}this.req.open(this.options.method.toUpperCase(),B,true);if(this.options.method=="post"){this.req.setRequestHeader("Content-type","application/x-www-form-urlencoded");this.req.setRequestHeader("Connection","close");}this.req.send(A);},showPatience:function(){if(this.options.onRequest){return this.options.onRequest();}},processReqChange:function(){if(this.req.readyState==4){if(this.req.status==200){if(this.options.onSuccess){if(this.divid){var A=$(this.divid);A.innerHTML=this.req.responseText;}else{this.options.onSuccess(this.req.responseText);}}}else{}}}};var loadergif="<p style='margin-top:20px;'><img src='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>";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="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","Share with your friends");}else{sd("div_sendtofriendlogin");hd("div_FOAF_invitefriendtowatch");javascript:LightBoxManager.showLightBox("div_sharewithyourfriend","Share with your 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="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="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 friends first name.\n";}if(getEl("fld_lastname").value==""){B+="Enter friends last name.\n";}if(getEl("friends_email").value==""){B+="Enter the Friends Email ID.\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="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="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="insertvotes.php?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="insertvotesplay.php?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="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="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="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 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)?"":"; expires="+C+"; 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){setCookie(B,D+":"+A+":"+C,null,false);}}else{setCookie(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){setCookie(B,D+":"+A+":"+C,null,false);}}else{setCookie(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="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="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="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==""){setCookie(A,"",null,true);}else{setCookie(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){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="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 description.");return false;}}if(X==""&&C==""){alert("Please select a Playlist or Add a new Playlist");getEl("fld_title").focus();return false;}if(C!=""&&X!=""){alert("Please select a Play List OR Add a new Playlist");getEl("fld_title").focus();return false;}if(C==""&&I==""){alert("Please enter description ");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="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("Playlist exists. Please enter a new playlist 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/filecollectionvideo.php?id='+B[3]+'">'+name+"</a>\"<br/><br/><img src=\"../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;setCookie("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/filecollectionmusic.php?id='+B[3]+'">'+name+"\"</a><br/><br/><img src=\"../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;setCookie("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="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="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="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 C=getEl("sendusername").value;var D=getEl("sendpassword").value;if(C==""){alert("Please Enter Valid Email-id");return false;}else{if(D==""){alert("Please Enter Password");return false;}else{user_login(C,D,"sendtofriend");return false;}}}function chk_login_fav(){var C=getEl("username").value;var D=getEl("password").value;if(C==""){alert("Please Enter Valid Email-id");return false;}else{if(D==""){alert("Please Enter Password");return false;}else{user_login(C,D,"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 findsongs(A){for(i=1;i<=16;i++){if(i==A){document.getElementById("findsongsub"+i).style.display="block";document.getElementById("findsong"+i).className="findsongsel";}else{document.getElementById("findsongsub"+i).style.display="none";document.getElementById("findsong"+i).className="findsong";}}}function sendfriends(){if(!validateSendFriend()){return false;}var A=sendtofriend("xyz","sendtofriend");return false;}function sendfriends_mm(){if(!validateSendFriend()){return false;}var A=document.getElementById("verification_code_stf").value;var B=chkcookies(A,"sendtofriend",1);return false;}function findsongs_vc(A){for(i=1;i<=categoryCount;i++){if(i==A){document.getElementById("findsongsub"+i).style.display="block";document.getElementById("findsong"+i).className="findsongsel";}else{document.getElementById("findsongsub"+i).style.display="none";document.getElementById("findsong"+i).className="findsong";}}}function call(B){var A=document.getElementById("change").value;if(A=="mv"){ajax_call("video_category_mv.php?id="+B+"&stype=mv","xyz","GET","VideoPaging");}else{if(A=="mr"){ajax_call("video_category_mr.php?id="+B+"&stype=mr","xyz","GET","VideoPaging");}else{if(A="tr"){ajax_call("video_category_tr.php?id="+B+"&stype=tr","xyz","GET","VideoPaging");}}}}function viewVideo_new(C,B){var A=30;ajax_call_pagination("video_category_paging.php?page="+C+"&perpage="+A+"&id="+B+"&contenttype=1","xyz","GET","VideoPaging");}function TopVideo_new(C,B){var A=30;ajax_call_pagination("video_category_tr_paging.php?page="+C+"&perpage="+A+"&id="+B+"&contenttype=1","xyz","GET","VideoPaging");}function mostVideo_recent(C,B){var A=30;ajax_call_pagination("video_category_mr_paging.php?page="+C+"&perpage="+A+"&id="+B+"&contenttype=2","xyz","GET","mostVideorecentPaging");}function mostVideo_view(C,B){var A=30;ajax_call_pagination("video_category_mv_paging.php?page="+C+"&perpage="+A+"&id="+B+"&contenttype=2","xyz","GET","mostVideoviewPaging");}function findsongs_mu(A){for(i=1;i<=30;i++){if(i==A){document.getElementById("findsongsub"+i).style.display="block";document.getElementById("findsong"+i).className="findsongsel";}else{document.getElementById("findsongsub"+i).style.display="none";document.getElementById("findsong"+i).className="findsong";}}}function PasswdRemindWin(){window.open("http://login.rediff.com/cgi-bin/passwd_remind.cgi?FormName=showlogin","win1","toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=yes,width=490,height=480,maximize=null,top=70,left=80");}function musicTabshow(A){for(i=1;i<=3;i++){if(i==A){document.getElementById("music_tab"+i).className="playlisttabsel";showDiv("musicdiv"+i);}else{document.getElementById("music_tab"+i).className="playlisttab";hideDiv("musicdiv"+i);}}}function viewAllMusic(C,B,A,D){if(A=="mr"){ajax_call_pagination("music_browse_mr.php?catid="+D+"&page="+C+"&perpage="+B,"xyz","GET","div_mu_fav1");}else{if(A=="tr"){ajax_call_pagination("music_browse_tr.php?catid="+D+"&page="+C+"&perpage="+B,"xyz","GET","div_mu_fav1");}else{if(A=="mv"){ajax_call_pagination("music_browse_mv.php?catid="+D+"&page="+C+"&perpage="+B,"xyz","GET","div_mu_fav1");}}}}function call_mubrowse(B){var A=document.getElementById("showing"+B).value;if(B==1){if(A=="mv"){ajax_call("music_browse_mv.php?stype=mv&catid="+catid,"xyz","GET","div_mu_fav1");}else{if(A=="mr"){ajax_call("music_browse_mr.php?stype=mr&catid="+catid,"xyz","GET","div_mu_fav1");}else{if(A="tr"){ajax_call("music_browse_tr.php?stype=tr&catid="+catid,"xyz","GET","div_mu_fav1");}}}}}function muFavTabshow(A){for(i=1;i<=4;i++){if(i==A){document.getElementById("mu_fav_tab"+i).className="playlisttabsel";showDiv("div_mu_fav"+i);}else{document.getElementById("mu_fav_tab"+i).className="playlisttab";hideDiv("div_mu_fav"+i);}}}function showAlpha(B,A){for(i=0;i<=26;i++){if(i==B){if(x=document.getElementById("alpha"+i+A)){x.className="alphasel";}if(document.getElementById("tab_alpha"+i+A)){showDiv("tab_alpha"+i+A);}}else{if(x=document.getElementById("alpha"+i+A)){x.className="alpha";}if(document.getElementById("tab_alpha"+i+A)){hideDiv("tab_alpha"+i+A);}}}document.getElementById("alphall"+A).className="alpha";}function showAllalpha(A){document.getElementById("alphall"+A).className="alphasel";if(document.getElementById("alpha0"+A)){document.getElementById("alpha"+i+A).className="alpha";}for(i=0;i<=26;i++){if(x=document.getElementById("alpha"+i+A)){x.className="alpha";}if(document.getElementById("tab_alpha"+i+A)){showDiv("tab_alpha"+i+A);}}}function findPosXY(C,B,A,H){var G=0;var E=document.getElementById(C);if(E!=null){if(E.offsetParent){while(E.offsetParent){G+=E.offsetLeft;E=E.offsetParent;}}else{if(E.x){G+=E.x;}}document.getElementById(B).style.left=G+A;var D=0;var F=document.getElementById(C);if(F.offsetParent){while(F.offsetParent){D+=F.offsetTop;F=F.offsetParent;}}else{if(F.y){D+=F.y;}}document.getElementById(B).style.top=D+H;showDiv(B);}}function showHideallmucat(){if(document.getElementById("viewallcat").title=="Show categories"){findPosXY("viewallcat","div_allmucategory",-75,25);document.getElementById("viewallcat").title="Hide categories";}else{document.getElementById("viewallcat").title="Show categories";hideDiv("div_allmucategory");}}function srchoption(A){document.getElementById("selectedop").innerHTML=A.innerHTML;hideDiv("div_srchoption");}function findsongs_muartist(A){for(i=1;i<=26;i++){if(i==A){document.getElementById("findsongsub"+i).style.display="block";document.getElementById("findsong"+i).className="findsongsel";}else{document.getElementById("findsongsub"+i).style.display="none";document.getElementById("findsong"+i).className="findsong";}}}function viewMusic_new(D,B,C,F,E){var A=30;ajax_call("music_artist_paging.php?page="+D+"&perpage="+A+"&id="+F+"&arttype="+E+"&aid="+C,"xyz","GET","mostPhotorecentPaging");}function findphotos(A){for(i=1;i<=catcount;i++){if(i==A){document.getElementById("findsongsub"+i).style.display="block";document.getElementById("findsong"+i).className="findsongsel";}else{document.getElementById("findsongsub"+i).style.display="none";document.getElementById("findsong"+i).className="findsong";}}}function showBox(E,G,D,A,F){if(document.getElementById(D).style.display!="block"){var C;for(i=1;i<infocount1+1;i++){C="infobox"+i;hideDiv(C);}var B;if(navigator.userAgent.indexOf("MSIE")!=-1){B=document.body.scrollTop;}else{B=0;}if(!E){E=window.event;}evt=new Evt(E);C=D+"_img";document.getElementById(D).style.left=findPosX(document.getElementById(C))-40;document.getElementById(D).style.top=findPosY(document.getElementById(C))-80;if(G==1){document.getElementById(D).style.display="block";document.getElementById(D).style.visibility="visible";}else{document.getElementById(D).style.display="none";document.getElementById(D).style.visibility="hidden";}}}function viewPhoto_new(C,B){var A=30;ajax_call_pagination("photo_category_paging.php?page="+C+"&perpage="+A+"&id="+B+"&contenttype=1","xyz","GET","PhotoPaging");}function top_rated(C,B){var A=30;ajax_call_pagination("photo_category_paging_tr.php?page="+C+"&perpage="+A+"&id="+B+"&contenttype=1","xyz","GET","TopRated");}function mostPhoto_recent(C,B){var A=30;ajax_call_pagination("photo_category_mr_paging.php?page="+C+"&perpage="+A+"&id="+B+"&contenttype=3","xyz","GET","mostPhotorecentPaging");}function mostPhoto_view(C,B){var A=30;ajax_call_pagination("photo_category_mv_paging.php?page="+C+"&perpage="+A+"&id="+B+"&contenttype=3","xyz","GET","mostPhotoviewPaging");}function call_photocat(B){var A=document.getElementById("change").value;if(A=="mv"){ajax_call("photo_category_mv.php?id="+B+"&stype=mv","xyz","GET","PhotoPaging");}else{if(A=="mr"){ajax_call("photo_category_mr.php?id="+B+"&stype=mr","xyz","GET","PhotoPaging");}else{if(A=="tr"){ajax_call("photo_category_tr.php?id="+B+"&stype=tr","xyz","GET","PhotoPaging");}}}}function music_playlist(B,A){ajax_call("playlist_music.php?start="+B+"&perpage="+A,"","GET","playlist_div2");showPlaylist_Tabs(2);}function video_playlist(B,A){showPlaylist_Tabs(1);}function showPlaylist_Tabs(A){for(i=1;i<=2;i++){if(i==A){document.getElementById("catvd_tab"+i).className="playlisttabsel";showDiv("playlist_div"+i);}else{document.getElementById("catvd_tab"+i).className="playlisttab";hideDiv("playlist_div"+i);}}}function findin_show(B,A){for(i=1;i<=17;i++){if(i==B){document.getElementById("findin_cat"+i).className="findsongsel";document.getElementById("categoryname").innerHTML=A.innerHTML;}else{document.getElementById("findin_cat"+i).className="findsong";}}}function call_playlist(B){var A=document.getElementById("showing"+B).value;if(B==1){if(A=="mv"){ajax_call("playlist_music_mv.php?stype=mv","xyz","GET","playlist_div2");}else{if(A=="mr"){ajax_call("playlist_music_mr.php?stype=mr","xyz","GET","playlist_div2");}else{if(A="tr"){ajax_call("playlist_music_tr.php?stype=tr","xyz","GET","playlist_div2");}}}}else{if(B==2){if(A=="mv"){ajax_call("playlist_mv.php?stype=mv","xyz","GET","playlist_div1");}else{if(A=="mr"){ajax_call("playlist_mr.php?stype=mr","xyz","GET","playlist_div1");}else{if(A="tr"){ajax_call("playlist_tr.php?stype=tr","xyz","GET","playlist_div1");}}}}}}function viewMusic_playlist(C,B,A){if(A=="mv"){ajax_call("playlist_music_mv.php?page="+C+"&perpage="+B,"xyz","GET","playlist_div2");}else{if(A=="mr"){ajax_call("playlist_music_mr.php?page="+C+"&perpage="+B,"xyz","GET","playlist_div2");}else{if(A="tr"){ajax_call("playlist_music_tr.php?page="+C+"&perpage="+B,"xyz","GET","playlist_div2");}}}}function viewVideo_playlist(C,B,A){if(A=="mv"){ajax_call("playlist_mv.php?page="+C+"&perpage="+B,"xyz","GET","playlist_div1");}else{if(A=="mr"){ajax_call("playlist_mr.php?page="+C+"&perpage="+B,"xyz","GET","playlist_div1");}else{if(A="tr"){ajax_call("playlist_tr.php?page="+C+"&perpage="+B,"xyz","GET","playlist_div1");}}}}