function cpaint(){this.version="2.0.3";var d=new Array();d.debugging=-1;d.proxy_url="";d.transfer_mode="GET";d.async=true;d.response_type="OBJECT";d.persistent_connection=false;d.use_cpaint_api=true;var f=0;this.capable=g();this.set_debug=function(){if(typeof arguments[0]=="boolean"){if(arguments[0]===true){d.debugging=1}else{d.debugging=0}}else{if(typeof arguments[0]=="number"){d.debugging=Math.round(arguments[0])}}};this.set_proxy_url=function(){if(typeof arguments[0]=="string"){d.proxy_url=arguments[0]}};this.set_transfer_mode=function(){if(arguments[0].toUpperCase()=="GET"||arguments[0].toUpperCase()=="POST"){d.transfer_mode=arguments[0].toUpperCase()}};this.set_async=function(){if(typeof arguments[0]=="boolean"){d.async=arguments[0]}};this.set_response_type=function(){if(arguments[0].toUpperCase()=="TEXT"||arguments[0].toUpperCase()=="XML"||arguments[0].toUpperCase()=="OBJECT"||arguments[0].toUpperCase()=="E4X"||arguments[0].toUpperCase()=="JSON"){d.response_type=arguments[0].toUpperCase()}};this.set_persistent_connection=function(){if(typeof arguments[0]=="boolean"){d.persistent_connection=arguments[0]}};this.set_use_cpaint_api=function(){if(typeof arguments[0]=="boolean"){d.use_cpaint_api=arguments[0]}};function g(){var k=new cpaint_call(0,d,this.version);return k.test_ajax_capability()}this.call=function(){var k=-1;if(d.persistent_connection==true&&__cpaint_stack[0]!=null){switch(__cpaint_stack[0].get_http_state()){case -1:k=0;c("no XMLHttpObject object to re-use for persistence, creating new one later",2);break;case 4:k=0;c("re-using the persistent connection",2);break;default:c("the persistent connection is in use - skipping this request",2)}}else{if(d.persistent_connection==true){k=0;__cpaint_stack[k]=new cpaint_call(k,d,this.version);c("no cpaint_call object available for re-use, created new one",2)}else{k=f;__cpaint_stack[k]=new cpaint_call(k,d,this.version);c("no cpaint_call object created new one",2)}}if(k!=-1){__cpaint_stack[k].set_client_callback(arguments[2]);if(d.proxy_url!=""){__cpaint_stack[k].call_proxy(arguments)}else{__cpaint_stack[k].call_direct(arguments)}f++;c("stack size: "+__cpaint_stack.length,2)}};var c=function(l,k){var m="[CPAINT Debug] ";if(k<1){m="[CPAINT Error] "}if(d.debugging>=k){alert(m+l)}}}var __cpaint_stack=new Array();var __cpaint_transformer=new cpaint_transformer();function cpaint_call(){var l=arguments[2];var f=new Array();f.debugging=arguments[1]["debugging"];f.proxy_url=arguments[1]["proxy_url"];f.transfer_mode=arguments[1]["transfer_mode"];f.async=arguments[1]["async"];f.response_type=arguments[1]["response_type"];f.persistent_connection=arguments[1]["persistent_connection"];f.use_cpaint_api=arguments[1]["use_cpaint_api"];var d=false;var g;var k=arguments[0];this.set_client_callback=function(){if(typeof arguments[0]=="function"){g=arguments[0]}};this.get_http_state=function(){var p=-1;if(typeof d=="object"){p=d.readyState}return p};this.call_direct=function(u){var q=u[0];var t=u[1];var p="";var r=0;if(q=="SELF"){q=document.location.href}if(f.use_cpaint_api==true){for(r=3;r<u.length;r++){if((typeof u[r]=="string"&&u[r]!=""&&u[r].search(/^\s+$/g)==-1)&&!isNaN(u[r])&&isFinite(u[r])){p+="&cpaint_argument[]="+encodeURIComponent(JSON.stringify(Number(u[r])))}else{p+="&cpaint_argument[]="+encodeURIComponent(JSON.stringify(u[r]))}}p+="&cpaint_response_type="+f.response_type;if(f.transfer_mode=="GET"){if(q.indexOf("?")!=-1){q=q+"&cpaint_function="+t+p}else{q=q+"?cpaint_function="+t+p}}else{p="cpaint_function="+t+p}}else{for(r=3;r<u.length;r++){if(r==3){p+=encodeURIComponent(u[r])}else{p+="&"+encodeURIComponent(u[r])}}if(f.transfer_mode=="GET"){q=q+p}}n();c('opening connection to "'+q+'"',1);d.open(f.transfer_mode,q,f.async);if(f.transfer_mode=="POST"){try{d.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(v){c("POST cannot be completed due to incompatible browser.  Use GET as your request method.",0)}}d.setRequestHeader("X-Powered-By","CPAINT v"+l+" :: http://sf.net/projects/cpaint");d.onreadystatechange=o;if(f.transfer_mode=="GET"){d.send(null)}else{c("sending query: "+p,1);d.send(p)}if(f.async==true){o()}};this.call_proxy=function(v){var u=f.proxy_url;var q=v[0];var t=v[1];var p="";var r=0;var y="cpaint_argument[]=";if(f.use_cpaint_api==false){y=""}for(r=3;r<v.length;r++){if(f.use_cpaint_api==true){if((typeof v[r]=="string"&&v[r]!=""&&v[r].search(/^\s+$/g)==-1)&&!isNaN(v[r])&&isFinite(v[r])){p+=encodeURIComponent(y+JSON.stringify(Number(v[r]))+"&")}else{p+=encodeURIComponent(y+JSON.stringify(v[r])+"&")}}else{p+=encodeURIComponent(y+v[r]+"&")}}if(f.use_cpaint_api==true){p+=encodeURIComponent("&cpaint_function="+t);p+=encodeURIComponent("&cpaint_responsetype="+f.response_type)}if(f.transfer_mode=="GET"){u+="?cpaint_remote_url="+encodeURIComponent(q)+"&cpaint_remote_query="+p+"&cpaint_remote_method="+f.transfer_mode+"&cpaint_response_type="+f.response_type}else{p="cpaint_remote_url="+encodeURIComponent(q)+"&cpaint_remote_query="+p+"&cpaint_remote_method="+f.transfer_mode+"&cpaint_response_type="+f.response_type}n();c('opening connection to proxy "'+u+'"',1);d.open(f.transfer_mode,u,f.async);if(f.transfer_mode=="POST"){try{d.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(x){c("POST cannot be completed due to incompatible browser.  Use GET as your request method.",0)}}d.setRequestHeader("X-Powered-By","CPAINT v"+l);d.onreadystatechange=o;if(f.transfer_mode=="GET"){d.send(null)}else{c("sending query: "+p,1);d.send(p)}if(f.async==false){o()}};this.test_ajax_capability=function(){return n()};var n=function(){var q=false;var r=false;if(f.persistent_connection==false){c("Using new connection object",1);r=true}else{c("Using shared connection object.",1);if(typeof d!="object"){c("Getting new persistent connection object.",1);r=true}}if(r==true){try{d=new XMLHttpRequest()}catch(u){try{d=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{d=new ActiveXObject("Microsoft.XMLHTTP")}catch(p){d=null}}}if(!d){c("Could not create connection object",0)}else{q=true}}if(d.readyState!=4){d.abort()}return q};var o=function(){var p=null;if(d.readyState==4&&d.status==200){c(d.responseText,1);c("using response type "+f.response_type,2);switch(f.response_type){case"XML":c(d.responseXML,2);p=__cpaint_transformer.xml_conversion(d.responseXML);break;case"OBJECT":p=__cpaint_transformer.object_conversion(d.responseXML);break;case"TEXT":p=__cpaint_transformer.text_conversion(d.responseText);break;case"E4X":p=__cpaint_transformer.e4x_conversion(d.responseText);break;case"JSON":p=__cpaint_transformer.json_conversion(d.responseText);break;default:c("invalid response type '"+response_type+"'",0)}if(p!=null&&typeof g=="function"){g(p,d.responseText)}m()}else{if(d.readyState==4&&d.status!=200){c("invalid HTTP response code '"+Number(d.status)+"'",0)}}};var m=function(){if(typeof k=="number"&&__cpaint_stack[k]&&f.persistent_connection==false){__cpaint_stack[k]=null}};var c=function(q,p){var r="[CPAINT Debug] ";if(f.debugging<1){r="[CPAINT Error] "}if(f.debugging>=p){alert(r+q)}}}function cpaint_transformer(){this.object_conversion=function(f){var g=new cpaint_result_object();var l=0;var n="";if(typeof f=="object"&&f!=null){for(l=0;l<f.childNodes.length;l++){if(f.childNodes[l].nodeType==1){n=f.childNodes[l].nodeName;break}}var m=f.getElementsByTagName(n);g[n]=new Array();for(l=0;l<m.length;l++){var k=c(m[l]);k.id=m[l].getAttribute("id");g[n].push(k)}}else{debug("received invalid XML response",0)}return g};this.xml_conversion=function(f){return f};this.text_conversion=function(f){return d(f)};this.e4x_conversion=function(f){f=f.replace(/^\<\?xml[^>]+\>/,"");return new XML(f)};this.json_conversion=function(f){return JSON.parse(f)};var c=function(n){var f=new cpaint_result_object();var g="";var l=0;var m=0;if(n.hasChildNodes()==true){for(l=0;l<n.childNodes.length;l++){g=n.childNodes[l].nodeName;g=g.replace(/[^a-zA-Z0-9_]*/g,"");if(typeof f[g]!="object"){f[g]=new Array()}if(n.childNodes[l].nodeType==1){var k=c(n.childNodes[l]);for(m=0;m<n.childNodes[l].attributes.length;m++){k.set_attribute(n.childNodes[l].attributes[m].nodeName,n.childNodes[l].attributes[m].nodeValue)}f[g].push(k)}else{if(n.childNodes[l].nodeType==3){f.data=d(String(n.firstChild.data))}}}}return f};var d=function(n){var p="";var m=0;var o=0;var l=0;var g=0;var f=0;var k=0;while(m<n.length){if(n.charAt(m)=="\\"&&n.charAt(m+1)=="u"){f=0;for(j=2;j<6;j+=1){k=parseInt(n.charAt(m+j),16);if(!isFinite(k)){break}f=f*16+k}p+=String.fromCharCode(f);m+=6}else{p+=n.charAt(m);m++}}if(p!=""&&p.search(/^\s+$/g)==-1&&!isNaN(p)&&isFinite(p)){p=Number(p)}return p}}function cpaint_result_object(){this.id=0;this.data="";var c=new Array();this.find_item_by_id=function(){var d=null;var g=arguments[0];var k=arguments[1];var f=0;if(this[g]){for(f=0;f<this[g].length;f++){if(this[g][f].get_attribute("id")==k){d=this[g][f];break}}}return d};this.get_attribute=function(){var d=null;var f=arguments[0];if(typeof c[f]!="undefined"){d=c[f]}return d};this.set_attribute=function(){c[arguments[0]]=arguments[1]}}Array.prototype.______array="______array";var JSON={org:"http://www.JSON.org",copyright:"(c)2005 JSON.org",license:"http://www.crockford.com/JSON/license.html",stringify:function(d){var o,m,f,n="",g;var k=true;switch(typeof d){case"object":if(d){if(d.______array=="______array"){for(m in d){if(m!="______array"&&(isNaN(m)||!isFinite(m))){k=false;break}}if(k==true){for(m=0;m<d.length;++m){if(typeof d[m]!="undefined"){g=this.stringify(d[m]);if(n){n+=","}n+=g}else{n+=",null"}}return"["+n+"]"}else{for(m in d){if(m!="______array"){g=d[m];if(typeof g!="undefined"&&typeof g!="function"){g=this.stringify(g);if(n){n+=","}n+=this.stringify(m)+":"+g}}}return"{"+n+"}"}}else{if(typeof d.toString!="undefined"){for(m in d){g=d[m];if(typeof g!="undefined"&&typeof g!="function"){g=this.stringify(g);if(n){n+=","}n+=this.stringify(m)+":"+g}}return"{"+n+"}"}}}return"null";case"number":return isFinite(d)?String(d):"null";case"string":f=d.length;n='"';for(m=0;m<f;m+=1){o=d.charAt(m);if(o>=" "){if(o=="\\"||o=='"'){n+="\\"}n+=o}else{switch(o){case"\b":n+="\\b";break;case"\f":n+="\\f";break;case"\n":n+="\\n";break;case"\r":n+="\\r";break;case"\t":n+="\\t";break;default:o=o.charCodeAt();n+="\\u00"+Math.floor(o/16).toString(16)+(o%16).toString(16)}}}return n+'"';case"boolean":return String(d);default:return"null"}},parse:function(t){var g=0;var c=" ";function r(u){throw {name:"JSONError",message:u,at:g-1,text:t}}function m(){c=t.charAt(g);g+=1;return c}function o(){while(c!=""&&c<=" "){m()}}function q(){var y,z="",x,v;if(c=='"'){outer:while(m()){if(c=='"'){m();return z}else{if(c=="\\"){switch(m()){case"b":z+="\b";break;case"f":z+="\f";break;case"n":z+="\n";break;case"r":z+="\r";break;case"t":z+="\t";break;case"u":v=0;for(y=0;y<4;y+=1){x=parseInt(m(),16);if(!isFinite(x)){break outer}v=v*16+x}z+=String.fromCharCode(v);break;default:z+=c}}else{z+=c}}}}r("Bad string")}function n(){var u=[];if(c=="["){m();o();if(c=="]"){m();return u}while(c){u.push(f());o();if(c=="]"){m();return u}else{if(c!=","){break}}m();o()}}r("Bad array")}function k(){var u,v={};if(c=="{"){m();o();if(c=="}"){m();return v}while(c){u=q();o();if(c!=":"){break}m();v[u]=f();o();if(c=="}"){m();return v}else{if(c!=","){break}}m();o()}}r("Bad object")}function p(){var v,u=[];if(c=="<"){m();o();if(c==">"){m();return u}while(c){v=q();o();if(c!=":"){break}m();u[v]=f();o();if(c==">"){m();return u}else{if(c!=","){break}}m();o()}}r("Bad associative array")}function l(){var x="",u;if(c=="-"){x="-";m()}while(c>="0"&&c<="9"){x+=c;m()}if(c=="."){x+=".";while(m()&&c>="0"&&c<="9"){x+=c}}if(c=="e"||c=="E"){x+="e";m();if(c=="-"||c=="+"){x+=c;m()}while(c>="0"&&c<="9"){x+=c;m()}}u=+x;if(!isFinite(u)){r("Bad number")}else{return u}}function d(){switch(c){case"t":if(m()=="r"&&m()=="u"&&m()=="e"){m();return true}break;case"f":if(m()=="a"&&m()=="l"&&m()=="s"&&m()=="e"){m();return false}break;case"n":if(m()=="u"&&m()=="l"&&m()=="l"){m();return null}break}r("Syntax error")}function f(){o();switch(c){case"{":return k();case"[":return n();case"<":return p();case'"':return q();case"-":return l();default:return c>="0"&&c<="9"?l():d()}}return f()}};var dbArray=new Array();var dbreport;var recordcount;var coloumcount;var cp=new cpaint();cp.set_debug(false);cp.set_response_type("XML");var imgurl="http://www.yomansports.com/images";var sslbaseurl="https://www.yomansports.com";var baseurl="http://www.yomansports.com";var tmburl="http://th.yomansports.com";var streaming_base_url="http://stream.yomansports.com";var bsitemimg_fee="0.30";var dbLloaded=true;function executeDB(d){var c=baseurl+"ajax/myphpajax.php";cp.call(c,"executeDB",return_value,d)}function return_value(c){dbreport=c.getElementsByTagName("dbreport").item(0).firstChild.data;if(dbreport=="1"){recordcount=c.getElementsByTagName("recordcount").item(0).firstChild.data;coloumcount=c.getElementsByTagName("coloumcount").item(0).firstChild.data;for(i=0;i<recordcount;i++){dbArray[i]=new Array(recordcount);for(ii=0;ii<coloumcount;ii++){dbArray[i][ii]=c.getElementsByTagName("dbvalue"+i+ii).item(0).firstChild.data}}}dbLoaded=false}function insertInToTable(g,l,k,f){try{var c=document.getElementById(g).rows[l].cells;c[k].innerHTML=f;return false}catch(d){return false}}function txtBoxValidation(f,g,d){try{me=document.getElementById(f);if(me.value==""){me.style.background=d;me.setFocus;return false}else{me.style.background=g;me.setFocus;return true}}catch(c){return"Err"}}function hideMe(c){document.getElementById(c).style.display="none"}function showMe(c){document.getElementById(c).style.display="block"}function directMyvalueto(c,d){document.getElementById(d).value=c}function show_cloudtags(){document.getElementById("cloud_tags").style.display="block"}function close_cloudtags(){document.getElementById("loader_keyword").style.display="none";document.getElementById("cloud_tags").style.display="none"}function related_news_tags(c){document.getElementById("loader_keyword").style.display="block";get_related_news_result("get_related_news_result.php",c)}function closeAllCpPopups(){close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();close_cpsetting_box()}function showHomepageControl(){formObj=document.getElementById("setHomePageForm");postUrl="login_operations.php";$(formObj).request({action:postUrl,method:"post",parameters:{actionType:"POPULATE_HOMEPAGE_DATA"},onSuccess:handleActionResponsePopulateHomedata})}function handleActionResponsePopulateHomedata(c){data=JSON.parse(c.responseText);if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){if(data.MESSAGE!=""){$("HEADER_SET_HOMEPAGE").style.display="block"}}}}function populateHomepageData(d){var c=d.split("|");if(c[0]=="homePage"){document.getElementById("control_homePage").checked=true}else{document.getElementById("profile_homePageControl").style.display="block";document.getElementById("control_homePage"+c[0]).checked=true}if(c[1]==1){document.getElementById("HomepageMyBlog").checked=true}if(c[2]==1){document.getElementById("HomepageMyStation").checked=true}if(c[3]==1||c[14]==0){document.getElementById("HomepageMyFavVideo").checked=true}if(c[4]==1||c[16]==0){document.getElementById("HomepageMyVideos").checked=true}if(c[5]==1){document.getElementById("HomepageMyGrp").checked=true}if(c[6]==1){document.getElementById("HomepageMyFavPic").checked=true}if(c[7]==1||c[15]==0){document.getElementById("HomepageMyPicture").checked=true}if(c[8]==1){document.getElementById("HomepageMyFrnd").checked=true}if(c[9]==1){document.getElementById("HomepageMycomment").checked=true}if(c[10]==1||c[17]==0){document.getElementById("HomepageMyEvents").checked=true}if(c[11]==1){document.getElementById("HomepageMyPhotoset").checked=true}if(c[12]==1){document.getElementById("HomepageMySubs").checked=true}if(c[13]==1){document.getElementById("HomepageMyTrv").checked=true}if(c[14]==1){document.getElementById("HomepageTopVideos").checked=true}if(c[15]==1){document.getElementById("HomepageTopPic").checked=true}if(c[16]==1){document.getElementById("HomepageArtCat").checked=true}if(c[17]==1){document.getElementById("HomepagePopEvent").checked=true}}function close_homePageControl(){reset_homePage_control();document.getElementById("homePageControlPopup").style.display="none"}function showProfileContentHome(c){if(document.getElementById(c).value!="homePage"){document.getElementById("profile_homePageControl").style.display="block";document.getElementById("HomepageMyBlog").checked=false;document.getElementById("HomepageMyStation").checked=false;document.getElementById("HomepageMyFavVideo").checked=false;document.getElementById("HomepageMyVideos").checked=false;document.getElementById("HomepageMyGrp").checked=false;document.getElementById("HomepageMyFavPic").checked=false;document.getElementById("HomepageMyPicture").checked=false;document.getElementById("HomepageMyFrnd").checked=false;document.getElementById("HomepageMycomment").checked=false;document.getElementById("HomepageMyEvents").checked=false;document.getElementById("HomepageMySubs").checked=false;document.getElementById("HomepageMyPhotoset").checked=false;document.getElementById("HomepageMyTrv").checked=false;document.getElementById("HomepageTopVideos").checked=true;document.getElementById("HomepageTopPic").checked=true;document.getElementById("HomepageArtCat").checked=true;document.getElementById("HomepagePopEvent").checked=true}else{document.getElementById("profile_homePageControl").style.display="none";document.getElementById("HomepageMyBlog").checked=false;document.getElementById("HomepageMyStation").checked=false;document.getElementById("HomepageMyFavVideo").checked=false;document.getElementById("HomepageMyVideos").checked=false;document.getElementById("HomepageMyGrp").checked=false;document.getElementById("HomepageMyFavPic").checked=false;document.getElementById("HomepageMyPicture").checked=false;document.getElementById("HomepageMyFrnd").checked=false;document.getElementById("HomepageMycomment").checked=false;document.getElementById("HomepageMyEvents").checked=false;document.getElementById("HomepageMySubs").checked=false;document.getElementById("HomepageMyPhotoset").checked=false;document.getElementById("HomepageMyTrv").checked=false}}function reset_homePage_control(){document.getElementById("control_homePage").checked=true;document.getElementById("HomepageMyBlog").checked=false;document.getElementById("HomepageMyStation").checked=false;document.getElementById("HomepageMyFavVideo").checked=false;document.getElementById("HomepageMyVideos").checked=false;document.getElementById("HomepageMyGrp").checked=false;document.getElementById("HomepageMyFavPic").checked=false;document.getElementById("HomepageMyPicture").checked=false;document.getElementById("HomepageMyFrnd").checked=false;document.getElementById("HomepageMycomment").checked=false;document.getElementById("HomepageMyEvents").checked=false;document.getElementById("HomepageMySubs").checked=false;document.getElementById("HomepageMyPhotoset").checked=false;document.getElementById("HomepageMyTrv").checked=false;document.getElementById("profile_homePageControl").style.display="none";var f=document.getElementById("AllchannelUser").value;var g=f.split("|");var d=g.length;var c;for(c=0;c<d;c++){document.getElementById("control_homePage"+g[c]).checked=false}}function show_loader(){get_related_news("get_related_news.php",document.getElementById("data_title").value,document.getElementById("data_desc").value)}function get_related_news(k,d,c){var g=false;var f=new XMLHttpRequest();if(window.XMLHttpRequest){f.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){f.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}f.xmlHttpReq.open("POST",k,true);f.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.xmlHttpReq.onreadystatechange=function(){if(f.xmlHttpReq.readyState==4){updatepagerelatednews(f.xmlHttpReq.responseText)}};f.xmlHttpReq.send(getquerystringrelatednews(d,c))}function updatepagerelatednews(d){document.getElementById("small_loader").innerHTML="";document.getElementById("cloud").innerHTML="";var c=d.split("|");document.getElementById("small_loader").innerHTML="("+c[0]+")";document.getElementById("cloud").innerHTML=c[1]}function getquerystringrelatednews(d,c){var f=/^[0-9]+$/;qstr="title="+escape(d)+"&desc="+escape(c);return qstr}function update_online_member_refresh(){var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}var f=baseurl+"/update_online_members_refresh.php";c.xmlHttpReq.open("POST",f,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){handleOnlineResponseRefresh(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(f)}function handleOnlineResponseRefresh(c){}function updateOnlineMembers(){var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}var f=baseurl+"/update_online_members.php";c.xmlHttpReq.open("POST",f,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){handleOnlineResponse(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send("x");setInterval("updateOnlineMembers()",1000*60*20)}function handleOnlineResponse(c){}function showOnlineFriendMember(){var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}var f=baseurl+"/show_online_friends.php?actionType=";c.xmlHttpReq.open("POST",f,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){handleOnlineFreindResponse(c.xmlHttpReq.responseText);setTimeout(function(){showOnlineFriendMember()},5000)}};c.xmlHttpReq.send(f)}function handleOnlineFreindResponse(d){if(d!=""){var c=d.split("|");if(c[0]!="0"){document.getElementById("onlineImg").className="cp_right_online"}else{document.getElementById("onlineImg").className="cp_right_offline"}if(c[1]!=""){close_instant_msg_box();close_alert_box();soundManager.play("online",0,1);soundManager.setVolume("online",60);document.getElementById("online_alerts_div").style.display="block";document.getElementById("online_alert_message_div").innerHTML=c[1];setTimeout("close_online_alert_box()",30000)}}else{return false}}function show_all_friends(){close_inbox_text();close_national_event();close_channel_list();closeBroadcastBox();closeNotifyAlerts();close_help_box();close_alert_box();close_instant_msg_box();close_gen_chat_box();document.getElementById("homePageControlPopup").style.display="none";var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}var f=baseurl+"/show_online_friends.php?actionType=AllFriends";c.xmlHttpReq.open("POST",f,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){handleAllOnlineFreindResponse(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(f)}function handleAllOnlineFreindResponse(d){document.getElementById("online_alerts_div").style.display="block";var c=d.split("|");if(c[1]!=0){document.getElementById("onlineImg").className="cp_right_online"}else{document.getElementById("onlineImg").className="cp_right_offline"}if(c[0]!=""){document.getElementById("online_alert_message_div").innerHTML=c[0];setTimeout("close_online_alert_box()",30000)}else{return false}}function close_online_alert_box(c){document.getElementById("online_alert_message_div").innerHTML="";document.getElementById("online_alerts_div").style.display="none"}function send_instant_message(c,d){$("ajxLoader_chat").show();$(c).request({action:d,method:"post",parameters:{actionType:"SEND_INST_MSG"},onSuccess:msgsentresp,onException:handleChatError})}function msgsentresp(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){close_instant_msg_box();$("ajxLoader_chat").hide()}else{$("chatErr").innerHTML=data.MESSAGE;$("ajxLoader_chat").hide()}}function handleChatError(c){document.getElementById("chatErr").innerHTML="Error processing: Please try later.";$("ajxLoader_chat").hide()}function show_msg_popup(c){close_online_alert_box();close_alert_box();close_cpsetting_box();document.getElementById("instant_message_div").style.display="block";document.getElementById("msgto").value=c;document.getElementById("instmsg").focus()}function close_instant_msg_box(){document.getElementById("chatErr").innerHTML="";document.getElementById("instant_msg_frm").reset();document.getElementById("instant_message_div").style.display="none"}function open_chat_window_onrequest(c,d){document.getElementById("alert_message_div").innerHTML="";document.getElementById("alerts_div").style.display="none";window.open(""+baseurl+"/widget_files/groupChatPreloader.php?flashVar="+d,"","width=305,height=560,toolbar=0,location=0,scrollbars=0,directories=0,status=1,menubar=0,resizable=0")}function close_alert_box(){document.getElementById("alert_message_div").innerHTML="";document.getElementById("alerts_div").style.display="none"}function checkUserAlert(){var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}var f=baseurl+"/check_user_alert.php";c.xmlHttpReq.open("POST",f,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){handleUserAlertsResponse(c.xmlHttpReq.responseText);setTimeout(function(){checkUserAlert()},5000)}};c.xmlHttpReq.send(f)}function handleUserAlertsResponse(c){if(c==""){return false}else{close_instant_msg_box();close_online_alert_box();close_cpsetting_box();soundManager.play("online",0,1);soundManager.setVolume("online",60);document.getElementById("alerts_div").style.display="block";document.getElementById("alert_message_div").innerHTML=c;setTimeout("close_user_alerts_box()",30000)}}function close_user_alerts_box(){document.getElementById("alert_message_div").innerHTML="";document.getElementById("alerts_div").style.display="none"}function show_all_alerts(){close_inbox_text();close_national_event();close_channel_list();closeBroadcastBox();closeNotifyAlerts();close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();close_cpsetting_box();document.getElementById("homePageControlPopup").style.display="none";var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}var f=baseurl+"/check_user_alert.php?actionType=All_ALERTS";c.xmlHttpReq.open("POST",f,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){handleAllalertsResponse(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send("x")}function handleAllalertsResponse(c){document.getElementById("alerts_div").style.display="block";document.getElementById("alert_message_div").innerHTML=c;setTimeout("close_user_alerts_box()",30000)}function print_invoice(c){window.frames[c].print()}function ShowChatWindow(k,c,g,d){var f="index.php?uname="+k+"&gName="+c+"&gId="+g+"&urlKey="+d;document.getElementById("chatFrame").src=f}function show_upload_div(){document.getElementById("createGroupPopUPStep2").style.display="block";document.getElementById("browse_div").style.display="block";document.getElementById("upload_vdo").style.display="block";document.getElementById("grp_pic_frame").style.height=50+"px";document.getElementById("grp_pic_frame").style.width=50+"px";location.href="#cropImgFocus"}function close_img_crop(){document.getElementById("createGroupPopUPStep2").style.display="none"}function hide_upload_div(){document.getElementById("createGroupPopUPStep2").style.display="none";document.getElementById("change_grpImg_div").style.display="none"}function show_detail_welcome(){document.getElementById("welcom_truncate").style.display="none";document.getElementById("welcomwithout_truncate").style.display="block"}function hide_detail_welcome(){document.getElementById("welcom_truncate").style.display="block";document.getElementById("welcomwithout_truncate").style.display="none"}function show_grpvdo_detail_welcome(){document.getElementById("welcom_grpvdo_truncate").style.display="none";document.getElementById("welcomgrpvdo_without_truncate").style.display="block"}function hide_grpvdo_detail_welcome(){document.getElementById("welcom_grpvdo_truncate").style.display="block";document.getElementById("welcomgrpvdo_without_truncate").style.display="none"}function show_detail_msgAll(d,c){document.getElementById(d).style.display="none";document.getElementById(c).style.display="block"}function checkAll(c){for(i=0;i<6;i++){if(c){document.forms.thisone.chbx[i].checked=true}else{document.forms.thisone.chbx[i].checked=false}}}function resetmyblog(){var c=FCKeditorAPI.GetInstance("body");c.SetHTML("");document.getElementById("title").value="";document.getElementById("tag").value="";document.getElementById("channel").value="";document.getElementById("blog_pic").value="";document.getElementById("blog_vdo").value="";document.getElementById("replyDisable").value="";document.getElementById("privacy").value=""}function show_add_report_event(d,c){document.getElementById("event_id").value=d;document.getElementById("owner_id").value=c;document.getElementById("report_event_div").style.display="block";document.getElementById("repotdivErr").innerHTML=""}function show_national_event(){document.getElementById("national_event").style.display="block";close_login_text();close_channel_list();close_gen_chat_box()}function close_edit_event_div(){document.editevent.reset();document.getElementById("edit_event").style.display="none"}function validate_edit_img(){var c=document.getElementById("edit_event_img").value;if(c==""){alert("Please provide event image.");document.getElementById("edit_event_img").focus();return false}var d=c.indexOf(".jpg");if(d>=0){}else{alert("Please Select A Jpg image for an event.");document.getElementById("edit_event_img").focus();return false}}function show_edit_event_div(c){getEdiTeventData(c);document.getElementById("eid").value=c;document.getElementById("edit_event").style.display="block";document.getElementById("divErr2").innerHTML=""}function close_add_eventdiv(){document.add_event.reset();document.getElementById("event").style.display="none";return false}function show_add_events_div(c){document.getElementById("divErr1").innerHTML="";document.getElementById("event").style.display="block";document.getElementById("chid_add").value=c}function show_channel_list(){close_inbox_text();close_national_event();cancel_block_user_friend();closeBroadcastBox();closeNotifyAlerts();close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();close_cpsetting_box();document.getElementById("homePageControlPopup").style.display="none";document.getElementById("my_channel_list").style.display="block"}function close_channel_list(){document.getElementById("my_channel_list").style.display="none"}function show_email_confirmation_popup(){document.getElementById("email_verification_div").style.display="block"}function close_email_confirmation_popup(){document.getElementById("email_verification_div").style.display="none";show_all_alerts()}function show_email_confirmverify_popup(){document.getElementById("email_confirmation_div").style.display="block"}function close_email_confirmverify_popup(){document.getElementById("email_confirmation_div").style.display="none"}function close_update_msg_popup(){document.getElementById("update_profile_msg_div").style.display="none"}function show_login_text(d,c){if(c=="popup"){document.getElementById("login_param").value=d;document.getElementById("login_page_url").value=""}else{if(c=="page"){document.getElementById("login_param").value="";document.getElementById("login_page_url").value=d}}document.getElementById("login_text").style.display="block";document.getElementById("ajxLoader").style.display="none";document.getElementById("logdivErr").innerHTML="";document.getElementById("name").focus()}function close_login_text(){document.getElementById("login_text").style.display="none";document.getElementById("name").value="";document.getElementById("password").value="";document.getElementById("login_param").value="";document.getElementById("login_page_url").value="";document.getElementById("ajxLoader").style.display="none"}function close_national_event(){document.getElementById("national_event").style.display="none";document.getElementById("ajxLoader").style.display="none"}function close_event_div(){document.getElementById("divErr1").innerHTML="";reset_event();document.getElementById("event").style.display="none"}function reset_event(){reloadCaptcha();document.getElementById("capcha").value="";document.getElementById("divErr1").innerHTML=""}function close_event_reply_div(){document.getElementById("eventReplyErrDiv").innerHTML="";reset_event_reply();document.getElementById("event_reply").style.display="none"}function reset_event_reply(){reloadCaptcha2();document.getElementById("capcha").value="";document.getElementById("eventReplyErrDiv").innerHTML=""}function show_blog_text(c){document.getElementById("comment_box").style.display="block";document.getElementById("comment_capcha").value="";document.getElementById("divErr2").innerHTML="";location.href="#blog_cmt";document.getElementById("body_comment").value="";document.getElementById("ajxLoader").style.display="none";document.getElementById("responesto_id").value=c}function close_blog_text(){document.getElementById("comment_box").style.display="none";document.getElementById("ajxLoader").style.display="none"}function show_fck_div(){var d=document.location.href;var c=d.substr((d.length-10),d.length);if(c=="#Fckeditor"){document.location.href=d}else{document.location.href=d+"#Fckeditor"}}function focus_submit_site(c){if(c.keyCode==13){document.getElementById("submit_site").focus()}}function show_inbox_text(){document.getElementById("inbox").style.display="block"}function resetEditor(){var c=FCKeditorAPI.GetInstance("details");c.SetHTML("");document.getElementById("subject").value="";document.getElementById("receiver").value="";document.getElementById("fm-buddyname").value=""}function checkall_function(){var c=document.getElementById("countervalue").value;var d=document.getElementById("checkall").value;for(i=0;i<c;i++){if(d==""){document.getElementById("delete"+i).checked=true}else{document.getElementById("delete"+i).checked=false}}if(d==""){document.getElementById("checkall").value="checked"}else{document.getElementById("checkall").value=""}}function showcompose_mail(){document.getElementById("mail_box").style.display="block";document.getElementById("subject").focus();return false}function send_email(c){document.getElementById("email_to").value=c;document.getElementById("DialogBox").style.display="block";document.getElementById("subject").focus();if(c=="all"){document.getElementById("mail_header2").style.display="none";document.getElementById("mail_header1").style.display=""}else{document.getElementById("mail_header2").style.display="";document.getElementById("mail_header1").style.display="none"}}function cancel_email(){document.getElementById("email_to").value="";document.getElementById("DialogBox").style.display="none";document.getElementById("mail_header2").style.display="none";document.getElementById("mail_header1").style.display="none";document.getElementById("subject").value="";document.getElementById("send_mail").value=""}function showmessage(){if(document.getElementById("subject").value.replace(/^\s*|\s*$/g,"")==""){alert("Please Provide the Subject for Message!");document.getElementById("subject").focus();return false}if(document.getElementById("send_mail").value.replace(/^\s*|\s*$/g,"")==""){alert("Please Provide Message!");document.getElementById("send_mail").focus();return false}}function show_add_report(c){document.getElementById("eid").value=c;document.getElementById("event_reply").style.display="block";document.getElementById("eventReplyErrDiv").innerHTML="";document.getElementById("add_comment").reset();document.getElementById("add_comments_event").focus()}function show_request_div(c){close_login_text();document.getElementById("request_uid").value=c;document.getElementById("enable_requestdiv").style.display="block";document.getElementById("request_comment").focus()}function cancel_evnt_report(){document.getElementById("report_event_div").style.display="none";document.getElementById("event_report_add").reset()}function remove_member(c,d,f,g){if(confirm("Do you really want to remove this member?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?&gid="+d+"&MID="+c+"&page="+f+"&action=reject";document.getElementById("edit_group_members").submit()}else{g.checked=false;return false}}function approve_member(c,d,f,g){if(confirm("Do you really want to approve this member?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?&gid="+d+"&MID="+c+"&page="+f+"&action=approved";document.getElementById("edit_group_members").submit()}else{g.checked=false;return false}}function ban_member(c,d,f,g){if(g.checked==true){if(confirm("Do you really want to ban this member?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?&gid="+d+"&MID="+c+"&page="+f+"&action=ban";document.getElementById("edit_group_members").submit()}else{g.checked=false;return false}}else{if(confirm("Do you really want to active this member?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?&gid="+d+"&MID="+c+"&page="+f+"&action=no_ban";document.getElementById("edit_group_members").submit()}else{g.checked=false;return false}}}function mem_permissions_mod(c,d,f,g){if(g.checked==true){if(confirm("Do you really want to assign this member as Moderator?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?&gid="+d+"&MID="+c+"&page="+f+"&action=moderator";document.getElementById("edit_group_members").submit()}else{g.checked=false;return false}}else{if(confirm("Do you really want to relieve this member from Moderator?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?&gid="+d+"&MID="+c+"&page="+f+"&action=no_moderator";document.getElementById("edit_group_members").submit()}else{g.checked=true;return false}}}function show_email_popup(){document.getElementById("email_friend").style.display="block"}function show_email_blog_popup(c){document.getElementById("email_friend").style.display="block";document.getElementById("blog_id").value=c}function closeEmailDiv(){document.getElementById("email_friend").style.display="none";document.getElementById("email_id").value="";document.getElementById("err_email").innerHTML=""}function show_msg_div(){document.getElementById("channel_mail").style.display="block";var c=document.getElementById("channel_list").offsetHeight;document.getElementById("box3").style.height=(280+c)+"px"}function close_compose_div(){document.getElementById("divErr1").innerHTML="";document.getElementById("channel_mail").style.display="none";document.getElementById("send_email").reset();var c=FCKeditorAPI.GetInstance("message");c.SetHTML("")}function featured_photo(c){if(c=="no"){if(confirm("Do you really want to make this photo featured?")){return true}else{return false}}else{if(confirm("Do you really want to remove this photo from featured?")){return true}else{return false}}}function pic_permissions_rem(){if(confirm("Do you really want to remove this picture ?")){return true}else{return false}}function close_ind_event(){document.getElementById("event_reply").style.display="none"}function show_event_report(d,c){document.getElementById("reply_report_add").reset();document.getElementById("OID").value=d;document.getElementById("RID").value=c;document.getElementById("report_comment_div").style.display="block";document.getElementById("repotreplydivErr").innerHTML="";document.getElementById("report_option").focus()}function cancel_evnt_replyreport(){document.getElementById("report_comment_div").style.display="none";document.getElementById("report_comment").value=""}function cancel_evnt_replyrpt(){document.getElementById("repotreplydivErr").innerHTML="";document.getElementById("report_comment_div").style.display="none"}function decline_group(){document.getElementById("DialogBox").style.display="none"}function feature_video(f,d,c){if(d=="yes"){if(confirm("Do you really want to make this "+c+" featured?")){document.location.href=f}else{document.location.reload()}}else{if(confirm("Do you really want to remove this "+c+" from featured?")){document.location.href=f}else{document.location.reload()}}}function featured_video(c){if(c=="no"){if(confirm("Do you really want to make this video featured?")){return true}else{return false}}else{if(confirm("Do you really want to remove this video from featured?")){return true}else{return false}}}function close_request_div(){document.getElementById("divErr1").innerHTML="";reset_enable_request_form();document.getElementById("enable_requestdiv").style.display="none";document.getElementById("status").style.display="none"}function reset_enable_request_form(){reloadCaptcha();document.getElementById("capcha").value="";document.getElementById("divErr1").innerHTML="";document.getElementById("user_request_cooment").reset()}function cancel_enable_request(){document.getElementById("enable_requestdiv").style.display="none"}function vdo_permissions_rem(){if(confirm("Do you really want to remove this video ?")){return true}else{return false}}function tpc_permissions_rem(){if(confirm("Do you really want to remove this topic ?")){return true}else{return false}}function event_permissions_rem(){if(confirm("Do you really want to remove this event ?")){return true}else{return false}}function show_blogpreview(){document.getElementById("divErr1").innerHTML="";document.getElementById("divErr1").style.display="none";document.getElementById("view").style.display="block";var f=FCKeditorAPI.GetInstance("body");var c=f.EditorDocument.body.innerHTML;document.getElementById("preview_add_blog").innerHTML=c;var d=document.getElementById("preview_add_blog").offsetHeight}function show_blogpreview_edit(){document.getElementById("divErr1").innerHTML="";document.getElementById("divErr1").style.display="none";document.getElementById("view").style.display="block";var f=FCKeditorAPI.GetInstance("blog_edit_body");var c=f.EditorDocument.body.innerHTML;document.getElementById("preview_edit").innerHTML=c;var d=document.getElementById("preview_edit").offsetHeight}function cancel_addblog(){document.getElementById("add_blog_popup").style.display="none";document.getElementById("divErr1").innerHTML="";reset_addblog()}function cancel_editblog(){document.getElementById("edit_blog_popup").style.display="none";document.getElementById("divErr1").innerHTML="";reset_editblog()}function reset_editblog(){document.getElementById("edit_title").value="";document.getElementById("edit_tag").value="";document.getElementById("blog_chanl").value="";var d=FCKeditorAPI.GetInstance("blog_edit_body");d.SetHTML("");document.getElementById("blog_edit_body").value="";document.getElementById("replyDisable").checked=false;for(var c=0;c<document.getElementById("channel_blog").options.length;c++){document.getElementById("channel_blog").options[c].selected=false}if(document.getElementById("num_pic").value!=0){for(var c=0;c<document.getElementById("picture").options.length;c++){document.getElementById("picture").options[c].selected=false}}if(document.getElementById("num_vdo").value!=0){for(var c=0;c<document.getElementById("video").options.length;c++){document.getElementById("video").options[c].selected=false}}document.getElementById("imgCaptcha2").src="captcha.php?forsec=editblog&"+Math.random();document.getElementById("edit_blog_captcha").value="";document.getElementById("divErr1").innerHTML="";document.getElementById("view").style.display="none";document.getElementById("divErr1").style.display="none"}function reset_addblog(){document.getElementById("blog_title").value="";document.getElementById("blog_chanl").value="";document.getElementById("view").style.display="none";document.getElementById("blog_tag").value="";document.getElementById("captcha").value="";var d=FCKeditorAPI.GetInstance("body");d.SetHTML("");document.getElementById("body").value="";document.getElementById("replyDisable").checked=false;for(var c=0;c<document.getElementById("channel_blog").options.length;c++){document.getElementById("channel_blog").options[c].selected=false}if(document.getElementById("num_pic").value!=0){for(var c=0;c<document.getElementById("picture").options.length;c++){document.getElementById("picture").options[c].selected=false}}if(document.getElementById("num_vdo").value!=0){for(var c=0;c<document.getElementById("video").options.length;c++){document.getElementById("video").options[c].selected=false}}document.getElementById("imgCaptcha2").src="captcha.php?forsec=addblog&"+Math.random();document.getElementById("divErr1").innerHTML="";document.getElementById("divErr1").style.display="none"}function show_add_blog_div(f){document.getElementById("add_blog_popup").style.display="block";document.getElementById("blog_title").focus();document.getElementById("view").style.display="none";document.getElementById("preview_add_blog").innerHTML="";if(f!=""){document.getElementById("blog_chanl").value=f;var d=document.getElementById("channel_blog");for(var c=0;c<d.options.length;c++){if(d.options[c].text==f){d.options[c].selected=true}}}}function show_edit_blog_div(c){getEditBlogData(c);document.getElementById("edit_blog_popup").style.display="block";document.getElementById("edit_title").focus();document.getElementById("view").style.display="none";document.getElementById("preview_edit").innerHTML=""}function search_selection(c){document.getElementById("photosearch").style.display="";document.getElementById("textsearch").style.display="";if(c.value=="search_videos"){parent.location.hash="sv"}if(c.value=="search_pictures"){parent.location.hash="sp"}if(c.value=="search_users"){parent.location.hash="su"}if(c.value=="search_result"){document.getElementById("photosearch").style.display="none";document.getElementById("textsearch").style.display="block"}}function text_search_selection(c){if(c.value=="search_group"){parent.location.hash="sg"}if(c.value=="search_gevent"){parent.location.hash="sge"}if(c.value=="search_gereply"){parent.location.hash="sger"}if(c.value=="search_gtopic"){parent.location.hash="sgt"}if(c.value=="search_gtreply"){parent.location.hash="sgtr"}if(c.value=="search_forum"){parent.location.hash="sf"}if(c.value=="search_ftopic"){parent.location.hash="sft"}if(c.value=="search_ftreply"){parent.location.hash="sftr"}if(c.value=="search_blog"){parent.location.hash="sb"}if(c.value=="search_bcomment"){parent.location.hash="sbc"}if(c.value=="search_earticle"){parent.location.hash="sea"}if(c.value=="search_eareply"){parent.location.hash="sear"}if(c.value=="search_expert"){parent.location.hash="sed"}}function sendInvoiceMail(){document.getElementById("mailto_div").style.display="block";document.getElementById("mail_send").style.display="block";document.getElementById("mailto").focus()}function cancelInvoiceMail(){document.getElementById("mailto_div").style.display="none";document.getElementById("mail_send").style.display="none"}function validateInvoiceMail(){var d=document.getElementById("mailto").value;var c=/^\w(\.?[\w-])*@\w(\.?[\w-])*\.[a-zA-Z]{2,6}(\.[a-zA-Z]{2})?$/i;if(d==""){alert("Please enter Email Address!");document.getElementById("mailto").focus();return false}if(d.search(c)==-1){alert("Please Specify Email In The Format: xxx@xxx.com");document.getElementById("mailto").focus();return false}else{return true}}function showmesg(){document.getElementById("title").value="";document.getElementById("tag").value="";document.getElementById("tag").value="";document.getElementById("picture").value="";document.getElementById("video").value="";document.getElementById("replyDisable").value=""}function showtopic_reply_preview(){document.getElementById("divErredittopicRpl").innerHTML="";document.getElementById("view_tpcRpl").style.display="block";var f=FCKeditorAPI.GetInstance("tpcRplbody");var c=f.EditorDocument.body.innerHTML;document.getElementById("preview_tpcRpl").innerHTML=c;var d=document.getElementById("preview_tpcRpl").offsetHeight;document.getElementById("tpcRplbox").style.height=parseInt(780+d)+"px"}function show_add_topic_div(){document.getElementById("add_topic").style.display="block";location.href="#topic";document.getElementById("tpc_title").focus();document.getElementById("view").style.display="none";document.getElementById("preview").innerHTML="";reset_add_topic()}function show_add_discussion_popup(){document.getElementById("add_discussion_popup").style.display="block";var c=document.getElementById("pics_height").offsetHeight;document.getElementById("top_box").style.height=parseInt(c+480)+"px"}function reset_add_forum(){document.getElementById("discussion_title").value="";var d=FCKeditorAPI.GetInstance("add_forum_body");d.SetHTML("");if(document.getElementById("no_pictures").value!=0&&document.getElementById("no_pictures").value!=""){for(var c=0;c<document.getElementById("picture").options.length;c++){document.getElementById("picture").options[c].selected=false}}if(document.getElementById("no_videos").value!=0&&document.getElementById("no_videos").value!=""){for(var c=0;c<document.getElementById("video").options.length;c++){document.getElementById("video").options[c].selected=false}}reloadCaptcha2();document.getElementById("captcha").value="";document.getElementById("divErrAddforum").innerHTML=""}function show_addTopic_forum(d){document.getElementById("add_topic_forum_popup").style.display="block";location.href="#focus_topic";document.getElementById("did").value=d;var c=document.getElementById("pics_height_add_topic").offsetHeight;document.getElementById("tpc_top_box").style.height=parseInt(c+680)+"px"}function cancel_add_topic_forum(){document.getElementById("add_topic_forum_popup").style.display="none";reset_add_topic_forum();document.getElementById("add_topic_preview").innerHTML="";document.getElementById("add_topic_view").style.display="none"}function show_add_forum_preview(){document.getElementById("divErrAddforum").innerHTML="";document.getElementById("view").style.display="block";document.getElementById("disc_preview").innerHTML=document.getElementById("forum_body").value;var c=document.getElementById("disc_preview").offsetHeight;document.getElementById("top_box").style.height=parseInt(480+c)+"px"}function show_add_topic_forum_preview(){document.getElementById("divErraddtopic").innerHTML="";document.getElementById("add_topic_view").style.display="block";var f=FCKeditorAPI.GetInstance("add_topic_body");var c=f.EditorDocument.body.innerHTML;document.getElementById("add_topic_preview").innerHTML=c;var d=document.getElementById("add_topic_preview").offsetHeight}function cancel_add_discussion_popup(){document.getElementById("add_discussion_popup").style.display="none";document.getElementById("view").style.display="none";reset_add_forum()}function cancel_add_topic_popup(){document.getElementById("add_topic").style.display="none";reset_add_topic()}function show_edit_topic_div(c){document.getElementById("divErredittopic").innerHTML="";document.getElementById("edit_topic_popup").style.display="block";location.href="#edit_topic";getEdiTopicData(c);document.getElementById("edit_tpc_title").focus();document.getElementById("tid_edit").value=c;document.getElementById("edit_view").style.display="none";document.getElementById("edit_preview").innerHTML="";document.getElementById("top_box").style.height=780+"px"}function cancel_edit_topic_popup(){document.getElementById("edit_topic_popup").style.display="none"}function show_add_tpcreport_div(f,d,g){document.getElementById("repotdivErr").innerHTML="";document.getElementById("divReport").style.display="block";document.getElementById("report_add").reset();document.getElementById("TID").value=f;document.getElementById("OID").value=d;document.getElementById("DID").value=g;document.getElementById("report_option").focus()}function show_add_report_div(d,c){document.getElementById("repotdivErr").innerHTML="";document.getElementById("report_id").style.display="block";document.getElementById("report_add").reset();document.getElementById("TID").value=d;document.getElementById("OID").value=c;document.getElementById("report_option").focus()}function show_add_treplyreport_div(f,d,g){document.getElementById("divErr2").innerHTML="";document.getElementById("report").style.display="block";document.getElementById("TID").value=d;document.getElementById("OID").value=f;document.getElementById("PID").value=g;document.getElementById("report_option").focus()}function show_add_eventreport_div(){document.report_addevent.reset();document.getElementById("repotdivErr").innerHTML="";document.getElementById("grpevent_report").style.display="block";document.getElementById("report_option").focus()}function show_add_ereplyreport_div(d,c){document.getElementById("replyOID").value=d;document.getElementById("PID").value=c;document.getElementById("repotdivErr").innerHTML="";document.getElementById("grpevent_report").style.display="block";document.getElementById("report_option").focus()}function show_add_report_div_ind(d,c){document.getElementById("repotdivErr").innerHTML="";document.getElementById("divReport").style.display="block";document.getElementById("report_add").reset();document.getElementById("TRID").value=d;document.getElementById("OID").value=c;document.getElementById("report_option").focus()}function report_data(){var c=document.getElementById("report_option").value;var d=document.getElementById("report_comment").value;if(c=="Other"&&d==""){alert("Please provide comment");document.getElementById("report_comment").focus();return false}}function show_add_ind_topicreply_div(){document.getElementById("add_gtopic_reply").style.display="block";document.getElementById("top_box").style.height=500+"px";document.getElementById("rbody").focus()}function show_add_ind_eventreply_div(){document.getElementById("event_reply").style.display="block";document.getElementById("rbody").focus()}function show_addtopic_preview(){document.getElementById("divErrAddtopic").innerHTML="";document.getElementById("view").style.display="block";var f=FCKeditorAPI.GetInstance("add_topic_body");var c=f.EditorDocument.body.innerHTML;document.getElementById("addtpc_preview").innerHTML=c;var d=document.getElementById("addtpc_preview").offsetHeight}function show_edittopic_preview(){document.getElementById("divErrAddtopic").innerHTML="";document.getElementById("edit_view").style.display="block";var f=FCKeditorAPI.GetInstance("edit_topic_body");var c=f.EditorDocument.body.innerHTML;document.getElementById("edit_preview").innerHTML=c;var d=document.getElementById("edit_view").offsetHeight}function reset_edit_topic(){document.getElementById("edit_tpc_title").value="";document.getElementById("edit_tpc_tag").value="";document.getElementById("edit_tpccapcha").value="";document.getElementById("tid_edit").value="";document.getElementById("edit_disable_replies").checked=false;var d=FCKeditorAPI.GetInstance("edit_topic_body");d.SetHTML("");if(document.getElementById("no_pictures").value!=0||document.getElementById("no_pictures").value!=""){for(var c=0;c<document.getElementById("edit_picture").options.length;c++){document.getElementById("edit_picture").options[c].selected=false}}if(document.getElementById("no_videos").value!=0||document.getElementById("no_videos").value!=""){for(var c=0;c<document.getElementById("video_edit").options.length;c++){document.getElementById("video_edit").options[c].selected=false}}editimgCaptcha();document.getElementById("divErredittopic").innerHTML=""}function reset_add_topic(){document.getElementById("tpc_title").value="";document.getElementById("tag").value="";document.getElementById("add_tpc_capcha").value="";document.getElementById("divErrAddtopic").innerHTML="";document.getElementById("disable_replies").checked=false;var d=FCKeditorAPI.GetInstance("add_topic_body");d.SetHTML("");if(document.getElementById("no_pictures").value!=0&&document.getElementById("no_pictures").value!=""){for(var c=0;c<document.getElementById("picture").options.length;c++){document.getElementById("picture").options[c].selected=false}}if(document.getElementById("no_videos").value!=0&&document.getElementById("no_videos").value!=""){for(var c=0;c<document.getElementById("video").options.length;c++){document.getElementById("video").options[c].selected=false}}reloadCaptcha2();document.getElementById("divErredittopic").innerHTML=""}function reset_add_topic_forum(){document.getElementById("add_tpc_title").value="";document.getElementById("add_tpc_tag").value="";document.getElementById("add_disable_replies").checked=false;document.getElementById("tpc_capcha").value="";document.getElementById("divErraddtopic").innerHTML="";var d=FCKeditorAPI.GetInstance("add_topic_body");d.SetHTML("");if(document.getElementById("no_pictures").value!=0){for(var c=0;c<document.getElementById("tpc_picture").options.length;c++){document.getElementById("tpc_picture").options[c].selected=false}}if(document.getElementById("no_videos").value!=0){for(var c=0;c<document.getElementById("tpc_video").options.length;c++){document.getElementById("tpc_video").options[c].selected=false}}reloadtpcCaptcha()}function reset_topic_reply(){document.getElementById("disable_replies").checked=false;var d=FCKeditorAPI.GetInstance("tpcRplbody");d.SetHTML("");if(document.getElementById("num_pics").value!="0"){for(var c=0;c<document.getElementById("pictureTpcRpl").options.length;c++){document.getElementById("pictureTpcRpl").options[c].selected=false}}if(document.getElementById("num_vdo").value!="0"){for(var c=0;c<document.getElementById("tpcRplvideo").options.length;c++){document.getElementById("tpcRplvideo").options[c].selected=false}}reloadCaptchaTpcRpl();document.getElementById("divErredittopicRpl").innerHTML="";document.getElementById("capchaTpcRpl").value="";document.getElementById("tpcRplTitle").value="";document.getElementById("tpcRplTag").value=""}function show_grps_to_associate(){getGrpData();document.getElementById("mail_box1").style.display="block"}function cancel_associate_grp(){document.getElementById("divErr").innerHTML="";document.getElementById("mail_box1").style.display="none"}function cancel_compose_email(){document.getElementById("mail_box").style.display="none";document.getElementById("divErr1").innerHTML="";document.getElementById("receiver_email").value="";document.getElementById("send_mail").value=""}function cancel_addtopic_page(){document.getElementById("divErrAddGtopic").innerHTML="";reset_addtopic();document.getElementById("add_gtopic").style.display="none"}function reset_addtopic(){document.getElementById("tpc_title").value="";document.getElementById("discuss").value="";document.getElementById("captcha").value="";if(document.getElementById("no_pics").value!=0){for(var c=0;c<document.getElementById("picture").options.length;c++){document.getElementById("picture").options[c].selected=false}}if(document.getElementById("no_vdos").value!=0){for(var c=0;c<document.getElementById("video").options.length;c++){document.getElementById("video").options[c].selected=false}}reloadCaptcha2();document.getElementById("divErrAddGtopic").innerHTML=""}function show_add_gtopic_div(){document.getElementById("add_gtopic").style.display="block";document.getElementById("tpc_title").focus()}function cancel_addvdopic_page(){document.getElementById("vdopicDivErr").innerHTML="";if(document.getElementById("search_grp_vid").value!=""){document.getElementById("search_result_div").innerHTML=""}document.getElementById("search_grp_vid").value="";document.getElementById("vdopicDiv").style.display="none"}function reset_addvdopic(){if(document.getElementById("no_pictures").value!=0){for(var c=0;c<document.getElementById("gpicture").options.length;c++){document.getElementById("gpicture").options[c].selected=false}}if(document.getElementById("no_videos").value!=0){for(var c=0;c<document.getElementById("gvideo").options.length;c++){document.getElementById("gvideo").options[c].selected=false}}reloadVdoPicCaptcha();document.getElementById("vdopic_capcha").value="";document.getElementById("vdopicDivErr").innerHTML=""}function show_add_gvdopic_div(c){document.getElementById("vdopicDiv").style.display="block";showUserVidPager(c+"/show_user_videos.php",1)}function show_add_gpic_div(c){document.getElementById("vdopicDiv").style.display="block";showUserVidPager(c+"/show_user_pictures.php",1)}function cancel_addevent_page(){document.getElementById("divErr1").innerHTML="";reset_addevent();$("ajxLoader1").hide();document.getElementById("mail_box").style.display="none"}function reset_addevent(){document.getElementById("event_name").value="";for(var c=0;c<document.getElementById("hour").options.length;c++){document.getElementById("hour").options[c].selected=false}for(var c=0;c<document.getElementById("minute").options.length;c++){document.getElementById("minute").options[c].selected=false}for(var c=0;c<document.getElementById("timestatus").options.length;c++){document.getElementById("timestatus").options[c].selected=false}document.getElementById("event_organizer").value="";for(var c=0;c<document.getElementById("months").options.length;c++){document.getElementById("months").options[c].selected=false}for(var c=0;c<document.getElementById("days").options.length;c++){document.getElementById("days").options[c].selected=false}for(var c=0;c<document.getElementById("years").options.length;c++){document.getElementById("years").options[c].selected=false}document.getElementById("event_website").value="";document.getElementById("organizer_email").value="";for(var c=0;c<document.getElementById("country").options.length;c++){document.getElementById("country").options[c].selected=false}document.getElementById("age_limit").value="";document.getElementById("place").value="";document.getElementById("address").value="";document.getElementById("short_desc").value="";document.getElementById("statedrop").style.display="none";document.getElementById("city").value="";document.getElementById("zip").value="";document.getElementById("long_desc").value="";document.getElementById("imgCaptcha2").src="captcha.php?"+Math.random();document.getElementById("capcha_add_event").value="";document.getElementById("divErr1").innerHTML="";if(document.getElementById("enable_registration").checked==true){document.getElementById("enable_registration").checked=false;document.getElementById("checkall").checked=false;document.getElementById("form_first_name").checked=false;document.getElementById("form_last_name").checked=false;document.getElementById("form_age").checked=false;document.getElementById("form_email").checked=false;document.getElementById("form_phone").checked=false;document.getElementById("form_address").checked=false;document.getElementById("form_city").checked=false;document.getElementById("form_zip").checked=false;document.getElementById("form_country").checked=false;document.getElementById("form_state").checked=false}if(document.getElementById("paypal_payment").checked==true){document.getElementById("paypal_payment").checked=false;document.getElementById("register_fee").value="";document.getElementById("currency").value="";document.getElementById("paypal_account").value="";document.getElementById("terms").checked=false}}function show_add_gevent_div(){$("ajxLoader1").hide();document.getElementById("mail_box").style.display="block";document.getElementById("event_name").focus()}function close_reply_div(){document.getElementById("divErredittopicRpl").innerHTML="";reset_topic_reply();document.getElementById("add_reply").style.display="none"}function close_ind_reply_div(){document.getElementById("divErrAddGtopicReply").innerHTML="";reset_ind_topic_reply();document.getElementById("add_gtopic_reply").style.display="none"}function reset_ind_topic_reply(){document.getElementById("rbody").value="";reloadCaptcha2();document.getElementById("captcha").value="";document.getElementById("divErrAddGtopicReply").innerHTML=""}function close_indevent_reply_div(){document.getElementById("eventReplyErrDiv").innerHTML="";reset_ind_event_reply();document.getElementById("event_reply").style.display="none"}function reset_ind_event_reply(){document.getElementById("rbody").value="";reloadCaptcha2();document.getElementById("capcha").value="";document.getElementById("eventReplyErrDiv").innerHTML=""}function cancel_eventReport(){document.report_addevent.reset();document.getElementById("grpevent_report").style.display="none"}function cancel_report(){document.report_add.reset();document.getElementById("divReport").style.display="none"}function cancel_grpDiscReport(){document.report_add.reset();document.getElementById("report_id").style.display="none"}function mem_permissions_ban(f,c,d,k,g){if(k.checked==true){if(confirm("Do you really want to ban this member?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?&gid="+d+"&MID="+f+"&page="+g+"&action=ban";document.getElementById("edit_group_members").submit()}else{f.checked=false;return false}}else{if(confirm("Do you really want to active this member?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?&gid="+d+"&MID="+f+"&page="+g+"&action=no_ban";document.getElementById("edit_group_members").submit()}else{f.checked=true;return false}}}function mem_reject(c,d,f){if(confirm("Do you really want to reject this member?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?chid="+chid+"&gid="+d+"&rejmemid="+c+"&page="+f;document.getElementById("edit_group_members").submit()}}function mem_permissions_rem(c,d,f){if(confirm("Do you really want to remove this member?")){document.getElementById("edit_group_members").action="group_admin_team_members.php?chid="+chid+"&gid="+d+"&remid="+c+"&page="+f;document.getElementById("edit_group_members").submit()}}function editAddress(){document.getElementById("DialogBox").style.display="block"}function cancel_addressedit(){document.address.reset();document.getElementById("DialogBox").style.display="none"}function showadultVerification(){document.getElementById("divAcontent").style.display="block"}function show_group_guideline(){document.getElementById("DialogBox").style.display="block"}function submit_lang_form(c){document.getElementById("lang").value=c;document.getElementById("language_form").submit()}function opacity(l,g,c,d){var f=Math.round(d/100);var k=0;if(g>c){for(i=g;i>=c;i--){setTimeout("changeOpac("+i+",'"+l+"')",(k*f));k++;if(i==0){setTimeout("document.getElementById('flags_list').style.display = 'none';",1000)}}}else{if(g<c){document.getElementById("flags_list").style.display="block";for(i=g;i<=c;i++){setTimeout("changeOpac("+i+",'"+l+"')",(k*f));k++}}}}function changeOpac(d,f){var c=document.getElementById(f).style;c.opacity=(d/100);c.MozOpacity=(d/100);c.KhtmlOpacity=(d/100);c.filter="alpha(opacity="+d+")"}function shiftOpacity(d,c){if(document.getElementById(d).style.opacity==0){opacity(d,0,100,c)}else{opacity(d,100,0,c)}}var TimeToFade=1000;function fade(c){var d=document.getElementById(c);if(d==null){return}if(d.FadeState==null){if(d.style.opacity==null||d.style.opacity==""||d.style.opacity=="1"){d.FadeState=2}else{d.FadeState=-2}}alert(d.FadeState);if(d.FadeState==1||d.FadeState==-1){d.FadeState=d.FadeState==1?-1:1;d.FadeTimeLeft=TimeToFade-d.FadeTimeLeft}else{d.FadeState=d.FadeState==2?-1:1;d.FadeTimeLeft=TimeToFade;setTimeout("animateFade("+new Date().getTime()+",'"+c+"')",33)}}function close_inbox_text(){document.getElementById("inbox").style.display="none";document.getElementById("msg_div").innerHTML=""}function animateFade(g,c){var d=new Date().getTime();var l=d-g;var f=document.getElementById(c);if(f.FadeTimeLeft<=l){f.style.opacity=f.FadeState==1?"1":"0";f.style.filter="alpha(opacity = "+(f.FadeState==1?"100":"0")+")";f.FadeState=f.FadeState==1?2:-2;return}f.FadeTimeLeft-=l;var k=f.FadeTimeLeft/TimeToFade;if(f.FadeState==1){k=1-k}f.style.opacity=k;f.style.filter="alpha(opacity = "+(k*100)+")";setTimeout("animateFade("+d+",'"+c+"')",33)}start=1;function fxOnload(){alert("this is on load")}function show_recent(d,c){if(d=="right"){start=start+4}else{if(d=="left"){start=start-4}}if(start>=13){start=1}else{if(start<=0){start=9}}if(start==1&&c>0){document.getElementById("recent1").style.display="block";document.getElementById("recent2").style.display="none";document.getElementById("recent3").style.display="none";if(c<4){last=c}else{last=4}document.getElementById("recent_total").innerHTML="[1-"+last+" of "+c+"]"}if(start==5&&c>4){document.getElementById("recent1").style.display="none";document.getElementById("recent2").style.display="block";document.getElementById("recent3").style.display="none";if(c<8){last=c}else{last=8}document.getElementById("recent_total").innerHTML="[5-"+last+" of "+c+"]"}if(start==9&&c>8){document.getElementById("recent1").style.display="none";document.getElementById("recent2").style.display="none";document.getElementById("recent3").style.display="block";if(c<12){last=c}else{last=12}document.getElementById("recent_total").innerHTML="[9-"+last+" of "+c+"]"}return}function createNewList(){var c=prompt("Enter a name for a new contact group.","");if(c){document.location.href="friends.php?add_list="+c}}function doAction(c){if(c){document.getElementById("action_name").value=c;document.friendsForm.submit()}}function invite_mem_addall(){var c=document.getElementById("myfriends");var g=document.getElementById("invitefriends");var f;f=c.options.length;if(f!=0){g.options.length=f;for(var d=0;d<f;d++){g.options[d]=new Option(c.options[d].text,c.options[d].value)}for(d=0;d<f;d++){c.remove(0)}}}function invite_mem_add(){var c=document.getElementById("myfriends");var f=document.getElementById("invitefriends");var d;d=c.selectedIndex;if(d>=0){f.options[f.options.length]=new Option(c.options[d].text,c.options[d].value);c.remove(c.selectedIndex)}}function invite_mem_removeall(){var c=document.getElementById("invitefriends");var g=document.getElementById("myfriends");var f;f=c.options.length;if(f!=0){g.options.length=f;for(var d=0;d<f;d++){g.options[d]=new Option(c.options[d].text,c.options[d].value)}for(d=0;d<f;d++){c.remove(0)}}}function invite_mem_remove(){var c=document.getElementById("invitefriends");var f=document.getElementById("myfriends");var d;d=c.selectedIndex;if(d>=0){f.options[f.options.length]=new Option(c.options[d].text,c.options[d].value);c.remove(c.selectedIndex)}}function invite_mem_send(){var f,d;var c=document.getElementById("invitefriends");for(f=0;f<c.options.length;f++){d=d+"<input type=hidden name=flist[] value="+c.options[f].text+" >"}document.getElementById("friends_div").innerHTML=d;document.fform.submit()}function approve_post(g,d){alert("This posting will approved. Refresh the page.");var f="apostform"+g;var c=document.getElementById(f);return c.submit()}function AC_AddExtension(d,c){if(d.indexOf("?")!=-1){return d.replace(/\?/,c+"?")}else{return d+c}}function AC_Generateobj(k,g,c){var f="<object ";for(var d in k){f+=d+'="'+k[d]+'" '}f+=">";for(var d in g){f+='<param name="'+d+'" value="'+g[d]+'" /> '}f+="<embed ";for(var d in c){f+=d+'="'+c[d]+'" '}f+=" ></embed></object>";document.write(f)}function AC_FL_RunContent(){var c=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(c.objAttrs,c.params,c.embedAttrs)}function AC_SW_RunContent(){var c=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(c.objAttrs,c.params,c.embedAttrs)}function AC_GetArgs(d,k,m,g,n){var c=new Object();c.embedAttrs=new Object();c.params=new Object();c.objAttrs=new Object();for(var f=0;f<d.length;f=f+2){var l=d[f].toLowerCase();switch(l){case"classid":break;case"pluginspage":c.embedAttrs[d[f]]=d[f+1];break;case"src":case"movie":d[f+1]=AC_AddExtension(d[f+1],k);c.embedAttrs.src=d[f+1];c.params[m]=d[f+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":c.objAttrs[d[f]]=d[f+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"id":case"tabindex":c.embedAttrs[d[f]]=c.objAttrs[d[f]]=d[f+1];break;default:c.embedAttrs[d[f]]=c.params[d[f]]=d[f+1]}}c.objAttrs.classid=g;if(n){c.embedAttrs.type=n}return c}function fxRate(d,f,c){cp.call("ajax/myajaxphp.php","process_data",return_data,f,c)}function fxTrvRate(d,f,c){cp.call("ajax/myajaxphp.php","process_trvdata",return_data2,f,c)}function fxRatePictures(d,f,c){cp.call("ajax/myajaxphp.php","process_data_pictures",return_data_pic,f,c)}function fxRatePhotoset(c,d,f){cp.call("ajax/myajaxphp.php","process_data_photoset",return_data_photoset,d,f)}function fxRateBuySellItem(d,f,c){cp.call("ajax/myajaxphp.php","process_data_buy_sell_item",return_dataItem,d,c)}function fxRateGRT(c,d){cp.call("ajax/myajaxphp.php","process_data_GRT",return_data_grt,c,d)}function fxRateGRS(c,d){cp.call("ajax/myajaxphp.php","process_data_GRS",return_data_grs,c,d)}function return_dataItem(l){var d=l.getElementsByTagName("trate").item(0).firstChild.data;if(d!="exist"){var k="";var f=l.getElementsByTagName("tvote").item(0).firstChild.data;for(i=0;i<d;i++){k=k+"<img src='"+imgurl+"/tpl_icon_star_full.gif' width=11 />&nbsp;"}for(i=0;i<(5-d);i++){if(f-(d*2)==1){k=k+"<img src='"+imgurl+"/tpl_icon_star_half.gif' width=11 />";f=0}else{k=k+"<img src='"+imgurl+"/tpl_icon_star_empty.gif' width=11 />"}}var c=l.getElementsByTagName("total_review").item(0).firstChild.data;var g=l.getElementsByTagName("positive_review").item(0).firstChild.data;document.getElementById("showPicRate").innerHTML=k;document.getElementById("showPReview").innerHTML=g;document.getElementById("showTReview").innerHTML=c;document.getElementById("voteProcessthank").innerHTML='<FONT class="rating_thanks">Thanks for rating</FONT>'}else{document.getElementById("voteProcessthank").innerHTML="<FONT COLOR='#E26600'>You have already voted for this item!</FONT>"}return false}function return_data(d){var c=d.getElementsByTagName("trate").item(0).firstChild.data;if(c!="exist"){document.getElementById("voteProcessthank").innerHTML='<FONT class="rating_thanks">Thanks for rating</FONT>'}else{document.getElementById("voteProcessthank").innerHTML='<FONT class="already_rated">You have already voted for this video!</FONT>'}}function return_data_grt(d){var c=d.getElementsByTagName("trate").item(0).firstChild.data;if(c!="exist"){document.getElementById("voteProcessthank").innerHTML='<FONT class="rating_thanks">Thanks for rating</FONT>'}else{document.getElementById("voteProcessthank").innerHTML='<FONT class="already_rated">You have already voted for this template!</FONT>'}}function return_data_grs(d){var c=d.getElementsByTagName("trate").item(0).firstChild.data;if(c!="exist"){document.getElementById("voteProcessthank").innerHTML='<FONT class="rating_thanks">Thanks for rating</FONT>'}else{document.getElementById("voteProcessthank").innerHTML='<FONT class="already_rated">You have already voted for this scorecard!</FONT>'}}function return_data_photoset(d){var c=d.getElementsByTagName("trate").item(0).firstChild.data;if(c!="exist"){document.getElementById("voteProcessthank").innerHTML='<FONT class="rating_thanks">Thanks for rating</FONT>'}else{document.getElementById("voteProcessthank").innerHTML='<FONT class="already_rated">You have already voted for this photoset!</FONT>'}}function return_data_pic(d){var c=d.getElementsByTagName("trate").item(0).firstChild.data;if(c!="exist"){document.getElementById("voteProcessthank").innerHTML='<span class="rating_thanks">Thanks for rating</span>'}else{document.getElementById("voteProcessthank").innerHTML="<FONT COLOR='#E26600'>You have already voted for this picture!</FONT>"}return false}function return_data2(d){var c=d.getElementsByTagName("trate").item(0).firstChild.data;if(c!="exist"){document.getElementById("voteProcessthank").innerHTML='<span class="rating_thanks">Thanks for rating</span>'}else{document.getElementById("voteProcessthank").innerHTML="<FONT COLOR='#E26600' >You have already voted for this video!</FONT>"}return false}function fxVote(c){voteAnswer=document.getElementById("opAns").value;if(voteAnswer==""){alert("Select any one")}else{cp.call(baseurl+"/ajax/myajaxphp.php","process_Vote",return_vote_result,c,voteAnswer)}}function return_vote_result(c){var m=c.getElementsByTagName("result").item(0).firstChild.data;if(m=="1"){count=c.getElementsByTagName("count").item(0).firstChild.data;for(var g=0;g<count;g++){var k="A1"+g;var d="P1"+g;k=c.getElementsByTagName(k).item(0).firstChild.data;d=c.getElementsByTagName(d).item(0).firstChild.data;var f=document.getElementById("tblVoteResult").insertRow(0);var n=f.insertCell(0);var l=f.insertCell(1);n.innerHTML=k;l.innerHTML=d+"%";if(k==""){break}}insertInToTable("tblPResult",0,0,"Vote result");hideMe("divviewvresult");hideMe("tblVote")}else{if(m>1){insertInToTable("tblPResult",0,0,"<font color=#E26600><B>Sorry you have already voted..</B></FONT>");viewVote(m);hideMe("tblVote")}}}function viewVote(c){cp.call(baseurl+"/ajax/myajaxphp.php","view_vote",return_view_vote,c)}function return_view_vote(c){var m;if(1){count=c.getElementsByTagName("count").item(0).firstChild.data;for(var g=0;g<count;g++){var k="A1"+g;var d="P1"+g;k=c.getElementsByTagName(k).item(0).firstChild.data;d=c.getElementsByTagName(d).item(0).firstChild.data;var f=document.getElementById("tblViewVoteResult").insertRow(0);var n=f.insertCell(0);var l=f.insertCell(1);n.innerHTML=k;l.innerHTML=d+"%";if(k==""){break}}insertInToTable("tblViewVote",0,0,"Current vote status")}}function fxSendComments(d,g,f,c){comment_value=document.getElementById(g).value;if(comment_value==""){alert(" Comment box is empty !!")}else{hideMe(d);cp.call(baseurl+"/ajax/myajaxphp.php","process_comments",return_comment_response,comment_value,f,c)}}function fxSendCommentsPictures(d,g,f,c){alert(baseurl);comment_value=document.getElementById(g).value;if(comment_value==""){alert(" Comment box is empty !!")}else{hideMe(d);cp.call(baseurl+"/ajax/myajaxphp.php","process_comments_pictures",return_comment_response,comment_value,f,c)}}function return_comment_response(c){if(c.getElementsByTagName("a").item(0).firstChild.data==0){showMe("divComResult2")}else{showMe("divComResult1")}}var current_position=4;function recentview(f,d){gflag="viewrecent";if(d=="next"){var g=current_position;current_position=current_position+f;var c=current_position;if(dbreport!="1"){}sql="SELECT VID, title, viewtime, vkey from video where viewtime<>'0000-00-00 00:00:00' order by viewtime desc limit "+g+" , "+c;executeDB(sql);if(dbreport<0){c=current_position;current_position=current_position-f;g=current_position;alert("End")}}if(d=="prev"){var c=current_position;current_position=current_position-f;var g=current_position;if(g<0){g=f;c=g+f;alert("End")}sql="SELECT VID, title, viewtime, vkey from video where viewtime<>'0000-00-00 00:00:00' order by viewtime desc limit "+g+" , "+c;executeDB(sql)}}function pollAnsBox(d){Me=document.getElementById(d);if(Me.value==""){Me.style.background="#3366FF"}else{Me.style.background="#FFFFFF";xy=Me.value;for(i=0;i<Me.value;i++){var c=document.getElementById("tblViweAnsBox").insertRow(0);var g=c.insertCell(0);var f=c.insertCell(1);g.innerHTML="Answer "+(xy-i);f.innerHTML="<INPUT TYPE=text SIZE=40 NAME=voteAnsBox"+i+" ID=voteAnsBox"+i+" onBlur=txtBoxValidation(voteAnsBox"+i+", #EAEAEA,#FF0033) >"}}}function delteRow(){var c=document.getElementById("tblViweAnsBox").rows.length-1;for(var d=c;d>=0;d--){document.getElementById("tblViweAnsBox").deleteRow(d)}}function fxvalidation(){var d=true;var c=document.getElementById("tblViweAnsBox").rows.length-1;d=txtBoxValidation("txtQtn","#EAEAEA","#FF0033");d=txtBoxValidation("txtPollAnsQty","#EAEAEA","#FF0033");for(i=c;i>=0;i--){targetID="voteAnsBox"+i;if(document.getElementById(targetID).value==""){txtBoxValidation(targetID,"#EAEAEA","#FF0033");d=false;break}}return d}function fxShowAccInfo(d,c){showMe(d);hideMe(c)}function pollAnsBox(c){alert(c)}function rateuser(g,c,f){try{cp.call("ajax/myphpajax.php","process_uservote",return_uservote,g,c,f)}catch(d){alert("Connection failed")}}function return_uservote(d){try{myMsg=d.getElementsByTagName("myMsg").item(0).firstChild.data;cnt=d.getElementsByTagName("cnt").item(0).firstChild.data;showMe("himr");if(cnt>6){cnt=6}else{if(cnt<0){cnt=0}}blank_star=6-cnt;var c=document.getElementById("tblViewUserVote").rows[0].cells;for(i=0;i<cnt;i++){c[i].innerHTML="<img src="+imgurl+"/star.gif>"}for(j=cnt;j<5;j++){c[j].innerHTML="<img src="+imgurl+"/blank_star.gif>"}if(myMsg=="f"){var c=document.getElementById("tblViewUserTate").rows[0].cells;c[0].innerHTML="<B>Sorry! You have already rated him.</B>"}else{var c=document.getElementById("tblViewUserTate").rows[0].cells;c[0].innerHTML="<B>Thanks!</B>"}}catch(f){alert("Server prolem")}}function show_spn_trv_rqst(){$("rqstSpnTrvajxLoader").hide();document.getElementById("spnTrv_request_popup").style.display="block";document.getElementById("rqstSpnTrvdivErr").innerHTML="";document.getElementById("spnTrv_rqst_capcha").value="";document.getElementById("spnTrv_terms").checked=false}function spnTrvRqst_reset(){$("rqstSpnTrvajxLoader").hide();reloadCaptchaspnTrvRqst();document.getElementById("rqstSpnTrvdivErr").innerHTML="";document.getElementById("spnTrv_rqst_capcha").value="";document.getElementById("spnTrv_terms").checked=false;for(var c=0;c<document.getElementById("user_uploaded_trv").options.length;c++){document.getElementById("user_uploaded_trv").options[c].selected=false}}function cancel_request_spnTrv(){document.spnTrvRqstForm.reset();$("rqstSpnTrvajxLoader").hide();reloadCaptchaspnTrvRqst();document.getElementById("spnTrv_request_popup").style.display="none"}function Send_spnTrvRqst(c,d){$("rqstSpnTrvajxLoader").show();$(c).request({action:d,method:"post",parameters:{actionType:"SEND_REQUEST_SPNTRV"},onSuccess:handleSpnTrvRqstResponse,onException:handlSpnTrvRqstError})}function handleSpnTrvRqstResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){cancel_request_spnTrv()}else{document.getElementById("rqstSpnTrvdivErr").innerHTML=data.MESSAGE;reloadCaptchaspnTrvRqst()}$("rqstSpnTrvajxLoader").hide()}}function handlSpnTrvRqstError(c){document.getElementById("rqstSpnTrvdivErr").innerHTML="Error processing: Please try later.";reloadCaptchaspnTrvRqst();$("rqstSpnTrvajxLoader").hide()}function reloadCaptchaspnTrvRqst(){document.getElementById("imgCaptchaSpntrvRqst").src="captcha.php?forsec=stvreq&"+Math.random()}function check_all(){if(document.getElementById("checkall").checked==true){document.getElementById("form_first_name").checked=true;document.getElementById("form_last_name").checked=true;document.getElementById("form_age").checked=true;document.getElementById("form_email").checked=true;document.getElementById("form_phone").checked=true;document.getElementById("form_address").checked=true;document.getElementById("form_city").checked=true;document.getElementById("form_zip").checked=true;document.getElementById("form_country").checked=true}else{document.getElementById("form_first_name").checked=false;document.getElementById("form_last_name").checked=false;document.getElementById("form_age").checked=false;document.getElementById("form_email").checked=false;document.getElementById("form_phone").checked=false;document.getElementById("form_address").checked=false;document.getElementById("form_city").checked=false;document.getElementById("form_zip").checked=false;document.getElementById("form_country").checked=false}}function GetAjaxPager(c,g,f,d){if(c.keyCode==13){page=document.getElementById(f).value;showAjaxPager(g,page,d)}}function showAjaxPager(k,g,d){$("ajaxLoader").style.postition="absolute";$("ajaxLoader").style.top="1400px";$("ajaxLoader").show();var k=k+"&page="+g;var f=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",k,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updatePagerResult(c.xmlHttpReq.responseText,d)}};c.xmlHttpReq.send(k)}function updatePagerResult(d,c){document.getElementById(c).innerHTML=d;$("ajaxLoader").hide()}function show_ajaxPager(c,f,d){if(c.keyCode==13){page=document.getElementById(d).value;showPager(f,page)}}function showPager(g,f){$("ajaxLoader").style.postition="absolute";$("ajaxLoader").style.top="1400px";$("ajaxLoader").show();var g=g+"&page="+f;var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",g,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updateResult(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(g)}function updateResult(c){document.getElementById("divResultset").innerHTML=c;$("ajaxLoader").hide()}function show_urlPager(c,f,d){if(c.keyCode==13){page=document.getElementById(d).value;showUrlPager(f,page)}}function showUrlPager(g,f){$("ajaxLoaderPageSearchResult").show();var g=g+"&page="+f+"&actionType=SEARCH";var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",g,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updateUrlResult(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(g)}function updateUrlResult(c){document.getElementById("search_result_div").innerHTML=c;$("ajaxLoaderPageSearchResult").hide()}function show_nationalEvent(c,f,d){if(c.keyCode==13){page=document.getElementById(d).value;showPager_national_event(f,page)}}function showPager_national_event(g,f){$("ajaxLoader").style.postition="absolute";$("ajaxLoader").style.top="1400px";$("ajaxLoader").show();var g=g+"&page="+f;var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",g,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updateResult_national_event(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(g)}function updateResult_national_event(c){document.getElementById("divResultsetNationalEvent").innerHTML=c;$("ajaxLoader").hide()}function GetAjaxItemList(c,f,d){if(c.keyCode==13){page=document.getElementById(d).value;showPager_itemList(f,page)}}function showPager_itemList(g,f){$("ajaxLoaderPageSearchResult1").show();var g=g+"&page="+f;var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",g,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updateResulitemList(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(g)}function updateResulitemList(c){document.getElementById("search_result_div").innerHTML=c;$("ajaxLoaderPageSearchResult1").hide()}function reloadCaptcha(){document.getElementById("imgCaptcha").src="captcha.php?"+Math.random()}function resetcompose_mail(){document.getElementById("subject_detail").value="";document.getElementById("compose_message_detail").value="";document.getElementById("receiver").value="";document.getElementById("allUsersName").style.display="none";document.getElementById("user_list").innerHTML="";for(var c=0;c<document.getElementById("fm-buddyname").options.length;c++){document.getElementById("fm-buddyname").options[c].selected=false}}function GetAjaxPagerMsg(c,f,d){if(c.keyCode==13){page=document.getElementById(d).value;showPager_msg(f,page)}}function showPager_msg(g,f){$("ajaxLoader").style.postition="absolute";$("ajaxLoader").style.top="1400px";$("ajaxLoader").show();var g=g+"&page="+f;var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",g,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updateResult_msg(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(g)}function updateResult_msg(d){document.getElementById("msg_div").innerHTML=d;var c=document.getElementById("msg_content_popup").offsetHeight;document.getElementById("top_box").style.height=parseInt(50+c)+"px";document.getElementById("left_box").style.height=document.getElementById("top_box").offsetHeight-10+"px";$("ajaxLoader").hide()}function xmlhttpjoinu(g,c){document.getElementById("loading").style.display="block";var f=false;var d=new XMLHttpRequest();if(window.XMLHttpRequest){d.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){d.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}d.xmlHttpReq.open("POST",g,true);d.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.xmlHttpReq.onreadystatechange=function(){if(d.xmlHttpReq.readyState==4){updatepage121ru(d.xmlHttpReq.responseText);document.getElementById("loading").style.display="none"}};d.xmlHttpReq.send(getquerystring121ru(c))}function getquerystring121ru(c){var d=/^[0-9]+$/;qstr="page="+escape(c);return qstr}function updatepage121ru(c){document.getElementById("ALL_SPORTS").innerHTML=c}function toptenVideo(k,d,c){var g=false;var f=new XMLHttpRequest();if(window.XMLHttpRequest){f.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){f.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}f.xmlHttpReq.open("POST",k,true);f.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.xmlHttpReq.onreadystatechange=function(){if(f.xmlHttpReq.readyState==4){updatepage(f.xmlHttpReq.responseText)}};f.xmlHttpReq.send(getquerystring(d,c))}function getquerystring(d,c){var f=/^[0-9]+$/;qstr="page="+escape(d)+"&cnt="+escape(c);return qstr}function updatepage(c){document.getElementById("TOP_TEN_VIDS").innerHTML=c}function toptenPicture(k,d,c){var g=false;var f=new XMLHttpRequest();if(window.XMLHttpRequest){f.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){f.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}f.xmlHttpReq.open("POST",k,true);f.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.xmlHttpReq.onreadystatechange=function(){if(f.xmlHttpReq.readyState==4){updatepagepic(f.xmlHttpReq.responseText)}};f.xmlHttpReq.send(getquerystringpic(d,c))}function getquerystringpic(d,c){var f=/^[0-9]+$/;qstr="page="+escape(d)+"&cnt="+escape(c);return qstr}function updatepagepic(c){document.getElementById("TOP_TEN_PICS").innerHTML=c}function edit_addtopic_reply(k,d,c){var g=false;var f=new XMLHttpRequest();if(window.XMLHttpRequest){f.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){f.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}f.xmlHttpReq.open("POST",k,true);f.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.xmlHttpReq.onreadystatechange=function(){if(f.xmlHttpReq.readyState==4){updatedit_replypage(f.xmlHttpReq.responseText)}};f.xmlHttpReq.send(getallvalue_reply(d,c))}function getallvalue_reply(d,c){var f="rid="+c+"&uid="+d;return f}function updatedit_replypage(c){document.getElementById("loadme").innerHTML=c}function data_topic_reply(m,f,d,l){var k=false;var g=new XMLHttpRequest();if(window.XMLHttpRequest){g.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){g.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}g.xmlHttpReq.open("POST",m,true);g.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.xmlHttpReq.onreadystatechange=function(){if(g.xmlHttpReq.readyState==4){updatepagecom_topic_reply(g.xmlHttpReq.responseText)}};g.xmlHttpReq.send(get_topic_reply_data(f,d,l))}function get_topic_reply_data(g,d,o){var m=document.getElementById("tid").value;var l=FCKeditorAPI.GetInstance("body");var n=getFormHeader("discussion_topic_reply");var f=l.EditorDocument.body.innerHTML;var k=n+"&bodys="+f+"&tid="+m+"&preview="+o;return k}function updatepagecom_topic_reply(c){document.getElementById("loadme").innerHTML=c;window.setTimeout("checkdone()",25)}function edit_addtopic(k,d,c){var g=false;var f=new XMLHttpRequest();if(window.XMLHttpRequest){f.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){f.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}f.xmlHttpReq.open("POST",k,true);f.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.xmlHttpReq.onreadystatechange=function(){if(f.xmlHttpReq.readyState==4){updateditpage(f.xmlHttpReq.responseText)}};f.xmlHttpReq.send(getallvalue(d,c))}function getallvalue(d,c){var f="&action="+d+"&tid="+c;return f}function updateditpage(c){document.getElementById("loadme").innerHTML=c}function commentValidation(m,f,d,l){var k=false;var g=new XMLHttpRequest();if(window.XMLHttpRequest){g.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){g.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}g.xmlHttpReq.open("POST",m,true);g.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.xmlHttpReq.onreadystatechange=function(){if(g.xmlHttpReq.readyState==4){updatepagecom(g.xmlHttpReq.responseText)}};g.xmlHttpReq.send(getquerystringcom(f,d,l))}function getquerystringcom(m,k,g){var l=document.getElementById("title").value;var o=document.getElementById("did").value;var q=document.getElementById("tag").value;var n=FCKeditorAPI.GetInstance("body");var p=getFormHeader("discussion");var d=n.EditorDocument.body.innerHTML;var f=p+"&bodys="+d+"&did="+o+"&preview="+g;return f}function updatepagecom(c){document.getElementById("loadme").innerHTML=c;window.setTimeout("checkdone()",25)}function getFormHeader(k){var g=document.getElementById(k);var l=true;var f="";for(var d=0;d<g.length;++d){if(!l){f+="&"}else{l=false}var c=g.elements[d];f+=getInputNodeHeader(c)}return f}function getInputNodeHeader(k){var g="";var f=k.value.replace(/%/g,"%25");f=f.replace(/&/g,"%26");f=f.replace(/#/g,"%23");f=f.replace(/\n/g,"%0A");f=f.replace(/\r/g,"%0D");if(k.type=="checkbox"){if(k.checked){g=k.name+"="+f}}else{if(k.type=="select-multiple"){var d=true;for(var c=0;c<k.length;++c){if(k.options[c].selected){if(d){d=false}else{g+="&"}f=k.options[c].value.replace(/%/g,"%25");f=f.replace(/&/g,"%26");f=f.replace(/#/g,"%23");g+=k.name+"="+f}}}else{if(k.type=="radio"){if(k.checked){g=k.name+"="+f}}else{g=k.name+"="+f}}}return g}function checkdone(){if(document.getElementById("done").value==1){window.location.reload(true)}}function ftrdtrnVideo(k,d,c){var g=false;var f=new XMLHttpRequest();if(window.XMLHttpRequest){f.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){f.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}f.xmlHttpReq.open("POST",k,true);f.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.xmlHttpReq.onreadystatechange=function(){if(f.xmlHttpReq.readyState==4){updatepageftr(f.xmlHttpReq.responseText)}};f.xmlHttpReq.send(getquerystringftr(d,c))}function getquerystringftr(d,c){var f=/^[0-9]+$/;qstr="page="+escape(d)+"&cnt="+escape(c);return qstr}function updatepageftr(c){document.getElementById("FTR_TRAINING_VIDS").innerHTML=c}function chnlftrdtrnVideo(g,c){var f=false;var d=new XMLHttpRequest();if(window.XMLHttpRequest){d.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){d.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}d.xmlHttpReq.open("POST",g,true);d.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.xmlHttpReq.onreadystatechange=function(){if(d.xmlHttpReq.readyState==4){updatepageftrchnl(d.xmlHttpReq.responseText)}};d.xmlHttpReq.send(getquerystringftrchnl(c))}function getquerystringftrchnl(d,c){var f=/^[0-9]+$/;qstr="page="+escape(d);return qstr}function updatepageftrchnl(c){document.getElementById("CHNL_FTR_TRAINING_VIDS").innerHTML=c}function expertArticles(k,d,c){var g=false;var f=new XMLHttpRequest();if(window.XMLHttpRequest){f.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){f.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}f.xmlHttpReq.open("POST",k,true);f.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.xmlHttpReq.onreadystatechange=function(){if(f.xmlHttpReq.readyState==4){updatepageart(f.xmlHttpReq.responseText)}};f.xmlHttpReq.send(getquerystringart(d,c))}function getquerystringart(d,c){var f=/^[0-9]+$/;qstr="page="+escape(d)+"&cnt="+escape(c);return qstr}function updatepageart(c){document.getElementById("FEATURED_EXPERTS").innerHTML=c}function sponsrdtrnVideo(g,c){var f=false;var d=new XMLHttpRequest();if(window.XMLHttpRequest){d.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){d.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}d.xmlHttpReq.open("POST",g,true);d.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.xmlHttpReq.onreadystatechange=function(){if(d.xmlHttpReq.readyState==4){updatepagesponsrd(d.xmlHttpReq.responseText)}};d.xmlHttpReq.send(getquerystringsponsrd(c))}function getquerystringsponsrd(c){var d=/^[0-9]+$/;qstr="page="+escape(c);return qstr}function updatepagesponsrd(c){document.getElementById("UPDATE_DIV").innerHTML=c}function chnlsponsrdtrnVideo(g,c){var f=false;var d=new XMLHttpRequest();if(window.XMLHttpRequest){d.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){d.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}d.xmlHttpReq.open("POST",g,true);d.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.xmlHttpReq.onreadystatechange=function(){if(d.xmlHttpReq.readyState==4){updatepagesprchnl(d.xmlHttpReq.responseText)}};d.xmlHttpReq.send(getquerystringsprchnl(c))}function getquerystringsprchnl(c){var d=/^[0-9]+$/;qstr="page="+escape(c);return qstr}function updatepagesprchnl(c){document.getElementById("UPDATE_DIV").innerHTML=c}function viewsponsrdtrnVideo(g,c){var f=false;var d=new XMLHttpRequest();if(window.XMLHttpRequest){d.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){d.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}d.xmlHttpReq.open("POST",g,true);d.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.xmlHttpReq.onreadystatechange=function(){if(d.xmlHttpReq.readyState==4){updatepagesprview(d.xmlHttpReq.responseText)}};d.xmlHttpReq.send(getquerystringsprview(c))}function getquerystringsprview(c){var d=/^[0-9]+$/;qstr="page="+escape(c);return qstr}function updatepagesprview(c){document.getElementById("VIEW_UPDATE_DIV").innerHTML=c}function validateform(){if((document.forms.signupForm.email.value!="")&&(document.forms.signupForm.username.value!="")&&(document.forms.signupForm.password1.value!="")&&(document.forms.signupForm.password2.value!="")&&(document.forms.signupForm.password1.value==document.forms.signupForm.password2.value)){document.getElementById("chanels_div").style.display=""}}function show_uoptions(c){if(c.value=="u_vdo"){document.getElementById("upload_vdo").style.display="";document.getElementById("upload_pic").style.display="none"}else{if(c.value=="u_pic"){document.getElementById("upload_vdo").style.display="none";document.getElementById("upload_pic").style.display=""}}}function UploadThumbnail(){var c=validateProfEditForm();if(!c){return true}else{if(document.getElementById("thumbnail").value==""&&document.getElementById("userpic").value==""){var d=confirm("Continue without uploading thumbnail?");if(d==true){return true}else{location.href="#upic";return false}}else{return true}}}function validateProfEditForm(){if(document.getElementById("password1").value==""){return false}else{if(document.getElementById("password2").value==""){return false}else{if(document.getElementById("email").value==""){return false}else{return true}}}}function get_related_news_result(g,c){var f=false;var d=new XMLHttpRequest();if(window.XMLHttpRequest){d.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){d.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}d.xmlHttpReq.open("POST",g,true);d.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.xmlHttpReq.onreadystatechange=function(){if(d.xmlHttpReq.readyState==4){updatepagerelatednewsresult(d.xmlHttpReq.responseText)}};d.xmlHttpReq.send(getquerystringrelatednewsresult(c))}function getquerystringrelatednewsresult(c){var d=/^[0-9]+$/;qstr="keyword="+escape(c);return qstr}function updatepagerelatednewsresult(c){document.getElementById("news_result_loader").style.display="none";document.getElementById("news_result").innerHTML=c;var d=document.getElementById("news_result").offsetHeight;document.getElementById("cloud_tags").style.display="none";document.getElementById("cloud_tags_result").style.display="block";document.getElementById("loader_keyword").style.display="none"}function close_news_result(){document.getElementById("cloud_tags_result").style.display="none";document.getElementById("loader_keyword").style.display="none"}function GetAjaxNews(c,g,f,d){if(c.keyCode==13){page=document.getElementById(d).value;ajax_news_pager(g,f,page)}}function ajax_news_pager(g,d,k){document.getElementById("news_result_loader").style.display="block";var f=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}strURL=g+"?page="+k;c.xmlHttpReq.open("POST",strURL,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updatepagerelatednewsresult(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(getquerystringrelatednewsresult(d))}function initImage(c){image=document.getElementById(c);setOpacity(image,0);image.style.visibility="visible";fadeIn(c,0)}function setOpacity(d,c){c=(c==100)?99.999:c;d.style.filter="alpha(opacity:"+c+")";d.style.KHTMLOpacity=c/120;d.style.MozOpacity=c/120;d.style.opacity=c/120}function fadeIn(d,c){if(document.getElementById){obj=document.getElementById(d);if(c<=120){setOpacity(obj,c);c+=40;window.setTimeout("fadeIn('"+d+"',"+c+")",120)}}}function fadeImage(c){image=document.getElementById(c);getOpacity(image,120);image.style.visibility="visible";fadeOut(c,120)}function getOpacity(d,c){c=(c==100)?99.999:c;d.style.filter="alpha(opacity:"+c+")";d.style.KHTMLOpacity=c/120;d.style.MozOpacity=c/120;d.style.opacity=c/120}function fadeOut(d,c){if(document.getElementById){obj=document.getElementById(d);if(c>=-40){getOpacity(obj,c);c-=40;window.setTimeout("fadeOut('"+d+"',"+c+")",120)}}}function super_categories(g){document.getElementById("ajxLoadersup_cat").style.display="block";var f="index.php?ACTION=GET_SUP_CATS&page="+g;var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",f,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updateSupCatList(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(f)}function updateSupCatList(c){document.getElementById("ajxLoadersup_cat").display="none";document.getElementById("SUP_CATS").innerHTML=c}function bubbledFromChild(d,c){if(c.srcElement){node=c.srcElement}else{if(c.target){node=c.target}}var f=node;if(f===d){f=c.relatedTarget}ev=c||window.event;if(ev.stopPropagation){ev.stopPropagation()}else{ev.cancelBubble=true}return(f&&c.relatedTarget.descendantOf(d))}function showCatbox(c){document.getElementById("NEW_TITLE"+c).style.display="block"}function hideCatbox(c){document.getElementById("NEW_TITLE"+c).style.display="none"}function getTV(f,c){var d;var g=new Ajax.Request("channel_detail.php?action=GetTV&cat="+f+"&chid="+c,{method:"post",parameters:d,onSuccess:populateTVList})}function populateTVList(c){data=c.responseText;document.getElementById("SPONS_VIDS").innerHTML=data}function check_pic_file(){if(document.getElementById("picfile").value==""){alert("Browse To Upload A File.");return false}else{document.form_upload_pic.submit();document.getElementById("progressBoxpic").style.display="block"}}function saveProfile(c,d){if($(c).name=="frmProfile1"){if(!UploadThumbnail()){return}}$("ajaxLoader1").show();$(c).request({action:d,method:"post",parameters:{actionType:"SAVE_PROFILE"},onSuccess:handleSaveProfile})}function handleSaveProfile(d){data=d.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){var c=data.MESSAGE;$("ajaxLoader1").hide();window.location.href="my_profile.php?action=profile_update"}else{$("error_div").innerHTML=data.MESSAGE;$("ajaxLoader1").hide();location.href="#msg"}}}function saveLockerProfile(c,d){if($(c).name=="frmProfile1"){if(!UploadThumbnail()){return}}$("ajaxLoader1").show();$(c).request({action:d,method:"post",parameters:{actionType:"SAVE_PROFILE"},onSuccess:handleSaveLockerProfile})}function handleSaveLockerProfile(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){parent.location.reload()}else{if(data.STATUS=="SUCCESS"){$("error_div").innerHTML=data.MESSAGE;$("ajaxLoader1").hide();location.href="#msg"}else{$("error_div").innerHTML=data.MESSAGE;$("ajaxLoader1").hide();location.href="#msg"}}}function addStuff(c,d){$("ajaxLoader2").show();$(c).request({action:d,method:"post",parameters:{actionType:"ADD_STUFF"},onSuccess:updateStuff})}function updateStuff(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajaxLoader2").hide();$("stuff_title").value="";$("stuff_code").value="";$("current_stuffs").innerHTML=data.UPDATEDATA}else{$("ajaxLoader2").hide();alert(data.MESSAGE)}}}function removeStuff(c,d){$("ajaxLoader2").show();$(c).request({action:d,method:"post",parameters:{actionType:"REMOVE_STUFF"},onSuccess:updateStuff})}function isNumeric(d){var g="0123456789";var f=true;var c;for(i=0;i<d.length&&f==true;i++){c=d.charAt(i);if(g.indexOf(c)==-1){f=false}}return f}function validateUname(c){if(trim(c)==""){$("spn_username").innerHTML="";return}$("spn_username").innerHTML='<span class="error_span"><img src="images/small_ajax_loader.gif" align="top" style="z-index:1000;"></span>';var d;d="actionType=VALIDATE_UNAME&uname="+c;var f=new Ajax.Request("signup.php",{method:"post",parameters:d,onSuccess:handleUnameValidate})}function handleUnameValidate(c){$("spn_username").innerHTML=c.responseText}function trim(d,c){return ltrim(rtrim(d,c),c)}function ltrim(d,c){c=c||"\\s";return d.replace(new RegExp("^["+c+"]+","g"),"")}function rtrim(d,c){c=c||"\\s";return d.replace(new RegExp("["+c+"]+$","g"),"")}function show_control_div(c){document.getElementById("control"+c).style.display="block"}function hide_control_div(c){document.getElementById("control"+c).style.display="none"}function show_control_divmem(c){document.getElementById("controlmem"+c).style.display="block"}function hide_control_divmem(c){document.getElementById("controlmem"+c).style.display="none"}function show_modcontrol_div(c){document.getElementById("controlmod"+c).style.display="block"}function hide_modcontrol_div(c){document.getElementById("controlmod"+c).style.display="none"}function show_admincontrol_div(){document.getElementById("admincontrol").style.display="block"}function hide_admincontrol_div(){document.getElementById("admincontrol").style.display="none"}function show_onlineUsers_control_div(c){document.getElementById("controlonlineUsers"+c).style.display="block"}function hide_onlineUsers_control_div(c){document.getElementById("controlonlineUsers"+c).style.display="none"}function refreshCaptcha(c,d){if(typeof d!="undefined"){document.getElementById(c).src="captcha.php?forsec="+d+"&"+Math.random()}else{document.getElementById(c).src="captcha.php?"+Math.random()}}function key_Submit(c,d){if(c.keyCode==13){document.getElementById(d).focus()}}function generate_widget(c,d){document.getElementById("divVWidget").style.display="block";location.href="#VWidget";document.getElementById("embed_code").value="";document.getElementById("PREVIEW").innerHTML="";$("WidgetajxLoader").show();$("areajxLoader").show();$(c).request({action:d,method:"post",parameters:{actionType:"GENERATE"},onSuccess:handlewidgetActionResponse,onException:handlewidgetActionError})}function handlewidgetActionResponse(c){data=JSON.parse(c.responseText);if(data.STATUS=="SUCCESS"){document.getElementById("embed_code").value=data.MESSAGE;document.getElementById("PREVIEW").innerHTML=data.MESSAGE}$("WidgetajxLoader").hide();$("areajxLoader").hide()}function handlewidgetActionError(c){document.getElementById("ErrWidget").innerHTML="Error processing: Please try later.";$("WidgetajxLoader").hide();$("areajxLoader").hide()}function close_Vwidget(){document.getElementById("divVWidget").style.display="none"}function validatePageBgImage(){document.getElementById("spn_page_bg_file").innerHTML='<img src="images/small_ajax_loader.gif" align="top" style="z-index:1000;">';document.getElementById("frm_bg_image").submit()}function previewProfile(c,d){$(c).request({action:d,method:"post",parameters:{actionType:"PREVIEW_PROFILE"},onSuccess:handlePreviewProfile})}function handlePreviewProfile(d){var c=window.open("advanced_profile.php?action=preview","mywindow","location=1,status=1,scrollbars=1,resizable=yes, width=900,height=700");c.focus()}function showFeatures(){document.getElementById("divFeatures").style.display="block"}function closeDivFeatures(){document.getElementById("divFeatures").style.display="none"}function updateFeature(k,c){var d="feature="+k+"&val="+c;var g=new Ajax.Request("action_advanced_profile.php?action=setFeature",{method:"post",parameters:d,onSuccess:populateFeatureOption})}function populateFeatureOption(f){data=f.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){var c=data.MESSAGE;var d=data.UPDATEDATA;$(c).innerHTML=d}}}function showNotifyAlerts(){close_inbox_text();close_channel_list();close_national_event();closeBroadcastBox();close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();close_cpsetting_box();document.getElementById("homePageControlPopup").style.display="none";document.getElementById("divNotifyAlert").style.display="block";$("notifyErr").innerHTML="";location.href="#notify_error"}function closeNotifyAlerts(){document.getElementById("divNotifyAlert").style.display="none"}function updateNotifyAlerts(c,d){$("ajaxLoader3").show();$(c).request({action:d,method:"post",parameters:{action:"setNotifyAlerts"},onSuccess:populateNotifyAlert})}function populateNotifyAlert(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajaxLoader3").hide();$("notifyErr").innerHTML=data.MESSAGE;document.location.reload()}else{$("notifyErr").innerHTML=data.MESSAGE;location.href="#notify_error";$("ajaxLoader3").hide()}}}function showMobileAlerts(){document.getElementById("divMobileAlert").style.display="block";$("mobileErr").innerHTML=""}function closeMobileAlerts(){document.getElementById("divMobileAlert").style.display="none"}function updateMobileAlerts(c,d){$("ajaxLoader4").show();$(c).request({action:d,method:"post",parameters:{action:"setMobileAlerts"},onSuccess:populateMobileAlert})}function populateMobileAlert(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){$("ajaxLoader4").hide();$("mobileErr").innerHTML=data.MESSAGE;document.location.reload()}else{$("mobileErr").innerHTML=data.MESSAGE;$("ajaxLoader4").hide()}}function show_annotation_div(d,c){document.getElementById("picture_annotation").style.display="block";document.getElementById("annotate_frame").focus();document.getElementById("annotate_frame").style.height=parseInt(c+250)+"px";document.getElementById("annotate_frame").src="annotate_picture.php?VID="+d}function close_annotation_div(){document.getElementById("picture_annotation").style.display="none";document.getElementById("annotate_frame").src="annotate_picture.php"}function close_cp(c,f,d){$(c).request({action:f,method:"post",parameters:{actionType:"CP_OPERATION",cp_status:d},onSuccess:handleCPoperation})}function handleCPoperation(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.MESSAGE=="close"){document.getElementById("CONTROL_HOLDER").style.display="none";document.getElementById("open_cp").style.display="block"}else{document.getElementById("open_cp").style.display="none";document.getElementById("CONTROL_HOLDER").style.display="block"}}}function show_annotation_boxes(){if(document.getElementById("annotation_count").value!=0){for(i=0;i<document.getElementById("annotation_count").value;i++){if(typeof(document.getElementById("anotation_box"+i))!="undefined"){document.getElementById("anotation_box"+i).style.display="block"}}}}function hide_annotation_boxes(){if(document.getElementById("annotation_count").value!=0){for(i=0;i<document.getElementById("annotation_count").value;i++){if(typeof(document.getElementById("anotation_box"+i))!="undefined"){document.getElementById("anotation_box"+i).style.display="none"}}}}function submitSearchForm(c){if(c=="col1"){document.getElementById("search_type").value="site";document.getElementById("searchForm").submit()}else{if(c=="col2"){document.getElementById("search_type").value="web";document.getElementById("searchForm").submit()}}}function hidesearchdivs(){document.getElementById("SEARCH_TEXT_CONTAINER").style.display="none";document.getElementById("SEARCH_TEXT").style.display="none"}function showChatbox(c){window.open("profile_chat.php?id="+c,"Profile_chat","width=835,height=665,toolbar=0,location=0,scrollbars=0,directories=0,status=1,menubar=0,resizable=0")}function showHelpage(c,d){if(d!=""){if(typeof thisMovie(d)!="undefined"){thisMovie(d).sendTextToFlash("pause")}}window.open("site_tutorial.php?vid="+c,"Tutorial_Window","width=1024,height=766,toolbar=0,location=0,scrollbars=0,directories=0,status=1,menubar=0,resizable=0")}function showHelpbox(){close_inbox_text();close_channel_list();closeBroadcastBox();closeNotifyAlerts();close_national_event();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();close_cpsetting_box();document.getElementById("homePageControlPopup").style.display="none";document.getElementById("help_div").style.display="block";populate_help_search_results(document.getElementById("help_res_frm"),"populate_help_search_results.php")}function close_help_box(){document.getElementById("help_result_div").innerHTML="";document.getElementById("help_div").style.display="none";document.getElementById("help_search").value=""}function showCommonHelpbox(){document.getElementById("common_help").style.display="block";populate_comhelp_search_results(document.getElementById("comhelp_res_frm"),"populate_help_search_results.php")}function closeCommonHelpbox(){document.getElementById("comhelp_result_div").innerHTML="";document.getElementById("common_help").style.display="none";document.getElementById("comhelp_search").value=""}function populate_help_search_results(c,d){$("ajxLoader_help").show();$(c).request({action:d,method:"post",parameters:{action:"getHelpSearchResults"},onSuccess:populateHelpResults})}function populateHelpResults(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajxLoader_help").hide();$("help_result_div").innerHTML=data.MESSAGE}else{$("help_result_div").innerHTML=data.MESSAGE;$("ajxLoader_help").hide()}}}function populate_comhelp_search_results(c,d){$("ajxLoader_comhelp").show();$(c).request({action:d,method:"post",parameters:{action:"getHelpSearchResults"},onSuccess:populateComHelpResults})}function populateComHelpResults(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajxLoader_comhelp").hide();$("comhelp_result_div").innerHTML=data.MESSAGE}else{$("comhelp_result_div").innerHTML=data.MESSAGE;$("ajxLoader_comhelp").hide()}}}function collectText(c,g){var f=c;var d=g;thisMovie("flashtutorial").sendTextToFlash(f,d)}function thisMovie(c){if(navigator.appName.indexOf("Microsoft")!=-1){return window[c]}else{return document[c]}}function show_tutorial_player(d,c){setTimeout(function(){collectText(d,c)},2500)}function closePopup(){var d="";var c=thisMovie("flashtutorial");c.sendTextToFlash(d);document.getElementById("user_help").style.visibility="hidden"}function send_chat_req(f,d){var g=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}var k=baseurl+"/widget_files/groupChatPathList.php?id="+f+"&reqid="+d;c.xmlHttpReq.open("POST",k,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){openChatPopUp(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(k)}function openChatPopUp(c){if(c==""){return false}else{window.open("widget_files/groupChatPreloader.php?flashVar="+c,"","width=305,height=560,toolbar=0,location=0,scrollbars=0,directories=0,status=1,menubar=0,resizable=0")}}function show_multi_upload(){window.open("multiple_upload_file.php","Multi_upload","width=800,height=670,toolbar=0,location=0,scrollbars=0,directories=0,status=1,menubar=0,resizable=0")}function showContest(c){document.getElementById("frmContest").reset();document.getElementById("contErr").innerHTML="";document.getElementById("divContest").style.display="block";document.getElementById("hdn_CID").value=c;$("cont_ajaxLoader").show();formObj=document.getElementById("frmContest");postUrl="contests.php";$(formObj).request({action:postUrl,method:"post",parameters:{actionType:"VIEW_CONTEST"},onSuccess:handleshowContestResponse,onException:handleshowContestError})}function handleshowContestResponse(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("contest_Content").innerHTML=data.MESSAGE;document.getElementById("CONTEST_WELCOME").innerHTML=data.UPDATEDATA;$("cont_ajaxLoader").hide()}else{document.getElementById("contErr").innerHTML=data.MESSAGE;$("cont_ajaxLoader").hide();closeContest()}}function handleshowContestError(c){document.getElementById("contErr").innerHTML="Error processing: Please try later.";$("cont_ajaxLoader").hide()}function closeContest(){document.getElementById("contErr").innerHTML="";document.getElementById("contest_Content").innerHTML="";document.getElementById("CONTEST_WELCOME").innerHTML="";document.getElementById("hdn_CID").value="";document.getElementById("frmContest").reset();document.getElementById("divContest").style.display=""}function toggleMobileFields(){if(document.frmNotifyAlerts.chk_mobile_alert.checked==1){document.frmNotifyAlerts.country.disabled="";document.frmNotifyAlerts.carrier.disabled="";document.frmNotifyAlerts.phone.disabled="";document.frmNotifyAlerts.alert_limit.disabled=""}else{document.frmNotifyAlerts.country.disabled="disabled";document.frmNotifyAlerts.carrier.disabled="disabled";document.frmNotifyAlerts.phone.disabled="disabled";document.frmNotifyAlerts.alert_limit.disabled="disabled"}}function showBroadcastBox(){close_inbox_text();close_national_event();close_channel_list();closeNotifyAlerts();close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();close_cpsetting_box();document.getElementById("homePageControlPopup").style.display="none";document.getElementById("divBroadcast").style.display="block";$("ADD_BROADCAST_HEADERctnr").style.width=302+"px";$("add_broadcast_box").style.width=360+"px";document.frmBroadcasts.btype[0].disabled="";document.frmBroadcasts.btype[1].disabled="";$("addBroadcastErr").innerHTML="";$("frmBroadcasts").reset();$("groups_div").hide();$("friends_div").hide();$("schools_div").hide();$("users_div").hide();calculate_time_zone()}function closeBroadcastBox(){document.getElementById("divBroadcast").style.display="none"}function announceBroadcast(c,d){$("ajaxLoader5").show();$(c).request({action:d,method:"post",parameters:{action:"createBroadcast"},onSuccess:handleAnnounceBroadcast})}function handleAnnounceBroadcast(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajaxLoader5").hide();$("addBroadcastErr").innerHTML=data.MESSAGE;location.href="my_broadcasts.php?action=add_schedule"}else{$("addBroadcastErr").innerHTML=data.MESSAGE;$("ajaxLoader5").hide();location.href="#add_bcast"}}}function close_schedule_msg_popup(){$("add_schedule_msg_div").hide()}function toggleSchools(c,d){if(c){$("schools_div").show();$("schools_list").innerHTML="";if(d==1){parent.$("bcastFrame").height=parseInt(parent.$("bcastFrame").height)+35+"px"}}else{$("schools_div").hide();if(d==1){parent.$("bcastFrame").height=parseInt(parent.$("bcastFrame").height)-35+"px"}}}function toggleUsers(c,d){if(c){$("users_div").show();if(d==1){parent.$("bcastFrame").height=parseInt(parent.$("bcastFrame").height)+140+"px"}}else{$("users_div").hide();if(d==1){parent.$("bcastFrame").height=parseInt(parent.$("bcastFrame").height)-140+"px"}}}function getSchoolsList(c){if(c.length==5&&isNumeric(c)){$("schools_list").innerHTML='<img src="images/small_ajax_loader.gif" style="z-index:1000;">';updateSchoolsList(c)}}function updateSchoolsList(d){var c;var f=new Ajax.Request(baseurl+"/action_my_profile.php?action=GetSchoools&zip="+d,{method:"post",parameters:c,onSuccess:populateSchools})}function populateSchools(c){data=c.responseText;$("schools_list").innerHTML=data}function validateZip(c){if(!isNumeric(c)||c.length!=5){$("schools_list").innerHTML='<span class="error_text">Invalid zip</span>'}}function announceTo(c){if(c=="groups"){document.frmBroadcasts.btype[0].disabled="";document.frmBroadcasts.btype[1].disabled="";if($("groups_div").style.display!="none"){return}if($("friends_div").style.display!="none"){$("friends_div").style.display="none";$("ADD_BROADCAST_HEADERctnr").style.width=302+"px";$("add_broadcast_box").style.width=360+"px";$("ADD_BROADCAST_HEADERctnr").style.width=302+500+"px";$("add_broadcast_box").style.width=360+500+"px";$("groups_div").show()}else{$("ADD_BROADCAST_HEADERctnr").style.width=302+500+"px";$("add_broadcast_box").style.width=360+500+"px";$("groups_div").show()}location.href="#add_bcast"}else{if(c=="friends"){document.frmBroadcasts.btype[1].checked=true;document.frmBroadcasts.btype[0].disabled="disabled";document.frmBroadcasts.btype[1].disabled="disabled";if($("friends_div").style.display!="none"){return}if($("groups_div").style.display!="none"){$("groups_div").style.display="none";$("ADD_BROADCAST_HEADERctnr").style.width=302+"px";$("add_broadcast_box").style.width=360+"px";$("ADD_BROADCAST_HEADERctnr").style.width=302+500+"px";$("add_broadcast_box").style.width=360+500+"px";$("friends_div").show()}else{$("ADD_BROADCAST_HEADERctnr").style.width=302+500+"px";$("add_broadcast_box").style.width=360+500+"px";$("friends_div").show()}location.href="#add_bcast"}else{if(c=="general"){document.frmBroadcasts.btype[0].disabled="";document.frmBroadcasts.btype[1].disabled="";if($("groups_div").style.display!="none"){$("groups_div").style.display="none";$("ADD_BROADCAST_HEADERctnr").style.width=302+"px";$("add_broadcast_box").style.width=360+"px"}if($("friends_div").style.display!="none"){$("friends_div").style.display="none";$("ADD_BROADCAST_HEADERctnr").style.width=302+"px";$("add_broadcast_box").style.width=360+"px"}}}}}function show_edit_bcast_box(c){document.getElementById("divEditBroadcast").style.display="block";$("ajaxLoader6").show();var d="edit_bcast_form.php?bid="+c;document.getElementById("bcastFrame").src=d;$("ajaxLoader6").hide()}function close_edit_bcast_box(){document.getElementById("divEditBroadcast").style.display="none";document.getElementById("bcastFrame").src=""}function show_broadcast(c){page_url="setbroadcast.php?bid="+c;window.open(page_url,"","width=1025,height=768,toolbar=0,location=0,scrollbars=1,directories=0,status=1,menubar=0,resizable=1")}function view_broadcast(c){page_url="view_broadcast.php?bid="+c;window.open(page_url,"","width=1025,height=768,toolbar=0,location=0,scrollbars=1,directories=0,status=1,menubar=0,resizable=1");if(typeof thisMovie("featureLivebroadcast")!="undefined"){thisMovie("featureLivebroadcast").sendTextToFlash("pause")}}function show_join_broadcast_box(c){document.getElementById("join_broadcast_box").style.display="block";$("ajxLoader_join_bcast").hide();$("divErr_join_bcast").innerHTML="";document.getElementById("bid").value=c;location.href="#join_bcast"}function close_join_broadcast_box(){$("join_broadcast_box").hide()}function show_broadcast_details(f,c,d,g){document.getElementById(f).style.display="none";document.getElementById(c).style.display="block";document.getElementById(d).style.display="block";document.getElementById(g).style.display="block"}function hide_broadcast_details(f,c,d,g){document.getElementById(g).style.display="none";document.getElementById(c).style.display="none";document.getElementById(d).style.display="none";document.getElementById(f).style.display="block"}function show_broadcast_dir_details(d,c,f){document.getElementById(d).style.display="none";document.getElementById(c).style.display="block";document.getElementById(f).style.display="block"}function hide_broadcast_dir_details(d,c,f){document.getElementById(f).style.display="none";document.getElementById(c).style.display="none";document.getElementById(d).style.display="block"}function postBcastJoinRequest(c,d){$("ajxLoader_join_bcast").show();$(c).request({action:d,method:"post",parameters:{actionType:"JOIN_PRIVATE_BCAST"},onSuccess:handleJoinBcastRequest,onException:handleJoinBcastRequestError})}function handleJoinBcastRequest(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{document.getElementById("divErr_join_bcast").innerHTML=data.MESSAGE;$("ajxLoader_join_bcast").hide()}}function handleJoinBcastRequestError(c){}function actBcastRequest(f,d,c){$("ajxLoader").show();var g;g="actionType=BCAST_REQUEST_REPLY&bid="+f+"&sender_id="+d+"&act="+c;var k=new Ajax.Request(baseurl+"/action_my_profile.php",{method:"post",parameters:g,onSuccess:handleActBcastRequest})}function handleActBcastRequest(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{document.getElementById("act_join_bcast_box").style.display="block";$("ajxLoader").hide()}}function close_act_join_bcast_box(){$("act_join_bcast_box").hide()}function show_join_bcast_groups_box(c){document.getElementById("join_bcast_groups_box").style.display="block";document.getElementById("ajxLoader_join_group").style.display="block";document.getElementById("divErr_join_group").innerHTML="";document.getElementById("bcast_groups_div").innerHTML="";location.href="#join_bgroup";populate_bcast_groups(c)}function close_join_bcast_groups_box(){document.getElementById("ajxLoader_join_group").style.display="none";document.getElementById("join_bcast_groups_box").style.display="none"}function populate_bcast_groups(c){var d;d="actionType=GET_BCAST_GROUPS&bid="+c;var f=new Ajax.Request(baseurl+"/action_my_profile.php?",{method:"post",parameters:d,onSuccess:handleBcastGroupsList})}function handleBcastGroupsList(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("bcast_groups_div").innerHTML=data.UPDATEDATA;document.getElementById("ajxLoader_join_group").style.display="none"}}function postJoinBcastGroups(c,d){document.getElementById("ajxLoader_join_group").style.display="block";$(c).request({action:d,method:"post",parameters:{actionType:"JOIN_BCAST_GROUPS"},onSuccess:handleJoinBcastGroups,onException:JoinBcastGroupsError})}function handleJoinBcastGroups(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divErr_join_group").innerHTML=data.MESSAGE;document.getElementById("ajxLoader_join_group").style.display="none";location.reload()}else{document.getElementById("divErr_join_group").innerHTML=data.MESSAGE;document.getElementById("ajxLoader_join_group").style.display="none"}}}function JoinBcastGroupsError(){}function show_join_group_box(){document.getElementById("join_group_box").style.display="block";$("ajxLoader_join_group").hide();document.getElementById("divErr_join_grp").innerHTML=""}function close_join_group_box(){$("join_group_box").hide()}function postJoinGroup(c,d){$("ajxLoader_join_group").show();$(c).request({action:d,method:"post",parameters:{actionType:"JOIN_GROUP"},onSuccess:handleJoinGroup,onException:handleJoinGroupError})}function handleJoinGroup(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.MESSAGE=="REDIRECT"){location.href=data.UPDATEDATA}else{document.getElementById("divErr_join_grp").innerHTML=data.MESSAGE}$("ajxLoader_join_group").hide()}}function handleJoinGroupError(c){}function resetEditBroadcast(){var c=document.getElementById("chk_school").checked;var d=document.getElementById("chk_adduser").checked;document.getElementById("frmEditBroadcasts").reset();if(document.getElementById("chk_school").checked==c){toggleSchools(document.getElementById("chk_school").checked,0)}else{toggleSchools(document.getElementById("chk_school").checked,1)}if(document.getElementById("chk_adduser").checked==d){toggleUsers(document.getElementById("chk_adduser").checked,0)}else{toggleUsers(document.getElementById("chk_adduser").checked,1)}}function editBroadcast(c,d){$("ajaxLoader5").show();$(c).request({action:d,method:"post",parameters:{action:"editBroadcast"},onSuccess:handleEditBroadcast})}function handleEditBroadcast(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajaxLoader5").hide();$("broadcastErr").innerHTML=data.MESSAGE;parent.document.location.reload()}else{$("broadcastErr").innerHTML=data.MESSAGE;$("ajaxLoader5").hide();location.href="#bcast"}}}function edit_announceTo(c){if(c=="groups"){document.frmEditBroadcasts.btype[0].disabled="";document.frmEditBroadcasts.btype[1].disabled="";if($("groups_div").style.display!="none"){return}if($("friends_div").style.display!="none"){$("friends_div").style.display="none";parent.$("BROADCAST_HEADERctnr").style.width=302+"px";parent.$("broadcast_box").style.width=360+"px";parent.$("bcastFrame").style.width=360+"px";parent.$("BROADCAST_HEADERctnr").style.width=302+500+"px";parent.$("broadcast_box").style.width=360+500+"px";parent.$("bcastFrame").style.width=360+500+"px";$("groups_div").show()}else{parent.$("BROADCAST_HEADERctnr").style.width=302+500+"px";parent.$("broadcast_box").style.width=360+500+"px";parent.$("bcastFrame").style.width=360+500+"px";$("groups_div").show()}}else{if(c=="friends"){document.frmEditBroadcasts.btype[1].checked=true;document.frmEditBroadcasts.btype[0].disabled="disabled";document.frmEditBroadcasts.btype[1].disabled="disabled";if($("friends_div").style.display!="none"){return}if($("groups_div").style.display!="none"){$("groups_div").style.display="none";parent.$("BROADCAST_HEADERctnr").style.width=302+"px";parent.$("broadcast_box").style.width=360+"px";parent.$("bcastFrame").style.width=360+"px";parent.$("BROADCAST_HEADERctnr").style.width=302+500+"px";parent.$("broadcast_box").style.width=360+500+"px";parent.$("bcastFrame").style.width=360+500+"px";$("friends_div").show()}else{parent.$("BROADCAST_HEADERctnr").style.width=302+500+"px";parent.$("broadcast_box").style.width=360+500+"px";parent.$("bcastFrame").style.width=360+500+"px";$("friends_div").show()}}else{if(c=="general"){document.frmEditBroadcasts.btype[0].disabled="";document.frmEditBroadcasts.btype[1].disabled="";if($("groups_div").style.display!="none"){$("groups_div").style.display="none";parent.$("BROADCAST_HEADERctnr").style.width=302+"px";parent.$("broadcast_box").style.width=360+"px";parent.$("bcastFrame").style.width=360+"px"}if($("friends_div").style.display!="none"){$("friends_div").style.display="none";parent.$("BROADCAST_HEADERctnr").style.width=302+"px";parent.$("broadcast_box").style.width=360+"px";parent.$("bcastFrame").style.width=360+"px"}}}}}function addBroadcastTime(c,d){$("ajaxLoader_bschedule2").show();$(c).request({action:d,method:"post",parameters:{actionType:"SCHEDULE_BCAST"},onSuccess:handleAddBroadcastTime,onException:handleAddBroadcastTimeError})}function handleAddBroadcastTime(g){data=g.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("scheduleErr").innerHTML=data.MESSAGE;for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}$("ajaxLoader_bschedule2").hide();document.getElementById("div_add").style.display="block";document.getElementById("div_update").style.display="none";resetScheduleForm();location.reload()}else{document.getElementById("scheduleErr").innerHTML=data.MESSAGE;document.getElementById("ajaxLoader_bschedule2").style.display="none"}}function handleAddBroadcastTimeError(c){}function resetScheduleForm(){document.getElementById("action").value="Add";document.getElementById("sid").value="";document.getElementById("title").value="";document.getElementById("bdate").value="";document.getElementById("hr").value="";document.getElementById("min").value="";document.getElementById("am_pm").selectedIndex="0"}function editSchedule(c){document.getElementById("action").value="Edit";document.getElementById("sid").value=c;$("ajaxLoader_bschedule2").show();var d="bcast_schedule_form.php";$("frmBcastSchedule").request({action:d,method:"post",parameters:{actionType:"POPULATE_SCHEDULE",sid:c},onSuccess:handleEditBroadcastTime,onException:handleEditBroadcastTimeError})}function handleEditBroadcastTime(g){data=g.responseText.evalJSON();document.getElementById("div_add").style.display="none";document.getElementById("div_update").style.display="block";document.getElementById("scheduleErr").innerHTML="";for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;if(f=="ajx_bdate"){document.getElementById("bdate").value=d}else{$(f).innerHTML=d}}$("ajaxLoader_bschedule2").hide()}function handleEditBroadcastTimeError(c){}function deleteSchedule(c){if(confirm("Are you sure you want to delete the shedule?")){$("ajaxLoader_bschedule2").show();var d="&bid="+document.getElementById("bid").value;var f=new Ajax.Request("bcast_schedule_form.php?actionType=DELETE_SCHEDULE&sid="+c,{method:"post",parameters:d,onSuccess:handleDeleteBroadcastTime})}}function handleDeleteBroadcastTime(g){data=g.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("scheduleErr").innerHTML=data.MESSAGE;for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}}$("ajaxLoader_bschedule2").hide()}function open_bcast_schedule_box(c){document.getElementById("divBcastSchedule").style.display="block";document.getElementById("ajaxLoader_bschedule").style.display="block";var d="bcast_schedule_form.php?bid="+c;document.getElementById("scheduleBcastFrame").src=d;$("ajaxLoader_bschedule").hide()}function close_bcast_schedule_box(){document.getElementById("divBcastSchedule").style.display="none";document.getElementById("scheduleBcastFrame").src=""}function photoTransferProcess(){var c=0;for(var d=1;d<=document.getElementById("count").value;d++){if(document.getElementById("flicker_photos"+d).checked==true){c=1;break}}if(c==1){document.getElementById("pic_transferDiv").style.display="block";$("ajxLoader_registration").show()}}function calculate_time_zone(){var p=new Date();var d=new Date(p.getFullYear(),0,1,0,0,0,0);var n=new Date(p.getFullYear(),6,1,0,0,0,0);var o=d.toGMTString();var q=new Date(o.substring(0,o.lastIndexOf(" ")-1));o=n.toGMTString();var m=new Date(o.substring(0,o.lastIndexOf(" ")-1));var l=(d-q)/(1000*60*60);var k=(n-m)/(1000*60*60);var g;if(l==k){g="0"}else{var c=l-k;if(c>=0){l=k}g="1"}var f;if(document.getElementById("timezone")){for(f=0;f<document.getElementById("timezone").options.length;f++){if(document.getElementById("timezone").options[f].value==convert(l)+","+g){document.getElementById("timezone").selectedIndex=f;break}}}}function convert(k){var c=parseInt(k);k-=parseInt(k);k*=60;var g=parseInt(k);k-=parseInt(k);k*=60;var f=parseInt(k);var d=c;if(c==0){d="00"}else{if(c>0){d=(c<10)?"+0"+c:"+"+c}else{d=(c>-10)?"-0"+Math.abs(c):c}}g=(g<10)?"0"+g:g;return d+":"+g}function set_time_zone(){var q=new Date();var d=new Date(q.getFullYear(),0,1,0,0,0,0);var o=new Date(q.getFullYear(),6,1,0,0,0,0);var p=d.toGMTString();var r=new Date(p.substring(0,p.lastIndexOf(" ")-1));p=o.toGMTString();var n=new Date(p.substring(0,p.lastIndexOf(" ")-1));var m=(d-r)/(1000*60*60);var l=(o-n)/(1000*60*60);var k;if(m==l){k="0"}else{var c=m-l;if(c>=0){m=l}k="1"}var g;var f=convert(m)+","+k;save_time_zone(f)}function save_time_zone(d){var g=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}var f="diff="+d;var k=baseurl+"/action_my_profile.php";c.xmlHttpReq.open("POST",k,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){handleTimezone(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(f)}function handleTimezone(c){}set_time_zone();function show_becomeExpert_popUp(){$("ajxLoaderbecameExpert").hide();document.getElementById("becomeAnExpertLightbox").style.display="block"}function hide_becomeExpert_popUp(){$("ajxLoaderbecameExpert").hide();document.getElementById("becomeAnExpertLightbox").style.display="none";reset_becomeExpert_popUp()}function reset_becomeExpert_popUp(){reloadCaptchaBex();document.getElementById("bex_article").value="";document.getElementById("bex_capcha").value="";document.becomeExpertForm.channel.selectedIndex=0;document.getElementById("bex_terms").checked=false;document.getElementById("errbecomeExpertForm").innerHTML="";$("ajxLoaderbecameExpert").hide()}function submit_bex_request(c,d){$("ajxLoaderbecameExpert").show();$(c).request({action:d,method:"post",parameters:{actionType:"BECOME_EXP_REQ"},onSuccess:handlebexRequestResponse,onException:handlebexRequestError})}function handlebexRequestResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){if(data.MESSAGE!=""){location.href=data.MESSAGE}else{hide_becomeExpert_popUp();document.getElementById("expert_req_msg").style.display="block";document.getElementById("expert_req_msg").innerHTML="Your request for being expert has been sent successfully !"}}else{document.getElementById("errbecomeExpertForm").innerHTML=data.MESSAGE;reloadCaptchaBex()}$("ajxLoaderbecameExpert").hide()}}function reloadCaptchaBex(){document.getElementById("imgCaptchaBex").src="captcha.php?forsec=becomex&"+Math.random()}function handlebexRequestError(c){document.getElementById("errbecomeExpertForm").innerHTML="Error processing: Please try later.";$("ajxLoaderbecameExpert").hide();reloadCaptchaBex()}function mouseX(g){e=g;if(!e){if(window.event){e=window.event}else{return}}if(typeof(e.pageX)=="number"){var f=e.pageX;var c=e.pageY}else{if(typeof(e.clientX)=="number"){var f=e.clientX;var c=e.clientY;var d=(window.navigator.userAgent.indexOf("Opera")+1)||(window.ScriptEngine&&ScriptEngine().indexOf("InScript")+1)||(navigator.vendor=="KDE");if(!d){if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){f+=document.body.scrollLeft;c+=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){f+=document.documentElement.scrollLeft;c+=document.documentElement.scrollTop}}}}else{return}}return f}function mouseY(g){e=g;if(!e){if(window.event){e=window.event}else{return}}if(typeof(e.pageX)=="number"){var f=e.pageX;var c=e.pageY}else{if(typeof(e.clientX)=="number"){var f=e.clientX;var c=e.clientY;var d=(window.navigator.userAgent.indexOf("Opera")+1)||(window.ScriptEngine&&ScriptEngine().indexOf("InScript")+1)||(navigator.vendor=="KDE");if(!d){if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){f+=document.body.scrollLeft;c+=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){f+=document.documentElement.scrollLeft;c+=document.documentElement.scrollTop}}}}else{return}}return c}function clearRateType(){document.getElementById("voteProcessthank").innerHTML=""}function setRateType(c){document.getElementById("voteProcessthank").innerHTML=c}function rateVideo(l,k,c,g,m){if(l=="y"){var f=mouseX(k);var d=mouseY(k);$("login_box").style.top=d+"px";$("login_box").style.left=100+"px";show_login_box();document.getElementById("rating").value=g;document.getElementById("page_name").value="view_video";document.getElementById("action").value="rate_video";document.getElementById("login_id").focus()}else{document.getElementById("voteProcessthank").innerHTML='<img src="images/small_ajax_loader.gif"/>';updateVideoRatingDiv(g,m);fxRate(c,g,m)}}function rategrpVideo(g,d,c,f,k){if(g=="y"){show_login_text(d,"page")}else{document.getElementById("voteProcessthank").innerHTML='<img src="images/small_ajax_loader.gif"/>';updateVideoRatingDiv(f,k);fxRate(c,f,k)}}function updateVideoRatingDiv(d,g){var c="rate="+d+"&VID="+g+"&action=updateVideoRatingDiv";var f=new Ajax.Request("login_operations.php",{method:"post",parameters:c,onSuccess:handleVideoRatingDiv})}function handleVideoRatingDiv(g){data=g.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}}}}function commentVideo(f){var d=mouseX(f);var c=mouseY(f);$("login_box").style.top=c+"px";$("login_box").style.left=650+"px";show_login_box();document.getElementById("page_name").value="view_video";document.getElementById("action").value="comment_video";document.getElementById("login_id").focus()}function commentphotoset(f){var d=mouseX(f);var c=mouseY(f);$("login_box").style.top=c+"px";$("login_box").style.left=650+"px";show_login_box();document.getElementById("page_name").value="view_photoset";document.getElementById("action").value="comment_photoset";document.getElementById("login_id").focus()}function show_login_box(){document.getElementById("login_box").style.display="block";document.getElementById("login_ajxLoader").style.display="none";document.getElementById("login_divErr").innerHTML="";document.getElementById("login_id").value="";document.getElementById("login_pwd").value=""}function close_login_box(){document.getElementById("login_box").style.display="none";document.getElementById("login_id").value="";document.getElementById("login_pwd").value="";document.getElementById("login_ajxLoader").style.display="none"}function getEmbedCode(c){var d='<embed src="'+baseurl+"/flvplayer/miniPlayer_preloader.swf?xmlPath="+baseurl+"/flvplayer/miniplayer_config.php?viewkey="+c+'" quality="high" bgcolor="#000000" width="512" height="296" align="middle" allowfullscreen="true" allowscriptaccess="always" wmode="transparent" name="miniPlayer"  type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer" />';return d}function rateTrVideo(l,k,c,g,m){if(l=="y"){var f=mouseX(k);var d=mouseY(k);$("login_box").style.top=d+"px";$("login_box").style.left=100+"px";show_login_box();document.getElementById("rating").value=g;document.getElementById("page_name").value="view_training_video";document.getElementById("action").value="rate_training_video";document.getElementById("login_id").focus()}else{updateTrvVideoRatingDiv(g,m);fxTrvRate(c,g,m)}}function updateTrvVideoRatingDiv(d,g){var c="rate="+d+"&VID="+g+"&action=updateTrvVideoRatingDiv";var f=new Ajax.Request("login_operations.php",{method:"post",parameters:c,onSuccess:handleTrvVideoRatingDiv})}function handleTrvVideoRatingDiv(g){data=g.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}}}}function rate_comment_view(c){updateCommentRatingDiv(c)}function updateCommentRatingDiv(d){document.getElementById("hdnRate").value=d;var c="rate="+d+"&action=updateCommentRatingDiv";var f=new Ajax.Request("login_operations.php",{method:"post",parameters:c,onSuccess:handleCommentRatingDiv})}function handleCommentRatingDiv(g){data=g.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}}}}function rate_comment_view_pic(c){updateCommentRatingDivPic(c)}function updateCommentRatingDivPic(d){document.getElementById("hdnRate").value=d;var c="rate="+d+"&action=updateCommentRatingDivPic";var f=new Ajax.Request("login_operations.php",{method:"post",parameters:c,onSuccess:handleCommentRatingDivPic})}function handleCommentRatingDivPic(g){data=g.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}}}}function clearRateType_comment(){document.getElementById("voteProcessthank_comment").innerHTML=""}function setRateType_comment(c){document.getElementById("voteProcessthank_comment").innerHTML=c}function ratePicture(l,k,c,g,m){if(l=="y"){var f=mouseX(k);var d=mouseY(k);$("login_box").style.top=d+"px";$("login_box").style.left=100+"px";show_login_box();document.getElementById("rating").value=g;document.getElementById("page_name").value="view_picture";document.getElementById("action").value="rate_view_picture";document.getElementById("login_id").focus()}else{updatePictureRatingDiv(g,m);fxRatePictures(c,g,m)}}function updatePictureRatingDiv(d,g){var c="rate="+d+"&VID="+g+"&action=updatePictureRatingDiv";var f=new Ajax.Request("login_operations.php",{method:"post",parameters:c,onSuccess:handlePictureRatingDiv})}function handlePictureRatingDiv(g){data=g.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}}}}function ratePhotoset(m,l,d,k,c){if(m=="y"){var g=mouseX(l);var f=mouseY(l);$("login_box").style.top=f+"px";$("login_box").style.left=100+"px";show_login_box();document.getElementById("rating").value=k;document.getElementById("page_name").value="view_photoset";document.getElementById("action").value="rate_view_photoset";document.getElementById("login_id").focus()}else{updatePhotosetRatingDiv(k,c);fxRatePhotoset(d,k,c)}}function updatePhotosetRatingDiv(f,c){var d="rate="+f+"&PSID="+c+"&action=updatePhotosetRatingDiv";var g=new Ajax.Request("login_operations.php",{method:"post",parameters:d,onSuccess:handlePhotosetRatingDiv})}function handlePhotosetRatingDiv(g){data=g.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}}}}function showfeedbackdiv(){document.getElementById("feedback_div").style.display="block";document.getElementById("user_feedback_frm").reset();document.getElementById("feedbackdivErr").innerHTML=""}function show_feedback_div(){$("feedbackajaxLoader").hide();var c="actionType=SHOW_FEEDBACK";var d=new Ajax.Request("check_feedback.php",{method:"post",parameters:c,onSuccess:handleFeedbackDiv})}function handleFeedbackDiv(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("feedback_div").style.display="block"}}function close_feedback_div(){$("feedbackajaxLoader").hide();var c="actionType=CLOSE_FEEDBACK";var d=new Ajax.Request("check_feedback.php",{method:"post",parameters:c,onSuccess:handleCloseFeedbackDiv})}function handleCloseFeedbackDiv(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("feedback_div").style.display="none"}}function postFeedback(c,d){$("feedbackajaxLoader").show();$(c).request({action:d,method:"post",parameters:{actionType:"POST_FEEDBACK"},onSuccess:handleFeedbackResponse,onException:handleFeedbackError})}function handleFeedbackResponse(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("feedbackdivErr").innerHTML=data.MESSAGE;document.getElementById("feedback_div").style.display="none"}else{document.getElementById("feedbackdivErr").innerHTML=data.MESSAGE}$("feedbackajaxLoader").hide()}function handleFeedbackError(c){document.getElementById("feedbackdivErr").innerHTML="Error processing: Please try later.";$("feedbackajaxLoader").hide()}function exit(){window.close()}function closeUpgradePopUP(){var c="actionType=CLOSE_UPGRADE_POPUP";var d=new Ajax.Request("check_flash_upgrade.php",{method:"post",parameters:c,onSuccess:handleCloseUpgradePopUP})}function handleCloseUpgradePopUP(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("upgradeFlash_div").style.display="none"}}function openUpgradePopUP(){var c=DetectFlashVer(10,0,0);if(!c){document.getElementById("upgradeFlash_div").style.display="block"}}function close_beta_form_div(){var c="actionType=CLOSE_BETA_FORM";var d=new Ajax.Request("check_beta_form.php",{method:"post",parameters:c,onSuccess:handleCloseBetaFormDiv})}function handleCloseBetaFormDiv(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("beta_test_div").style.display="none"}}function show_beta_form_div(){document.getElementById("beta_test_div").style.display="block"}function clear_searchtext(){document.getElementById("SEARCH_TEXT_CONTAINER").style.display="none";document.getElementById("SEARCH_TEXT").style.display="none";document.getElementById("SEARCH_TEXT").innerHTML=""}function clear_search_text(){if(document.getElementById("search_id").value=="search..."){document.getElementById("search_id").value=""}else{if(document.getElementById("search_id").value==""){document.getElementById("search_id").value="search..."}}}function clear_errsearchtext(){if(document.getElementById("err_search_id").value=="search..."){document.getElementById("err_search_id").value=""}else{if(document.getElementById("err_search_id").value==""){document.getElementById("err_search_id").value="search..."}}}var scrollStep=1;var timerLeft="";var timerRight="";function scrollDivTop(c){clearTimeout(timerRight);document.getElementById(c).scrollBottom+=scrollStep;document.getElementById(c).scrollTop-=scrollStep;timerRight=setTimeout("scrollDivTop('"+c+"')",10)}function scrollDivBottom(c){clearTimeout(timerLeft);document.getElementById(c).scrollTop+=scrollStep;document.getElementById(c).scrollBottom-=scrollStep;timerLeft=setTimeout("scrollDivBottom('"+c+"')",10)}function scrollDivLeft(c){clearTimeout(timerRight);document.getElementById(c).scrollLeft+=scrollStep;timerRight=setTimeout("scrollDivLeft('"+c+"')",10)}function scrollDivRight(c){clearTimeout(timerLeft);document.getElementById(c).scrollLeft-=scrollStep;timerLeft=setTimeout("scrollDivRight('"+c+"')",10)}function toLeft(c){document.getElementById(c).scrollLeft=0}function toRight(c){document.getElementById(c).scrollLeft=document.getElementById(c).scrollWidth}function stopMe(){clearTimeout(timerRight);clearTimeout(timerLeft)}function showVideoOverlayAd(f){var c;var d=new Ajax.Request("get_overlay_ad.php?cid="+f+"&type=video",{method:"post",parameters:c,onSuccess:handleVideoOverlayAd})}function handleVideoOverlayAd(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){if(data.UPDATEDATA!=""){$("overlay_ad").innerHTML=data.UPDATEDATA;$("overlay_ad").style.height=$("video_desc_rate").offsetHeight+"px";document.getElementById("overlay_ad").style.display="block"}if(data.MESSAGE!=""){$("RELATED_AD_SPACE").innerHTML=data.MESSAGE}}}function closeVideoOverlayAd(){$("overlay_ad").innerHTML="";$("overlay_ad").hide()}function showEditorPickOverlayAd(f){var c;var d=new Ajax.Request("get_overlay_ad.php?cid="+f+"&type=editorpick",{method:"post",parameters:c,onSuccess:handleEditorPickOverlayAd})}function handleEditorPickOverlayAd(g){data=g.responseText.evalJSON();if(data.STATUS=="SUCCESS"){for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;if(d!=""){$(f).innerHTML=d;$(f).style.display="block"}}if(data.MESSAGE!=""){$("AD_SPACE").innerHTML='<div class="body">'+data.MESSAGE+"</div>"}}}function closeEditorPickOverlayAd(){$("overlay_ad_left").innerHTML="";$("overlay_ad_left").hide();$("overlay_ad_top").innerHTML="";$("overlay_ad_top").hide()}function countLinkedAd(d,c){updateLinkedAdCount(d);window.open(c)}function updateLinkedAdCount(f){var c;var d=new Ajax.Request("get_overlay_ad.php?cid="+f+"&type=update_linked_ad_click",{method:"post",parameters:c,onSuccess:handleUpdateLinkedAdCount})}function handleUpdateLinkedAdCount(c){}function countOverlaydAd(d,c){updateOverlayAdCount(d);window.open(c)}function updateOverlayAdCount(f){var c;var d=new Ajax.Request("get_overlay_ad.php?cid="+f+"&type=update_linked_ad_click",{method:"post",parameters:c,onSuccess:handleUpdateOverlayAdCount})}function handleUpdateOverlayAdCount(c){}function showMap(d){document.getElementById("gmap").style.display="block";document.getElementById("event_loc").innerHTML=d;var c="gmap.php?loc="+d;document.getElementById("gmap_frame").src=c;location.href="#gmap_popup"}function hideMap(c){document.getElementById("gmap").style.display="none"}function show_gen_chat_box(){close_inbox_text();close_channel_list();closeBroadcastBox();closeNotifyAlerts();close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_national_event();close_cpsetting_box();var c='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="310" height="435" id="chat_preloader" align="middle" VIEWASTEXT><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="movie" value="'+baseurl+"/flvplayer/instant_chat_player.swf?xmlPath="+baseurl+"/widget_files/instantChatPathList.php?uid="+chat_session_id+'" /><param name="quality" value="high" /><param name="bgcolor" value="" /><embed   src="'+baseurl+"/flvplayer/instant_chat_player.swf?xmlPath="+baseurl+"/widget_files/instantChatPathList.php?uid="+chat_session_id+'" quality="high" bgcolor="" width="310" height="435" name="preloader" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';document.getElementById("chat_object_div").innerHTML=c;document.getElementById("gen_chat_div").style.visibility="visible";document.getElementById("ajxLoader_genchat").style.display="none";document.getElementById("ajxLoader_genchat").innerHTML=""}function close_gen_chat_box(){document.getElementById("ajxLoader_genchat").style.display="none";document.getElementById("ajxLoader_genchat").innerHTML="";document.getElementById("gen_chat_div").style.visibility="hidden";document.getElementById("chat_object_div").innerHTML=""}function show_gen_chat_box_myL(){close_inbox_text();close_channel_list();closeBroadcastBox();closeNotifyAlerts();close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_national_event();close_cpsetting_box();document.getElementById("ajxLoader_genchat_ml").style.display="none";document.getElementById("ajxLoader_genchat_ml").innerHTML="";document.getElementById("homePageControlPopup").style.display="none";document.getElementById("gen_chat_div_myL").style.visibility="visible"}function close_gen_chat_box_myL(){document.getElementById("ajxLoader_genchat_ml").style.display="none";document.getElementById("ajxLoader_genchat_ml").innerHTML="";document.getElementById("gen_chat_div_myL").style.visibility="hidden"}function check_pwd_strength(c,d){var f=new Array();f[0]="<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=30 bgcolor=#ff0000></td><td height=10 width=120 bgcolor=#dddddd></td></tr></table></td><td class=bold>Weakest</td></tr></table>";f[1]="<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=60 bgcolor=#bb0000></td><td height=10 width=90 bgcolor=#dddddd></td></tr></table></td><td class=bold>Weak</td></tr></table>";f[2]="<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=90 bgcolor=#ff9900></td><td height=10 width=60 bgcolor=#dddddd></td></tr></table></td><td class=bold>Medium</td></tr></table>";f[3]="<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=120 bgcolor=#00bb00></td><td height=10 width=30 bgcolor=#dddddd></td></tr></table></td><td class=bold>Strong</td></tr></table>";f[4]="<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=155 bgcolor=#00ee00></td></tr></table></td><td class=bold>Strongest</td></tr></table>";f[5]="<table border=0 cellpadding=0 cellspacing=0><tr><td><table cellpadding=0 cellspacing=2><tr><td height=10 width=155 bgcolor=#dddddd></td></tr></table></td><td class=bold></td></tr></table>";var k=0;var g=0;if(c.length==0||!c.length){k=-1}else{if(c.length>0&&c.length<5){k=(k+3)}else{if(c.length>4&&c.length<8){k=(k+6)}else{if(c.length==8){k=(k+34)}else{if(c.length>7&&c.length<12){k=(k+12)}else{if(c.length>11){k=(k+18)}}}}}}if(c.match(/[a-z]/)){k=(k+1)}if(c.match(/[A-Z]/)){k=(k+5)}if(c.match(/\d+/)){k=(k+5)}if(c.match(/(.*[0-9].*[0-9].*[0-9])/)){k=(k+5)}if(c.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)){k=(k+5)}if(c.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)){k=(k+5)}if(c.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){k=(k+2)}if(c.match(/(\d.*\D)|(\D.*\d)/)){k=(k+2)}if(c.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)){k=(k+2)}if(k==-1){g=f[5]}else{if(k>-1&&k<16){g=f[0]}else{if(k>15&&k<25){g=f[1]}else{if(k>24&&k<35){g=f[2]}else{if(k>34&&k<45){g=f[3]}else{g=f[4]}}}}}document.getElementById(d).style.display="block";document.getElementById(d).innerHTML=(g)}function createChatPopup(m,l,d,c,f){var k="true";var g=m+"|"+l+"|"+d+"|"+c+"||"+f;window.open(""+baseurl+"/widget_files/groupChatPreloader.php?flashVar="+g,"","width=305,height=560,toolbar=0,location=0,scrollbars=0,directories=0,status=0,menubar=0,resizable=0");close_gen_chat_box()}function show_homepage_content(f,c,d){obj=document.getElementById(f);if(c==0){obj.style.display="block";$("HEADER_HOMEPAGE_CONTENT").style.height=d+"px";$("showhide_div").className="hide_div";$("div_height").value=1;$("homepage_ajxLoader").show();formObj=document.getElementById("homepage_control_form");postUrl="login_operations.php";$(formObj).request({action:postUrl,method:"post",parameters:{actionType:"POPULATE_TOP_HOMEPAGE_DATA"},onSuccess:handleActionResponsePopulateTopHomedata,onException:handleActionErrorPopulateTopHomedata})}else{if(c==1){$("homepage_container").innerHTML="";$("HEADER_HOMEPAGE_CONTENT").style.height=d+"px";$("div_height").value=0;obj.style.display="none";$("showhide_div").className="show_div"}}}function handleActionResponsePopulateTopHomedata(c){data=c.responseText;if(data=="PAGE_RELOAD"){location.reload()}else{$("homepage_container").innerHTML=c.responseText;$("homepage_ajxLoader").hide()}}function handleActionErrorPopulateTopHomedata(c){$("tophomePageErr").innerHTML="Error processing: Please try later.";$("homepage_ajxLoader").hide()}function select_homePage(c,d,g){$(c).className="active_menuItem";$("mylocker").className="inactive_menuItem";$("homepage_selection").value=g;if(c!="homePage"){$("homePage").className="inactive_menuItem";$("HEADER_HOMEPAGE_CONTENT").style.height="350px";$("middle_section").style.display="block";reset_middle_section()}else{$("middle_section").style.display="none";$("HEADER_HOMEPAGE_CONTENT").style.height="140px"}for(var f=0;f<d;f++){if(c!="chid"+f){$("chid"+f).className="inactive_menuItem"}}}function select_locker(c,d,g){$(c).className="active_menuItem";$("homepage_selection").value=g;if(c!="mylocker"){$("mylocker").className="inactive_menuItem";$("HEADER_HOMEPAGE_CONTENT").style.height="350px";$("middle_section").style.display="block";reset_middle_section()}else{$("middle_section").style.display="none";$("HEADER_HOMEPAGE_CONTENT").style.height="140px"}$("homePage").className="inactive_menuItem";for(var f=0;f<d;f++){if(c!="chid"+f){$("chid"+f).className="inactive_menuItem"}}}function select_homePageOptions(d,c){if(d.className=="active_menuItem"){d.className="inactive_menuItem";$(c).value=0}else{if(d.className=="active_menuItem_small"){d.className="inactive_menuItem_small";$(c).value=0}else{if(d.className=="inactive_menuItem"){d.className="active_menuItem";$(c).value=1}else{if(d.className=="inactive_menuItem_small"){d.className="active_menuItem_small";$(c).value=1}}}}}function reset_middle_section(){$("my_blog").className="inactive_menuItem";$("lnk_my_blog").value=0;$("my_fav_pic").className="inactive_menuItem";$("lnk_my_fav_pics").value=0;$("my_photoset").className="inactive_menuItem";$("lnk_my_photoset").value=0;$("top_videos").className="active_menuItem_small";$("lbl_head_topvids").value=1;$("my_station").className="inactive_menuItem";$("lnk_my_station").value=0;$("my_pic").className="inactive_menuItem";$("txt_my_pictures").value=0;$("my_subscription").className="inactive_menuItem";$("txt_my_subscriptions").value=0;$("top_picture").className="active_menuItem_small";$("lbl_head_toppics").value=1;$("my_fav_video").className="inactive_menuItem";$("lnk_fav_vdo").value=0;$("my_friend").className="inactive_menuItem";$("txt_my_friends").value=0;$("my_trv").className="inactive_menuItem";$("txt_tr_videos").value=0;$("article_categories").className="active_menuItem_small";$("lbl_head_article_cat").value=1;$("my_videos").className="inactive_menuItem";$("txt_my_videos").value=0;$("my_comment").className="inactive_menuItem";$("lnk_my_comments").value=0;$("my_group").className="inactive_menuItem";$("txt_my_groups").value=0;$("popular_event").className="active_menuItem_small";$("lbl_head_pop_event").value=1;$("my_event").className="inactive_menuItem";$("txt_my_events").value=0}function reset_entire_homePagesection(c){$("homepage_ajxLoader").show();formObj=document.getElementById("homepage_control_form");postUrl="login_operations.php";$(formObj).request({action:postUrl,method:"post",parameters:{actionType:"POPULATE_TOP_HOMEPAGE_DATA"},onSuccess:handleActionResponsePopulateTopHomedata,onException:handleActionErrorPopulateTopHomedata});$("HEADER_HOMEPAGE_CONTENT").style.height=c+"px"}function HomePageTopControlSet(c,d){$("homepage_ajxLoader").show();$(c).request({action:d,method:"post",parameters:{actionType:"HOME_PAGE_CONTROL"},onSuccess:handlehomePageControlTopResponse,onException:handleActionErrorhomePageTopControl})}function handleActionErrorhomePageTopControl(c){$("tophomePageErr").innerHTML="Error processing: Please try later.";$("homepage_ajxLoader").hide()}function handlehomePageControlTopResponse(f){data=f.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{var d=data.MESSAGE;if(data.MESSAGE!="success"){var c=d.split("|");if(c[1]=="index"){location.href=c[0]+"/index.php"}}else{location.reload()}}}function hide_TopHomepage_control(c,d){$("homepage_container").innerHTML="";$("div_height").value=0;$("showhide_div").className="show_div";$("HEADER_SET_HOMEPAGE").style.display="none";$("HEADER_HOMEPAGE_CONTENT").style.display="none";$(c).request({action:d,method:"post",parameters:{actionType:"HIDE_HOME_PAGE_CONTROL"},onSuccess:handle_hide_TopHomepage_controlResponse})}function handle_hide_TopHomepage_controlResponse(c){data=c.responseText;if(data=="PAGE_RELOAD"){location.reload()}$("hide_homepage_control").style.display="none"}function rateBItem(k,g,c,f,d){if(k=="y"){show_login_text()}else{updateBItemRatingDiv(f,d);fxRateBItem(c,f,d)}}function updateBItemRatingDiv(f,d){var c="rate="+f+"&AID="+d+"&action=updateBItemRatingDiv";var g=new Ajax.Request("booster_item_detail.php",{method:"post",parameters:c,onSuccess:handleBItemRatingDiv})}function handleBItemRatingDiv(g){data=g.responseText.evalJSON();if(data.STATUS=="SUCCESS"){for(var c=0;c<data.DATA_LIST.length;c++){var f=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(f).innerHTML=d}}}function fxRateBItem(c,d,f){cp.call("ajax/myajaxphp.php","process_data_bitem",return_data_bitem,d,f)}function return_data_bitem(l){var d=l.getElementsByTagName("trate").item(0).firstChild.data;if(d!="exist"){var k="";var f=l.getElementsByTagName("tvote").item(0).firstChild.data;for(i=0;i<d;i++){k=k+"<img src='"+imgurl+"/tpl_icon_star_full.gif' width=11 />&nbsp;"}for(i=0;i<(5-d);i++){if(f-(d*2)==1){k=k+"<img src='"+imgurl+"/tpl_icon_star_half.gif' width=11 />";f=0}else{k=k+"<img src='"+imgurl+"/tpl_icon_star_empty.gif' width=11 />"}}var c=l.getElementsByTagName("total_review").item(0).firstChild.data;var g=l.getElementsByTagName("positive_review").item(0).firstChild.data;document.getElementById("showPicRate").innerHTML=k;document.getElementById("showPReview").innerHTML=g;document.getElementById("showTReview").innerHTML=c;document.getElementById("voteProcessthank").innerHTML='<FONT class="rating_thanks">Thanks for rating</FONT>'}else{document.getElementById("voteProcessthank").innerHTML="<FONT COLOR='#E26600'>You have already voted for this item!</FONT>"}return false}function showBuyBoosterItem(c){document.getElementById("buy_item_form").style.display="block"}function closeBuyBoosterItem(){document.getElementById("buy_item_form").style.display="none"}function buyBoosterItem(c,d){$("ajxLoaderBuyItem").show();$(c).request({action:d,method:"post",parameters:{actionType:"BUY_BOOSTER_ITEM"},onSuccess:handle_buyBoosterItemResponse,onException:handle_buyBoosterItemError})}function handle_buyBoosterItemResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){gid=document.getElementById("group_id").value;gurl=document.getElementById("group_url").value;chid=document.getElementById("channel_id").value;str="booster_item_operation.php?gid="+gid+"&chid="+chid+"&urlkey="+gurl+"&oid="+data.MESSAGE;if(data.UPDATEDATA!=""){str=sslbaseurl+"/booster_item_payprocess.php?oid="+data.MESSAGE+"&"+data.UPDATEDATA}location.href=str}else{document.getElementById("divErrBuyItem").innerHTML=data.MESSAGE}$("ajxLoaderBuyItem").hide()}}function handle_buyBoosterItemError(c){}function showBSItemOrder(c){document.getElementById("view_bsorder_form").style.display="block";document.getElementById("divErrBSOrder").innerHTML="";location.href="#bsorders";$("ajxLoaderBSOrder").show();var d="item_id="+c;var f=new Ajax.Request("group_operations.php?actionType=POPULATE_BSITEM_ORDER",{method:"post",parameters:d,onSuccess:handle_showBSItemOrder})}function handle_showBSItemOrder(c){data=c.responseText;document.getElementById("bsitemorder_info").innerHTML=data;$("ajxLoaderBSOrder").hide()}function settleBSItemOrder(g,c){$("ajxLoaderBSOrder").show();var d="order_id="+g+"&item_id="+c;var f=new Ajax.Request("group_operations.php?actionType=SETTLE_BSITEM_ORDER",{method:"post",parameters:d,onSuccess:handle_settleBSItemOrder})}function handle_settleBSItemOrder(c){data=c.responseText;if(data=="PAGE_RELOAD"){location.reload()}else{document.getElementById("bsitemorder_info").innerHTML=data;document.getElementById("divErrBSOrder").innerHTML="Order settled.";$("ajxLoaderBSOrder").hide();location.href="#bsorders"}}function cancelBSItemOrder(g,c){$("ajxLoaderBSOrder").show();var d="order_id="+g+"&item_id="+c;var f=new Ajax.Request("group_operations.php?actionType=CANCEL_BSITEM_ORDER",{method:"post",parameters:d,onSuccess:handle_cancelBSItemOrder})}function handle_cancelBSItemOrder(c){data=c.responseText;if(data=="PAGE_RELOAD"){location.reload()}else{document.getElementById("bsitemorder_info").innerHTML=data;document.getElementById("divErrBSOrder").innerHTML="Order cancelled.";$("ajxLoaderBSOrder").hide();location.href="#bsorders"}}function closeBSItemOrder(){document.getElementById("view_bsorder_form").style.display="none"}function show_chat_window(n,f,m,k,d,g,c){document.getElementById("group_chat_box").style.display="none";var l=n+"/groupchat/groups_chat.php?"+f+"&"+m+"&"+k+"&"+d+"&"+g+"&"+c;window.open(l,"mywindow","location=1,status=1,scrollbars=1,resizable=yes, width=700,height=480")}function openCSVPopupTeam(){w=420;h=450;var c=(screen.width-w)/2;var f=(screen.height-h)/2;var d=window.open("csv_team_instrunction.php","sampleWin","location=0,status=0,toolbar=no,menubar=0,scrollbars=no,resizable=0,top="+f+",left="+c+",width="+w+",height="+h)}function check_cookie(){var c=new Date();chkcookie=(c.getTime()+"");document.cookie="chkcookie="+chkcookie;if(document.cookie.indexOf(chkcookie,0)<0){document.getElementById("cookie_check").style.display="block"}else{document.getElementById("cookie_check").style.display="none"}}function getCamMic(g,d){if(is_login==1){var c;var f=new Ajax.Request("widget_files/saveCamMicStatus.php?cam="+g+"&mic="+d,{method:"post",onSuccess:getCamMicSuccess})}}function getCamMicSuccess(){}function show_add_ind_topicreply_div_dp(c){document.getElementById("add_gtopic_dp_reply").style.display="block";document.getElementById("TID").value=c;document.getElementById("top_box").style.height=500+"px";document.getElementById("rbody").focus()}function close_ind_reply_div_dp(){document.getElementById("divErrAddGtopicReplyDp").innerHTML="";reset_ind_topic_reply_dp();document.getElementById("add_gtopic_dp_reply").style.display="none"}function reset_ind_topic_reply_dp(){document.getElementById("rbody").value="";document.getElementById("imgCaptchaDp").src="captcha.php?"+Math.random();document.getElementById("captcha").value="";document.getElementById("divErrAddGtopicReplyDp").innerHTML=""}function fadein_vidnpic_div(l,g,d,c,k,f){document.getElementById(k).style.display="none";document.getElementById(f).style.display="block";obj=document.getElementById(l);imgobj=document.getElementById(g);obj.style.height=d+"px";if(d==0){obj.style.display="block";c=(c==100)?99.999:c;imgobj.style.filter="alpha(opacity:"+c+")";imgobj.style.KHTMLOpacity=c/120;imgobj.style.MozOpacity=c/120;imgobj.style.opacity=c/120}if(d<=60){d+=20;window.setTimeout("fadein_vidnpic_div('"+l+"', '"+g+"', "+d+", "+c+",'"+k+"','"+f+"')",120)}if(d==60){increase_opacity(g,c)}}function increase_opacity(d,c){c=(c==100)?99.999:c;imgobj.style.filter="alpha(opacity:"+c+")";imgobj.style.KHTMLOpacity=c/120;imgobj.style.MozOpacity=c/120;imgobj.style.opacity=c/120;if(c==0){imgobj.style.display="block"}if(c<=100){c+=20;window.setTimeout("increase_opacity('"+d+"', "+c+")",120)}}function fadeout_vidnpic_div(l,g,d,c,k,f){document.getElementById(k).style.display="block";document.getElementById(f).style.display="none";obj=document.getElementById(l);imgobj=document.getElementById(g);obj.style.height=d+"px";if(d==0){obj.style.display="none"}if(d==60){decrease_opacity(g,c)}if(d>=0){d-=20;window.setTimeout("fadeout_vidnpic_div('"+l+"', '"+g+"', "+d+", "+c+",'"+k+"','"+f+"')",150)}}function decrease_opacity(d,c){c=(c==100)?99.999:c;imgobj.style.filter="alpha(opacity:"+c+")";imgobj.style.KHTMLOpacity=c/120;imgobj.style.MozOpacity=c/120;imgobj.style.opacity=c/120;if(c==0){imgobj.style.display="none"}if(c>=0){c-=20;window.setTimeout("decrease_opacity('"+d+"', "+c+")",100)}}function fadein_blog_div(n,g,l,m,k,f,c,d){document.getElementById(m).style.display="none";document.getElementById(k).style.display="block";obj=document.getElementById(n);obj.style.height=g+"px";if(g==0){obj.style.display="block";location.href="#"+d}if(g<l){g+=15;if(g>l){g=l}window.setTimeout("fadein_blog_div('"+n+"', "+g+", "+l+", '"+m+"','"+k+"', '"+f+"', '"+c+"', '"+d+"')",50)}if(g==l){document.getElementById(f).style.display="none";document.getElementById(c).style.display="block"}}function fadeout_blog_div(n,g,l,m,k,f,c,d){document.getElementById(m).style.display="block";document.getElementById(k).style.display="none";obj=document.getElementById(n);obj.style.height=g+"px";location.href="#"+d;if(g==0){obj.style.display="none";document.getElementById(f).style.display="block";document.getElementById(c).style.display="none"}if(g>0){g-=15;if(g<0){g=0}window.setTimeout("fadeout_blog_div('"+n+"', "+g+", "+l+", '"+m+"','"+k+"', '"+f+"', '"+c+"', '"+d+"')",50)}}function toggleMobileFieldsGroup(){if(document.send_user_notification_form.chk_mobile_alert_group_mobile.checked==1){document.send_user_notification_form.country_group_mobile.disabled="";document.send_user_notification_form.carrier_group_mobile.disabled="";document.send_user_notification_form.phone_group_mobile.disabled="";document.send_user_notification_form.alert_limit_group_mobile.disabled=""}else{document.send_user_notification_form.country_group_mobile.disabled="disabled";document.send_user_notification_form.carrier_group_mobile.disabled="disabled";document.send_user_notification_form.phone_group_mobile.disabled="disabled";document.send_user_notification_form.alert_limit_group_mobile.disabled="disabled"}}function show_webcam_recorder(){window.open("webcam_recorder.php","Webcam_recorder","width=670,height=540,toolbar=0,location=0,scrollbars=0,directories=0,status=1,menubar=0,resizable=0")}function populateRefChannels(f){var c=new Array();var c=f.split(",");var d=new actb(document.getElementById("referring_chid"),c)}function selectFromDropdown(c){page=document.getElementById("page").value;switch(page){case"single_upload":selectChListSingleUploadFrm(c);break;case"photo_transfer":selectChListSingleUploadFrm(c);break;case"youtube_transfer":selectChListYTFrm(c);break;case"webcam_record":selectChListSingleUploadFrm(c);break;case"tv_upload":selectChListSingleUploadFrm(c);break;case"grp_admin":selectChListGroupAdminFrm(c);break;case"create_grp":selectChListCreategrpFrm(c);break;case"siteadmin_groupedit":selectUsrListGrpEditFrm(c);break;case"create_blog":setBlogChannel(c);break;default:selectChListSingleUploadFrm(c);break}}function setBlogChannel(c){var f=document.getElementById("channel_blog");for(var d=0;d<f.options.length;d++){if(f.options[d].text==c){f.options[d].selected=true}}}function selectUsrListGrpEditFrm(c){document.getElementById("owner_name").value=c;var f=document.getElementById("group_owner");for(var d=0;d<f.options.length;d++){if(f.options[d].text==c){f.options[d].selected=true}}}function selectChListCreategrpFrm(c){var f=document.getElementById("checkchannel");for(var d=0;d<f.options.length;d++){if(f.options[d].text==c){f.options[d].selected=true}}}function selectChListGroupAdminFrm(c){var f=document.getElementById("grp_channel");for(var d=0;d<f.options.length;d++){if(f.options[d].text==c){f.options[d].selected=true}}}function selectChListSingleUploadFrm(c){var f=document.getElementById("my_ch_list");for(var d=0;d<f.options.length;d++){if(f.options[d].text==c){f.options[d].selected=true}}var g=document.getElementById("ch_list");for(var d=0;d<g.options.length;d++){if(g.options[d].text==c){g.options[d].selected=true}}}function selectChListYTFrm(c){var f=document.getElementById("my_chlist");for(var d=0;d<f.options.length;d++){if(f.options[d].text==c){f.options[d].selected=true}}var g=document.getElementById("chlist");for(var d=0;d<g.options.length;d++){if(g.options[d].text==c){g.options[d].selected=true}}}function show_rss_select(){document.getElementById("medias_popup").style.display="block"}function cancel_media_select(){document.getElementById("medias_popup").style.display="none"}function submit_rss_feed(){var c="";if(document.getElementById("news").checked==true){if(c==""){c="?news=1"}}if(document.getElementById("press").checked==true){if(c==""){c="?press=1"}else{c+="&press=1"}}if(document.getElementById("partner").checked==true){if(c==""){c="?partner=1"}else{c+="&partner=1"}}if(document.getElementById("sponsor").checked==true){if(c==""){c="?sponsor=1"}else{c+="&sponsor=1"}}if(c==""){location.reload()}else{location.href="rss_news.php"+c}}function loadTopVideos(){document.getElementById("LIVE_BROADCAST_SECTION").innerHTML="";document.getElementById("LIVE_BROADCAST_SECTION").innerHTML='<div style="float:left;	width:670; background:#000000; z-index:3;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="670" height="269"	id="featureLivebroadcast"	align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="movie" value="flvplayer/feature_Live_Broadcast_preloader.swf?xmlPath=bcast_live_pathlist.php" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><embed src="flvplayer/feature_Live_Broadcast_preloader.swf?xmlPath=bcast_live_pathlist.php" quality="high" bgcolor="#000000" width="670" height="269" align="middle" allowfullscreen="true" allowscriptaccess="always"	name="featureLivebroadcast" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></div >'}function validateEmail(c){$("spn_email").innerHTML='<span class="error_span"><img src="images/small_ajax_loader.gif" align="top" style="z-index:1000;"></span>';var d;d="actionType=VALIDATE_EMAIL&email="+c;var f=new Ajax.Request("signup.php",{method:"post",parameters:d,onSuccess:handleEmailValidate})}function handleEmailValidate(c){$("spn_email").innerHTML=c.responseText}function confirmPassword(c){$("spn_confirmpassword").innerHTML='<span class="error_span"><img src="images/small_ajax_loader.gif" align="top" style="z-index:1000;"></span>';var g=document.getElementById("password1").value;var d;d="actionType=CONFIRM_PASSWORD&password="+g+"&confirm_password="+c;var f=new Ajax.Request("signup.php",{method:"post",parameters:d,onSuccess:handleConfirmPassword})}function handleConfirmPassword(c){$("spn_confirmpassword").innerHTML=c.responseText}function reportBlog(c,d){document.getElementById("divErrBlogReport").innerHTML="";document.getElementById("divBlogReport").style.display="block";document.getElementById("frmReport").reset();document.getElementById("hdnBID").value=c;document.getElementById("hdnTOUID").value=d;location.href="#blog_report"}function closeDivBlogReport(){document.getElementById("divBlogReport").style.display="none"}function postBlogReport(c,d){$("ajaxLoader2").show();$(c).request({action:d,method:"post",parameters:{actionType:"POST_BLOG_REPORT"},onSuccess:handleBlogReportResponse,onException:handleBlogReportError})}function handleBlogReportResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divErrBlogReport").innerHTML=data.MESSAGE;closeDivBlogReport()}else{document.getElementById("divErrBlogReport").innerHTML=data.MESSAGE}$("ajaxLoader2").hide()}}function handleBlogReportError(c){document.getElementById("divErrBlogReport").innerHTML="Error processing: Please try later.";$("ajaxLoader2").hide()}function reportBlogComment(d,c){document.getElementById("divErrBlogCReport").innerHTML="";document.getElementById("divBlogCommentReport").style.display="block";document.getElementById("frmBCReport").reset();document.getElementById("hdnBCID").value=d;document.getElementById("hdnTOBCUID").value=c;location.href="#blog_comment_report"}function closeDivBlogCommReport(){document.getElementById("divBlogCommentReport").style.display="none"}function postBlogCommentReport(c,d){$("ajaxLoaderBC").show();$(c).request({action:d,method:"post",parameters:{actionType:"POST_BLOG_COMM_REPORT"},onSuccess:handleBlogCReportResponse,onException:handleBlogCReportError})}function handleBlogCReportResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divErrBlogCReport").innerHTML=data.MESSAGE;closeDivBlogCommReport()}else{document.getElementById("divErrBlogCReport").innerHTML=data.MESSAGE}$("ajaxLoaderBC").hide()}}function handleBlogCReportError(c){document.getElementById("divErrBlogCReport").innerHTML="Error processing: Please try later.";$("ajaxLoaderBC").hide()}function validateEmailFromWidget(c){$("spn_email").innerHTML='<img src="../images/small_ajax_loader.gif" align="top" style="z-index:1000;">';var d;d="actionType=VALIDATE_EMAIL&email="+c;var f=new Ajax.Request("widgetSignup.php",{method:"post",parameters:d,onSuccess:handleEmailValidateWidget})}function handleEmailValidateWidget(c){$("spn_email").innerHTML=c.responseText}function confirmPasswordFromWidget(c){$("spn_confirmpassword").innerHTML='<img src="../images/small_ajax_loader.gif" align="top" style="z-index:1000;">';var g=document.getElementById("password1").value;var d;d="actionType=CONFIRM_PASSWORD&password="+g+"&confirm_password="+c;var f=new Ajax.Request("widgetSignup.php",{method:"post",parameters:d,onSuccess:handleConfirmPasswordWidget})}function handleConfirmPasswordWidget(c){$("spn_confirmpassword").innerHTML=c.responseText}function validateUnameFromWidget(c){if(trim(c)==""){$("spn_username").innerHTML="";return}$("spn_username").innerHTML='<img src="../images/small_ajax_loader.gif" align="top" style="z-index:1000;">';var d;d="actionType=VALIDATE_UNAME&uname="+c;var f=new Ajax.Request("widgetSignup.php",{method:"post",parameters:d,onSuccess:handleUnameValidateWidget})}function handleUnameValidateWidget(c){$("spn_username").innerHTML=c.responseText}function showCPsettingsbox(c,d){close_inbox_text();close_channel_list();closeBroadcastBox();closeNotifyAlerts();close_national_event();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();close_help_box();document.getElementById("cp_setting_div").style.display="block";$("ajxLoader_cpSettings").show();$(c).request({action:d,method:"post",parameters:{action:"getCPToolbardetails"},onSuccess:populateCPToolBarStats,onException:handlepopulateCPError})}function populateCPToolBarStats(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajxLoader_cpSettings").hide();$("cpsetting_result_div").innerHTML=data.MESSAGE}else{$("cpsetting_result_div").innerHTML=data.MESSAGE;$("ajxLoader_cpSettings").hide()}}}function handlepopulateCPError(){document.getElementById("cpsetting_result_div").innerHTML="Error processing: Please try later.";$("ajxLoader_cpSettings").hide()}function close_cpsetting_box(){document.getElementById("cpsetting_result_div").innerHTML="";$("ajxLoader_cpSettings").hide();document.getElementById("cp_setting_div").style.display="none"}function updateCPsettings(c,d){$("ajxLoader_cpSettings").show();$(c).request({action:d,method:"post",parameters:{action:"UpdateCPToolbar"},onSuccess:updateCPToolBar})}function updateCPToolBar(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajxLoader_cpSettings").hide();$("BOTTOM_CONTROL_HOLDER").innerHTML=data.MESSAGE}}}function populate_results(c,d){document.getElementById("closer").style.display="none";document.getElementById("spinner").style.display="block";$(c).request({action:d,method:"post",parameters:{actionType:"RESULTS"},onSuccess:searchResp,onException:handleSearchError})}function searchResp(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("SEARCH_TEXT_CONTAINER").style.display="block";document.getElementById("SEARCH_TEXT").style.display="block";document.getElementById("SEARCH_TEXT").innerHTML=data.MESSAGE;document.getElementById("spinner").style.display="none";document.getElementById("closer").style.display="block"}}function handleSearchError(c){document.getElementById("SEARCH_TEXT_CONTAINER").style.display="block";document.getElementById("SEARCH_TEXT").style.display="block";document.getElementById("SEARCH_TEXT").innerHTML="Error processing, Please try later.. ";document.getElementById("spinner").style.display="none";document.getElementById("closer").style.display="block"}function show_channel_choose_popup(c,d){document.getElementById("set_my_channel").style.display="block";document.getElementById("set_my_channel_ajxLoader").style.display="block";document.getElementById("divSetChannelErr").innerHTML="";$(c).request({action:d,method:"post",parameters:{actionType:""},onSuccess:displayChannelSelection,onException:handleDisplayChannelSelectionError})}function displayChannelSelection(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("channel_selection_div").innerHTML=data.MESSAGE;document.getElementById("set_my_channel_ajxLoader").style.display="none";document.getElementById("divSetChannelErr").innerHTML=""}}function handleDisplayChannelSelectionError(c){document.getElementById("divSetChannelErr").innerHTML="Error processing: Please try later.";document.getElementById("set_my_channel_ajxLoader").style.display="none";document.getElementById("divSetChannelErr").innerHTML=""}function close_set_my_channel(){document.getElementById("channel_selection_div").innerHTML="";document.getElementById("divSetChannelErr").innerHTML="";document.getElementById("set_my_channel").style.display="none"}function populate_value_preferred(m){var l=document.getElementById(m);for(var f=0;f<l.options.length;f++){var d=document.createElement("option");d.text=l.options[f].text;d.value=l.options[f].value;var g=false;var k=document.getElementById("preferred_chid_select");for(var c=0;c<k.options.length;c++){if(k.options[c].text==d.text){g=true;break}}if(!g){document.getElementById("preferred_chid_select").options.add(d)}}}function populate_Ref_Channels(c,d){document.getElementById("chlist").disabled=true;document.getElementById("set_my_channel_ajxLoader").style.display="block";document.getElementById("divSetChannelErr").innerHTML="";$(c).request({action:d,method:"post",parameters:{actionType:"GET_CHANNEL_LIST"},onSuccess:returnchannellist,onException:handlechannelistError})}function returnchannellist(m){data=m.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("channel_msg").innerHTML="";var k=document.getElementById("chlist");for(var d=k.options.length;d>=0;d--){document.getElementById("chlist").remove(d)}var c=data.MESSAGE.split(",");for(var g=0;g<c.length;g++){var f=document.createElement("option");var l=c[g].split("|");f.text=l[1];f.value=l[0];document.getElementById("chlist").options.add(f)}document.getElementById("chlist").disabled=false;document.getElementById("set_my_channel_ajxLoader").style.display="none";document.getElementById("divSetChannelErr").innerHTML=""}else{document.getElementById("channel_msg").innerHTML=data.MESSAGE;var k=document.getElementById("chlist");for(var d=k.options.length;d>=0;d--){document.getElementById("chlist").remove(d)}document.getElementById("chlist").disabled=false;document.getElementById("set_my_channel_ajxLoader").style.display="none";document.getElementById("divSetChannelErr").innerHTML=""}}function handlechannelistError(c){document.getElementById("channel_msg").innerHTML="Error processing: Please try later.";document.getElementById("chlist").disabled=false;document.getElementById("set_my_channel_ajxLoader").style.display="none";document.getElementById("divSetChannelErr").innerHTML=""}function moveitem_to_right(){document.getElementById("divSetChannelErr").innerHTML="";if(document.getElementById("chlist").value==""){document.getElementById("channel_msg").innerHTML="Please select at least one sports channel to move"}else{document.getElementById("channel_msg").innerHTML="";var n=document.getElementById("chlist");var m=document.getElementById("finalchList");var c=0;var l=0;for(var g=0;g<n.options.length;g++){if(n.options[g].selected){c++}}for(var g=0;g<m.options.length;g++){l++}if(c>5||l>=5||parseInt(c+l)>5){document.getElementById("channel_msg").innerHTML="Limit your sports to five!"}else{for(var g=0;g<n.options.length;g++){if(n.options[g].selected){var f=document.createElement("option");f.text=n.options[g].text;f.value=n.options[g].value;var k=false;for(var d=0;d<m.options.length;d++){if(m.options[d].text==f.text){k=true;break}}if(!k){document.getElementById("finalchList").options.add(f);populate_value_preferred("finalchList")}}}}}}function moveitem_to_left(){document.getElementById("divSetChannelErr").innerHTML="";if(document.getElementById("finalchList").value==""){document.getElementById("channel_msg").innerHTML="Please select at least one sports channel to move"}else{document.getElementById("channel_msg").innerHTML="";var g=document.getElementById("finalchList");for(var d=g.options.length-1;d>=0;d--){if(g.options[d].selected){var f=document.getElementById("preferred_chid_select");for(var c=0;c<f.options.length;c++){if(f.options[c].text==g.options[d].text){document.getElementById("preferred_chid_select").remove(c)}}document.getElementById("finalchList").remove(d)}}}}function select_channels(){var d=document.getElementById("finalchList");if(d.options.length!=0){for(var c=0;c<d.options.length;c++){d.options[c].selected="true"}return true}}function saveChannelSelection(c,d){document.getElementById("set_my_channel_ajxLoader").style.display="block";select_channels();document.getElementById("divSetChannelErr").innerHTML="";$(c).request({action:d,method:"post",parameters:{actionType:"SAVE_CHANNEL_SELECTION"},onSuccess:saveChannelSelectionResponse,onException:handleSaveChannelSelectionResponseError})}function saveChannelSelectionResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("set_my_channel_ajxLoader").style.display="none";document.getElementById("divSetChannelErr").innerHTML=data.MESSAGE;location.reload()}else{document.getElementById("divSetChannelErr").innerHTML=data.MESSAGE;document.getElementById("set_my_channel_ajxLoader").style.display="none"}}}function handleSaveChannelSelectionResponseError(c){document.getElementById("divSetChannelErr").innerHTML="Error processing: Please try later.";document.getElementById("set_my_channel_ajxLoader").style.display="none"}function show_vidPager(c,f,d){if(c.keyCode==13){page=document.getElementById(d).value;showVidPager(f,page)}}first_arr=Array();second_arr=Array();function showVidPager(g,f){var g=g+"&page="+f+"&actionType=SEARCH";var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",g,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updateVidResult(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(g)}function show_user_vidPager(c,f,d){if(c.keyCode==13){page=document.getElementById(d).value;showUserVidPager(f,page)}}first_arr=Array();second_arr=Array();function showUserVidPager(g,f){var g=g+"?page="+f;var d=false;var c=new XMLHttpRequest();if(window.XMLHttpRequest){c.xmlHttpReq=new XMLHttpRequest()}else{if(window.ActiveXObject){c.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}}c.xmlHttpReq.open("POST",g,true);c.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.xmlHttpReq.onreadystatechange=function(){if(c.xmlHttpReq.readyState==4){updateVidResult(c.xmlHttpReq.responseText)}};c.xmlHttpReq.send(g)}function updateVidResult(k){document.getElementById("search_result_div").innerHTML=k;var g=document.getElementById("chk_list").value;var f=document.getElementById("vid_list").value;second_arr=explode(",",f);var d=0;if(g!=""){first_arr=explode(",",g);var c=first_arr.length;if(first_arr.length>0){for(i=0;i<7;i++){if(first_arr[i]!=""||first_arr[i]!="undefined"){if(in_array(document.getElementById(first_arr[i]).value,second_arr)){if(document.getElementById(first_arr[i])){d=d+1;document.getElementById(first_arr[i]).checked=true}}}if(d==(c)){break}}}}}function select_video(d,c){if(c.checked==true){insert_video(d)}else{delete_video(d)}}function insert_video(c){first_arr=Array();second_arr=Array();vid_list=document.getElementById("vid_list").value;var d;d=document.getElementById("chk_list").value;first_arr=explode(",",vid_list);if(d!=""){second_arr=explode(",",d)}if(vid_list==""){first_arr=Array()}vid=document.getElementById(c).value;if(in_array(vid,first_arr)){}else{array_push(first_arr,vid);array_push(second_arr,c)}for(i=0;i<(first_arr.length);i++){if(i==0){vid_list=first_arr[i]}else{vid_list=vid_list+","+first_arr[i]}}for(i=0;i<(second_arr.length);i++){if(i==0){chid_list=second_arr[i]}else{if(chid_list!=""||chid_list!=" "){chid_list=chid_list+","+second_arr[i]}else{chid_list=second_arr[i]}}}document.getElementById("vid_list").value=vid_list;document.getElementById("chk_list").value=chid_list}function delete_video(c){vid=document.getElementById(c).value;first_arr=Array();second_arr=Array();vid_list=document.getElementById("vid_list").value;chid_list=document.getElementById("chk_list").value;if(vid_list!=""){first_arr=explode(",",vid_list)}if(chid_list!=""){second_arr=explode(",",chid_list)}if(in_array(vid,first_arr)){if(first_arr.length==1){if(first_arr[0]==vid){vid_list="";array_pop(first_arr);array_pop(second_arr)}}else{var d=first_arr.length;for(i=0;i<7;i++){if(first_arr[i]!=""||first_arr[i]!="undefined"){if(first_arr[i]!=vid){if(i==0){vid_list=first_arr[i];chid_list=second_arr[i]}else{vid_list=vid_list+","+first_arr[i];chid_list=chid_list+","+second_arr[i]}}}}}}document.getElementById("vid_list").value=vid_list;document.getElementById("chk_list").value=chid_list}function showAllMenu(){document.getElementById("default_full_menu").style.display="block";document.getElementById("default_small_menu").style.display="none"}function showSmallMenu(){document.getElementById("default_small_menu").style.display="block";document.getElementById("default_full_menu").style.display="none"}function showDynamicAllMenu(){document.getElementById("dynamic_full_menu").style.display="block";document.getElementById("dynamic_small_menu").style.display="none"}function showDynamicSmallMenu(){document.getElementById("dynamic_small_menu").style.display="block";document.getElementById("dynamic_full_menu").style.display="none"}function showEditPlayer(d,c){getEditPlayerData(d,c);document.getElementById("mid").value=d;document.getElementById("edit_player_form").style.display="block"}function closeEditPlayer(){document.getElementById("edit_player_form").style.display="none";document.getElementById("age").value="";document.getElementById("team_no").value="";document.getElementById("edit_school").value="";document.getElementById("height").value="";document.getElementById("weight").value="";location.reload()}function getEditPlayerData(c,d){formObj=document.getElementById("edit_team_player_form");postUrl="add_topic.php";$(formObj).request({action:postUrl,method:"post",parameters:{actionType:"GET_PLAYERDATA",pid:c,gid:d},onSuccess:handlePlayerDataResponse,onException:handlePlayerDataError})}function handlePlayerDataResponse(c){data=JSON.parse(c.responseText);if(data.STATUS=="SUCCESS"){putformData(data.MESSAGE)}else{document.getElementById("divErrEditTeamPlayer").innerHTML=data.MESSAGE}$("ajxLoaderEditPlayer").hide()}function handlePlayerDataError(c){document.getElementById("divErrEditTeamPlayer").innerHTML="Error processing: Please try later.";$("ajxLoaderEditPlayer").hide()}function putformData(c){var d=c.split(":");document.getElementById("plr_name").innerHTML=d[0]+" "+d[1];document.getElementById("aboutPlayer").value=d[4];if(d[9]==document.getElementById("edit_GID").value){document.getElementById("aboutPlayer").disabled=true}if(d[6]!=""){var g=d[6];var f=g.split("|");document.getElementById("age").value=f[1];document.getElementById("team_no").value=f[2];document.getElementById("edit_school").value=f[3];document.getElementById("height").value=f[4];document.getElementById("weight").value=f[5]}}function EditResetPlayerData(d,c){document.getElementById("age").value="";document.getElementById("team_no").value="";document.getElementById("edit_school").value="";document.getElementById("height").value="";document.getElementById("weight").value="";getEditPlayerData(d,c);document.getElementById("edit_gen_infoDiv").innerHTML="";document.getElementById("edit_gen_info_preset_div").innerHTML="";editHideAddInfoDiv();editHideAddPresetNameDiv();editHideloadPresetDiv()}function editPlayerData(c,d){$("ajxLoaderEditPlayer").show();$(c).request({action:d,method:"post",parameters:{actionType:"EDITPLAYER"},onSuccess:handleEditPlayerActionResponse,onException:handleEditPlayerActionError})}function handleEditPlayerActionResponse(c){data=JSON.parse(c.responseText);if(data.STATUS=="SUCCESS"){document.getElementById("edit_player_form").style.display="none";document.getElementById("edit_player_form2").style.display="block";document.getElementById("edit_player_id").value=data.MESSAGE;location.href="#edit_player2"}else{document.getElementById("divErrEditTeamPlayer").innerHTML=data.MESSAGE}$("ajxLoaderEditPlayer").hide()}function handleEditPlayerActionError(){document.getElementById("divErrEditTeamPlayer").innerHTML="Error processing: Please try later.";$("ajxLoaderEditPlayer").hide()}function showEditPlayerStats(){var d=document.getElementById("GROUPID").value;var c=document.getElementById("edit_player_id").value;document.getElementById("edit_player_stats").style.display="block";document.getElementById("edit_player_stats_frame").src="add_player_stats.php?action=edit&gid="+d+"&player_id="+c;document.getElementById("edit_player_stats_frame").style.display="block";location.href="#edit_stats"}function closeEditPlayerStats(){document.getElementById("edit_player_stats").style.display="none"}function remove_text_file(c){document.getElementById(c).innerHTML="";document.getElementById(c).style.display="none"}function edit_show_text_file(){var c=document.getElementById("edit_total_text").value;var f=parseInt(c)+1;document.getElementById("edit_total_text").value=f;var g=document.createElement("div");g.setAttribute("id",f);g.setAttribute("style","float:left;display:block;");var d=document.createElement("div");d.setAttribute("style","float:left;");d.innerHTML='<input type="text" name="gen_info_field'+f+'" id="edit_gen_info_field'+f+'" value="" size="50" /> &nbsp;&nbsp;&nbsp;<img src="images/remove.png" / Onclick="remove_text_file('+f+');">';g.appendChild(d);document.getElementById("edit_all_detail").appendChild(g)}function edit_validate_field(){var c="yes";var f=document.getElementById("edit_total_text").value;if(f>0){for(var d=0;d<f;d++){if(document.getElementById("edit_gen_info_field"+(d+1)).value==""){c="no";alert("Please add the no"+(d+1)+" field.");document.getElementById("edit_gen_info_field"+(d+1)).focus();return false}}if(c=="yes"){editPopulateFields(document.getElementById("edit_team_player_form"),"edit_player.php")}}else{editHideAddInfoDiv()}}function editShowAddInfoDiv(){document.getElementById("edit_gen_info_div").style.display="block"}function editHideAddInfoDiv(){document.getElementById("edit_total_text").value="1";document.getElementById("editfieldContener").innerHTML="<div id='edit_all_detail' style='float:left;'><div id='1' style='float:left;display:block;'><div style='float:left;'><input type='text' name='gen_info_field1' id='edit_gen_info_field1' value='' size='50' /></div></div></div>";document.getElementById("edit_gen_info_div").style.display="none"}function editPopulateFields(c,d){$("ajxLoaderEditPlayer").show();$(c).request({action:d,method:"post",parameters:{actionType:"POPULATE_FIELDS"},onSuccess:handleAddfieldsActionResponseEdit,onException:handleAddfieldsActionErrorEdit})}function handleAddfieldsActionResponseEdit(d){data=JSON.parse(d.responseText);var c=data.UPDATEDATA.split("::");if(data.STATUS=="SUCCESS"){document.getElementById("edit_newly_added_fields").value=c[0];document.getElementById("edit_gen_infoDiv").innerHTML=c[1]}else{document.getElementById("divErrEditTeamPlayer").innerHTML=data.MESSAGE}editHideAddInfoDiv();$("ajxLoaderEditPlayer").hide()}function handleAddfieldsActionErrorEdit(){document.getElementById("divErrEditTeamPlayer").innerHTML="Error processing: Please try later.";$("ajxLoaderEditPlayer").hide()}function editShowAddPresetNameDiv(){if(document.getElementById("edit_newly_added_fields").value==""){alert("Please Click on Add Info link to add Fields for Preset.");return false}else{document.getElementById("add_editpreset_name_div").style.display="block";return true}}function editHideAddPresetNameDiv(){document.getElementById("edit_hdn_preset_name").value="";document.getElementById("edit_preset_name").value="";document.getElementById("add_editpreset_name_div").style.display="none"}function edit_validate_preset(){var c=document.getElementById("edit_preset_name").value;if(c==""){alert("Please provide Preset Name.");return false}else{document.getElementById("edit_hdn_preset_name").value=c;document.getElementById("edit_preset_name").value="";document.getElementById("add_editpreset_name_div").style.display="none";return true}}function editShowloadPresetDiv(){document.getElementById("edit_load_preset_div").style.display="block"}function editHideloadPresetDiv(){var d=document.getElementById("edit_tot_preset").value;if(d!=""){for(var c=1;c<=d;c++){document.getElementById("edit_preset_id"+c).checked=false}}document.getElementById("edit_load_preset_div").style.display="none"}function edit_validate_load_preset(){var f=document.getElementById("edit_tot_preset").value;for(var d=1;d<=f;d++){var c=0;if(document.getElementById("edit_preset_id"+d).checked!=true){c=1}else{c=0;break}}if(c!=0){alert("Please select a preset to load");return false}else{editPopulatePresetFields(document.getElementById("edit_team_player_form"),"edit_player.php")}}function editPopulatePresetFields(c,d){$("ajxLoaderEditPlayer").show();$(c).request({action:d,method:"post",parameters:{actionType:"POPULATE_PRESET_FIELDS"},onSuccess:handleAddPresetfieldsActionResponseEdit,onException:handleAddPresetfieldsActionErrorEdit})}function handleAddPresetfieldsActionResponseEdit(d){data=JSON.parse(d.responseText);var c=data.UPDATEDATA.split("::");if(data.STATUS=="SUCCESS"){document.getElementById("edit_newly_added_prest_fields").value=c[0];document.getElementById("edit_gen_info_preset_div").innerHTML=c[1]}else{document.getElementById("divErrEditTeamPlayer").innerHTML=data.MESSAGE}editHideloadPresetDiv();$("ajxLoaderEditPlayer").hide()}function handleAddPresetfieldsActionErrorEdit(){document.getElementById("divErrEditTeamPlayer").innerHTML="Error processing: Please try later.";$("ajxLoaderEditPlayer").hide()}function edit_validate_default_preset(){var f=document.getElementById("edit_tot_preset").value;var c="yes";for(var d=1;d<=f;d++){if(document.getElementById("edit_preset_id"+d).checked!=true){c="no"}else{c="yes"}}if(c="yes"){editSetDefaultPreset(document.getElementById("edit_team_player_form"),"edit_player.php")}else{if(c="no"){alert("Please select a preset to set as Default.");return false}}}function editSetDefaultPreset(c,d){$("ajxLoaderEditPlayer").show();$(c).request({action:d,method:"post",parameters:{actionType:"SET_DEFAULT_PRESET"},onSuccess:handleSetDefaultPresetActionResponseEdit,onException:handleSetDefaultPresetActionErrorEdit})}function handleSetDefaultPresetActionResponseEdit(c){data=JSON.parse(c.responseText);if(data.STATUS=="SUCCESS"){document.getElementById("divErrEditTeamPlayer").innerHTML=data.MESSAGE}else{document.getElementById("divErrEditTeamPlayer").innerHTML=data.MESSAGE}editHideloadPresetDiv();$("ajxLoaderEditPlayer").hide()}function handleSetDefaultPresetActionErrorEdit(){document.getElementById("divErrEditTeamPlayer").innerHTML="Error processing: Please try later.";$("ajxLoaderEditPlayer").hide()}function show_user_notification_popup(){document.getElementById("user_notification_grp_div").style.display="block"}function cancel_user_notification_popup(){document.getElementById("user_notification_grp_div").style.display="none"}function send_user_notification(c,d){$("ajxLoader_grp_notification").show();$(c).request({action:d,method:"post",parameters:{actionType:"SEND_NOTIFICATION"},onSuccess:handleUserNotificationResponse,onException:handleUserNotificationError})}function handleUserNotificationResponse(d){data=d.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("divErr_notification").innerHTML=data.MESSAGE;var c=/MSIE \d+.\d+/;if(navigator.appVersion.match(c)){setTimeout("location.reload()",100)}else{location.reload()}}else{document.getElementById("divErr_notification").innerHTML=data.MESSAGE}$("ajxLoader_grp_notification").hide()}function handleUserNotificationError(c){document.getElementById("divErr_notification").innerHTML="Error processing: Please try later.";$("ajxLoader_grp_notification").hide()}function postrequestLogin(c,f,d){$("ajxLoader").show();$(c).request({action:f,method:"post",parameters:{actionType:"LOGIN_OPERATION"},onSuccess:handlerequestLoginResponse,onException:handleActionErrorLogin})}function handleActionErrorLogin(c){document.getElementById("logdivErr").innerHTML="Error processing: Please try later.";$("ajxLoader").hide()}function handlerequestLoginResponse(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("logdivErr").innerHTML="";location.href=data.MESSAGE;$("ajxLoader").hide()}else{document.getElementById("logdivErr").innerHTML=data.MESSAGE;$("ajxLoader").hide()}}function postrequest(c,d){$("ajxLoader_disable").show();$(c).request({action:d,method:"post",parameters:{actionType:"ENABLE_REQUEST"},onSuccess:handlerequestenableActionResponse,onException:handlerequestenableActionError})}function handlerequestenableActionError(c){document.getElementById("divErr_disable").innerHTML="Error processing: Please try later.";reloadCaptcha();$("ajxLoader_disable").hide()}function handlerequestenableActionResponse(d){data=d.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("divErr_disable").innerHTML=data.MESSAGE;var c=/MSIE \d+.\d+/;if(navigator.appVersion.match(c)){setTimeout("location.reload()",100)}else{location.reload()}}else{document.getElementById("divErr_disable").innerHTML=data.MESSAGE;reloadCaptcha()}$("ajxLoader_disable").hide()}function postShortLogin(c,d){$("login_ajxLoader").show();$(c).request({action:d,method:"post",parameters:{actionType:"SHORT_LOGIN"},onSuccess:handleShortLoginActionResponse,onException:handleShortLoginActionError})}function handleShortLoginActionError(c){document.getElementById("login_divErr").innerHTML="Error processing: Please try later.";$("login_ajxLoader").hide()}function handleShortLoginActionResponse(k){data=k.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("hdnUID").value=data.UPDATEDATA;for(var c=0;c<data.DATA_LIST.length;c++){var g=data.DATA_LIST[c].div;var d=data.DATA_LIST[c].content;$(g).innerHTML=d}var f=data.MESSAGE;if(f=="rate_video"){fxRate($("vkey").value,$("rating").value,$("vid").value)}if(f=="rate_training_video"){fxTrvRate($("vkey").value,$("rating").value,$("vid").value)}if(f=="rate_view_picture"){fxRatePictures($("vkey").value,$("rating").value,$("vid").value)}if(f=="rate_view_photoset"){fxRatePhotoset($("vkey").value,$("rating").value,$("vid").value)}close_login_box();updateOnlineMembers();setTimeout("show_loader()",10);setTimeout("showOnlineFriendMember()",1000);setTimeout("checkUserAlert()",2000)}else{$("login_divErr").innerHTML=data.MESSAGE}$("login_ajxLoader").hide()}function show_rqst_channel(){$("ajxLoaderRqstChannel").hide();document.getElementById("rqst_ch_popup").style.display="block";document.getElementById("rqst_user_name").focus();reset_rqst_ch_forum()}function cancel_rqst_chnl_popup(){$("ajxLoaderRqstChannel").hide();document.getElementById("rqst_ch_popup").style.display="none"}function reset_rqst_ch_forum(){document.getElementById("divErrRqstChannel").innerHTML="";document.getElementById("rqst_user_name").value="";document.getElementById("rqst_user_email").value="";document.getElementById("rqst_channel").value="";document.getElementById("rqst_channel_description").value=""}function post_rqst_channel(c,d){$("ajxLoaderRqstChannel").show();$(c).request({action:d,method:"post",parameters:{actionType:"CHANNEL_REQUEST_ADD"},onSuccess:handlerequestchannelResponse,onException:handleActionRqstChannelError})}function handleActionRqstChannelError(c){document.getElementById("divErrRqstChannel").innerHTML="Error processing: Please try later.";$("ajxLoaderRqstChannel").hide()}function handlerequestchannelResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){$("ajxLoaderRqstChannel").hide();document.getElementById("divErrRqstChannel").innerHTML=data.MESSAGE;setTimeout("cancel_rqst_chnl_popup()",3000)}else{document.getElementById("divErrRqstChannel").innerHTML=data.MESSAGE;$("ajxLoaderRqstChannel").hide()}}}function change_preferred_chid(d,f,c){$(d).request({action:f,method:"post",parameters:{actionType:"CHANGE_PREFERRED_CHID",chid:c},onSuccess:handlerequestPreferredResponse,onException:handleActionPreferredError})}function handleActionPreferredError(c){}function handlerequestPreferredResponse(f){data=f.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{var d=data.MESSAGE;var c=d.split("|");if(c[1]=="index"){location.href=c[0]+"/index.php?chid="+c[2]}else{location.reload()}}}function HomePageControlSet(c,d){$("ajxLoaderhomePageControl").show();$(c).request({action:d,method:"post",parameters:{actionType:"HOME_PAGE_CONTROL"},onSuccess:handlehomePageControlResponse,onException:handleActionErrorhomePageControl})}function handleActionErrorhomePageControl(c){document.getElementById("homePageErr").innerHTML="Error processing: Please try later.";$("ajxLoaderhomePageControl").hide()}function handlehomePageControlResponse(f){data=f.responseText.evalJSON();var d=data.MESSAGE;if(data.MESSAGE!="success"){var c=d.split("|");if(c[1]=="index"){location.href=c[0]+"/index.php"}}else{location.reload()}}function postCommentIndex(c,d){$("ajaxLoaderAddcomment").show();$(c).request({action:d,method:"post",parameters:{actionType:"POSTCOMMENT"},onSuccess:handleCommentResponseIndex,onException:handleCommentErrorIndex})}function handleCommentErrorIndex(c){document.getElementById("divErrAddComment").innerHTML="Error processing: Please try later.";reloadCaptcha_index_comment();$("ajaxLoaderAddcomment").hide()}function handleCommentResponseIndex(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divResultset1").innerHTML=data.MESSAGE;document.getElementById("divResultset").innerHTML=data.UPDATEDATA;reloadCaptcha_index_comment();$("ajaxLoaderAddcomment").hide();closeProfileCommentIndex()}else{document.getElementById("divErrAddComment").innerHTML=data.MESSAGE;reloadCaptcha_index_comment();$("ajaxLoaderAddcomment").hide()}}}function clearEditorIndex(){document.getElementById("divErrAddComment").innerHTML="";document.getElementById("fckComment").value="";document.getElementById("commentCaptcha").value=""}function postReportIndex(c,d){$("ajaxLoader2").show();$(c).request({action:d,method:"post",parameters:{actionType:"POST_REPORT"},onSuccess:handleReportResponseIndex,onException:handleReportErrorIndex})}function handleReportResponseIndex(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divRptStatus").innerHTML="<font style='color:#104A85; font-weight:bold'>"+data.MESSAGE+"</font>";closeDivReportIndex()}else{document.getElementById("divErr2").innerHTML=data.MESSAGE}$("ajaxLoader2").hide()}}function handleReportErrorIndex(c){document.getElementById("divErr2").innerHTML="Error processing: Please try later.";$("ajaxLoader2").hide()}function reportCommentIndex(d,c){document.getElementById("divErr2").innerHTML="";$("ajaxLoader2").hide();if(document.getElementById("divComment")){document.getElementById("divComment").style.display="none"}document.getElementById("divReport").style.display="block";document.getElementById("frmReport").reset();document.getElementById("hdnCID").value=d;document.getElementById("hdnTOUID").value=c;document.getElementById("report_type").focus()}function closeDivReportIndex(){document.getElementById("divReport").style.display="none"}function addProfileCommentIndex(){document.getElementById("ADD_COMMENT").style.display="block";clearEditorIndex()}function closeProfileCommentIndex(){document.getElementById("ADD_COMMENT").style.display="none"}function reloadCaptcha_index_comment(){document.getElementById("imgCaptcha_profile_comment").src="captcha.php?forsec=addpflcom&"+Math.random()}function delProfileCommentIndex(g,d){var c="";var f=new Ajax.Request("index.php?actionType=DELCOMMENT&cid="+g+"&uid="+d,{method:"post",parameters:c,onSuccess:handleDelCommentResponseIndex})}function handleDelCommentResponseIndex(c){data=c.responseText.evalJSON();if(data.STATUS=="SUCCESS"){document.getElementById("divResultset1").innerHTML=data.MESSAGE;document.getElementById("divResultset").innerHTML=data.UPDATEDATA}else{document.getElementById("divResultset1").innerHTML="<font color='#000000'>Couldn't delete Comment.</font>"}}function getGroupsIndex(k,f,c){var d;if(k=="CGRPS"){document.getElementById("my_cgrp").className="orangeTitleLink";document.getElementById("my_grp").className="grayTitleLink";document.getElementById("grprightlink").href="my_groups.php?id="+base64_encode(f)}else{if(k=="UGRPS"){document.getElementById("my_grp").className="orangeTitleLink";document.getElementById("my_cgrp").className="grayTitleLink";document.getElementById("grprightlink").href="ugroups.php?id="+base64_encode(f)}}var g=new Ajax.Request("login_operations.php?action=GetGRPS&type="+k+"&UID="+f+"&limit="+c,{method:"post",parameters:d,onSuccess:populateGrpListIndex})}function populateGrpListIndex(c){data=c.responseText;document.getElementById("MYGRPS").innerHTML=data}function getEventsIndex(l,f,c,k){var d;if(l=="MEVNTS"){document.getElementById("my_gevnt").className="grayTitleLink";document.getElementById("my_evnt").className="orangeTitleLink";document.getElementById("evntrightlink").href="my_events.php"}else{if(l=="MGEVNTS"){document.getElementById("my_evnt").className="grayTitleLink";document.getElementById("my_gevnt").className="orangeTitleLink";document.getElementById("evntrightlink").href="my_group_event.php"}}var g=new Ajax.Request("login_operations.php?action=GetEVENTS&type="+l+"&UID="+f+"&limit="+c+"&section="+k,{method:"post",parameters:d,onSuccess:populateEvntListIndex})}function populateEvntListIndex(c){data=c.responseText;document.getElementById("MYEVENTS").innerHTML=data}function abs(c){return Math.abs(c)||0}function acos(c){return Math.acos(c)}function acosh(c){return Math.log(c+Math.sqrt(c*c-1))}function addslashes(c){return(c+"").replace(/([\\"'])/g,"\\$1").replace(/\0/g,"\\0")}function array_change_key_case(l){var k,d=new Object,g=arguments.length,c=arguments,f;if(l instanceof Array){return l}if(l instanceof Object){if(g==1||c[1]=="CASE_LOWER"||c[1]==0){k="toLowerCase"}else{k="toUpperCase"}for(f in l){d[f[k]()]=l[f]}return d}return false}function array_chunk(g,m){for(var d,k=0,p=-1,f=g.length,o=[];k<f;k++){(d=k%m)?o[p][d]=g[k]:o[++p]=[g[k]]}return o}function array_combine(g,d){var k={},c=g.length,f;if(!g||!d||g.constructor!==Array||d.constructor!==Array){return false}if(c!=d.length){return false}for(f=0;f<c;f++){k[g[f]]=d[f]}return k}function array_count_values(l){var c={},f="",d="";var k=function(n){var m=typeof n;m=m.toLowerCase();if(m=="object"){m="array"}return m};var g=function(m){switch(typeof(m)){case"number":if(Math.floor(m)!=m){return}case"string":if(m in this){++this[m]}else{this[m]=1}}};d=k(l);if(d=="array"){for(f in l){g.call(c,l[f])}}return c}function array_diff(){var f=arguments[0],m={};var l="",g=1,d="",c={};arr1keys:for(l in f){for(g=1;g<arguments.length;g++){c=arguments[g];for(d in c){if(c[d]===f[l]){continue arr1keys}}m[l]=f[l]}}return m}function array_diff_assoc(){var f=arguments[0],m={};var l="",g=1,d="",c={};arr1keys:for(l in f){for(g=1;g<arguments.length;g++){c=arguments[g];for(d in c){if(c[d]===f[l]&&d===l){continue arr1keys}}m[l]=f[l]}}return m}function array_diff_key(){var f=arguments[0],m={};var l="",g=1,d="",c={};arr1keys:for(l in f){for(g=1;g<arguments.length;g++){c=arguments[g];for(d in c){if(d===l){continue arr1keys}}m[l]=f[l]}}return m}function array_diff_uassoc(){var g=arguments[0],n={},d=arguments[arguments.length-1];var c={},l=1,m="",f="";d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;arr1keys:for(m in g){for(l=1;l<arguments.length-1;l++){c=arguments[l];for(f in c){if(c[f]===g[m]&&d(f,m)===0){continue arr1keys}}n[m]=g[m]}}return n}function array_diff_ukey(){var g=arguments[0],n={},d=arguments[arguments.length-1];var c={},l=1,m="",f="";d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;arr1keys:for(m in g){for(l=1;l<arguments.length-1;l++){c=arguments[l];for(f in c){if(d(f,m)===0){continue arr1keys}}n[m]=g[m]}}return n}function array_fill(c,f,k){var g,d={};if(!isNaN(c)&&!isNaN(f)){for(g=0;g<f;g++){d[(g+c)]=k}}return d}function array_fill_keys(d,g){var f={},c="";for(c in d){f[d[c]]=g}return f}function array_filter(c,f){var g={},d;for(d in c){if(f(c[d])){g[d]=c[d]}}return g}function array_flip(f){var d,c={};for(d in f){c[f[d]]=d}return c}function array_intersect(){var f=arguments[0],m={};var l="",c={},g=0,d="";arr1keys:for(l in f){arrs:for(g=1;g<arguments.length;g++){c=arguments[g];for(d in c){if(c[d]===f[l]){if(g===arguments.length-1){m[l]=f[l]}continue arrs}}continue arr1keys}}return m}function array_intersect_assoc(){var f=arguments[0],m={};var l="",c={},g=0,d="";arr1keys:for(l in f){arrs:for(g=1;g<arguments.length;g++){c=arguments[g];for(d in c){if(c[d]===f[l]&&d===l){if(g===arguments.length-1){m[l]=f[l]}continue arrs}}continue arr1keys}}return m}function array_intersect_key(){var f=arguments[0],m={};var l="",c={},g=0,d="";arr1keys:for(l in f){arrs:for(g=1;g<arguments.length;g++){c=arguments[g];for(d in c){if(d===l){if(g===arguments.length-1){m[l]=f[l]}continue arrs}}continue arr1keys}}return m}function array_intersect_uassoc(){var g=arguments[0],n={},d=arguments[arguments.length-1];var m="",l=1,c={},f="";d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;arr1keys:for(m in g){arrs:for(l=1;l<arguments.length-1;l++){c=arguments[l];for(f in c){if(c[f]===g[m]&&d(f,m)===0){if(l===arguments.length-2){n[m]=g[m]}continue arrs}}continue arr1keys}}return n}function array_intersect_ukey(){var g=arguments[0],n={},d=arguments[arguments.length-1];var m="",l=1,c={},f="";d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;arr1keys:for(m in g){arrs:for(l=1;l<arguments.length-1;l++){c=arguments[l];for(f in c){if(d(f,m)===0){if(l===arguments.length-2){n[m]=g[m]}continue arrs}}continue arr1keys}}return n}function array_key_exists(d,c){if(!c||(c.constructor!==Array&&c.constructor!==Object)){return false}return d in c}function array_keys(f,k,n){var g={},d=!!n,c=true,m=0;var l="";for(l in f){c=true;if(k!=undefined){if(d&&f[l]!==k){c=false}else{if(f[l]!=k){c=false}}}if(c){g[m]=l;m++}}return g}function array_map(q){var d=arguments.length,o=arguments;var g=o[1].length,l=0,f=1,c=0;var n=[],p=[];while(l<g){while(f<d){n[c++]=o[f++][l]}c=0;f=1;if(q){p[l++]=q.apply(null,n)}else{p[l++]=n}n=[]}return p}function array_merge(){var f=Array.prototype.slice.call(arguments);var m={},c,d=0,l=0;var n;for(l=0,n=true;l<f.length;l++){if(!(f[l] instanceof Array)){n=false;break}}if(n){return f}var g=0;for(l=0,g=0;l<f.length;l++){if(f[l] instanceof Array){for(d=0;d<f[l].length;d++){m[g++]=f[l][d]}}else{for(c in f[l]){if(is_int(c)){m[g++]=f[l][c]}else{m[c]=f[l][c]}}}}return m}function array_merge_recursive(f,d){var c="";if((f&&(f instanceof Array))&&(d&&(d instanceof Array))){for(c in d){f.push(d[c])}}else{if((f&&(f instanceof Object))&&(d&&(d instanceof Object))){for(c in d){if(c in f){if(typeof f[c]=="object"&&typeof d=="object"){f[c]=array_merge(f[c],d[c])}else{f[c]=d[c]}}else{f[c]=d[c]}}}}return f}function array_pad(d,g,l){var m=[],c=[],k,f=0;if(d instanceof Array&&!isNaN(g)){k=((g<0)?(g*-1):g);if(k>d.length){for(f=0;f<(k-d.length);f++){c[f]=l}m=((g<0)?c.concat(d):d.concat(c))}else{m=d}}return m}function array_pop(f){var d="",c=0;if(f.hasOwnProperty("length")){if(!f.length){return null}return f.pop()}else{for(d in f){c++}if(c){delete (f[d]);return f[d]}else{return null}}}function array_product(c){var f=0,d=1;if(c instanceof Array){while(f<c.length){d*=(!isNaN(c[f])?c[f]:0);f++}}else{d=null}return d}function array_push(g){var d,c=arguments,f=c.length;for(d=1;d<f;d++){g[g.length++]=c[d]}return g.length}function array_rand(k,c){var f=[];var d=c||1;var l=function(n,o){var m=false,p=0;while(p<n.length){if(n[p]===o){m=true;break}p++}return m};if(k instanceof Array&&d<=k.length){while(true){var g=Math.floor((Math.random()*k.length));if(f.length===d){break}if(!l(f,g)){f.push(g)}}}else{f=null}return((d==1)?f.join():f)}function array_reduce(g,l){var k=g.length;var f=0,d=0;var c=[];for(d=0;d<k;d+=2){c[0]=g[d];if(g[(d+1)]){c[1]=g[(d+1)]}else{c[1]=0}f+=l.apply(null,c);c=[]}return f}function array_reverse(l,k){var c=l.length,d=0,f={},g="";k=!!k;for(g in l){d=c-g-1;f[k?g:d]=l[g]}return f}function array_search(k,g,f){var c=!!f;var d="";for(d in g){if((c&&g[d]===k)||(!c&&g[d]==k)){return d}}return false}function array_shift(c){if(c.length>0){return c.shift()}return null}function array_slice(l,o,g,d){var p="";if(!(l instanceof Array)||(d&&o!=0)){var m=0,q={};for(p in l){m+=1;q[p]=l[p]}l=q;o=(o<0)?m+o:o;g=g==undefined?m:(g<0)?m+g-o:g;var n={};var c=false,k=-1,r=0,f=0;for(p in l){++k;if(r>=g){break}if(k==o){c=true}if(!c){continue}++r;if(is_int(p)&&!d){n[f++]=l[p]}else{n[p]=l[p]}}return n}if(g===undefined){return l.slice(o)}else{if(g>=0){return l.slice(o,o+g)}else{return l.slice(o,g)}}}function array_splice(n,u,k,f){var g=function(x,A,z){if(x[A]!==undefined){var y=A;A+=1;if(A===z){A+=1}A=g(x,A,z);x[A]=x[y];delete x[y]}return A};if(f&&!(typeof f==="object")){f=[f]}if(k===undefined){k=u>=0?n.length-u:-u}else{if(k<0){k=(u>=0?n.length-u:-u)+k}}if(!(n instanceof Array)){var r=0,o=-1,q=[],l={},d=-1,p=-1;var v=true,c=0,m=0,t="";for(t in n){r+=1}u=(u>=0)?u:r+u;for(t in n){o+=1;if(o<u){if(is_int(t)){p+=1;if(parseInt(t,10)===p){continue}g(n,p,t);n[p]=n[t];delete n[t]}continue}if(v&&is_int(t)){q.push(n[t]);l[c++]=n[t]}else{l[t]=n[t];v=false}m+=1;if(f&&f[++d]){n[t]=f[d]}else{delete n[t]}}return v?q:l}if(f){f.unshift(u,k);return Array.prototype.splice.apply(n,f)}return n.splice(u,k)}function array_sum(f){var c,d=0;if(typeof f!=="object"){return null}for(c in f){d+=(f[c]*1)}return d}function array_udiff(){var g=arguments[0],n={},d=arguments[arguments.length-1];var c="",l=1,m="",f="";d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;arr1keys:for(m in g){for(l=1;l<arguments.length-1;l++){c=arguments[l];for(f in c){if(d(c[f],g[m])===0){continue arr1keys}}n[m]=g[m]}}return n}function array_udiff_assoc(){var g=arguments[0],n={},d=arguments[arguments.length-1];var c={},l=1,m="",f="";d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;arr1keys:for(m in g){for(l=1;l<arguments.length-1;l++){c=arguments[l];for(f in c){if(d(c[f],g[m])===0&&f===m){continue arr1keys}}n[m]=g[m]}}return n}function array_udiff_uassoc(){var g=arguments[0],o={},d=arguments[arguments.length-1],m=arguments[arguments.length-2];var n="",l=1,f="",c={};d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;m=(typeof m==="string")?window[m]:(m instanceof Array)?window[m[0]][m[1]]:m;arr1keys:for(n in g){for(l=1;l<arguments.length-2;l++){c=arguments[l];for(f in c){if(m(c[f],g[n])===0&&d(f,n)===0){continue arr1keys}}o[n]=g[n]}}return o}function array_uintersect(){var g=arguments[0],n={},d=arguments[arguments.length-1];var m="",l=1,c={},f="";d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;arr1keys:for(m in g){arrs:for(l=1;l<arguments.length-1;l++){c=arguments[l];for(f in c){if(d(c[f],g[m])===0){if(l===arguments.length-2){n[m]=g[m]}continue arrs}}continue arr1keys}}return n}function array_uintersect_assoc(){var g=arguments[0],n={},d=arguments[arguments.length-1];var m="",l=1,c={},f="";d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;arr1keys:for(m in g){arrs:for(l=1;l<arguments.length-1;l++){c=arguments[l];for(f in c){if(d(c[f],g[m])===0&&f===m){if(l===arguments.length-2){n[m]=g[m]}continue arrs}}continue arr1keys}}return n}function array_uintersect_uassoc(){var g=arguments[0],o={},d=arguments[arguments.length-1],m=arguments[arguments.length-2];var n="",l=1,f="",c={};d=(typeof d==="string")?window[d]:(d instanceof Array)?window[d[0]][d[1]]:d;m=(typeof m==="string")?window[m]:(m instanceof Array)?window[m[0]][m[1]]:m;arr1keys:for(n in g){arrs:for(l=1;l<arguments.length-2;l++){c=arguments[l];for(f in c){if(m(c[f],g[n])===0&&d(f,n)===0){if(l===arguments.length-3){o[n]=g[n]}continue arrs}}continue arr1keys}}return o}function array_unique(l){var g="",f={},d={};var k="";f=l;var c=function(q,p,n){var o="";var m=!!n;for(o in p){if((m&&p[o]===q)||(!m&&p[o]==q)){return o}}return false};for(g in f){k=f[g];if(false===c(k,d)){d[g]=k}delete f[g]}return d}function array_unshift(g){var f=arguments.length,c=arguments,d;for(d=1;d<f;d++){g.unshift(c[d])}return(g.length)}function array_values(c){var d=[],g=0;var f="";for(f in c){d[g]=c[f];g++}return d}function array_walk(array,funcname,userdata){var key;if(typeof array!="object"){return false}for(key in array){if(typeof(userdata)!="undefined"){eval(funcname+"( array [key] , key , userdata  )")}else{eval(funcname+"(  userdata ) ")}}return true}function array_walk_recursive(array,funcname,userdata){var key;if(typeof array!="object"){return false}for(key in array){if(typeof array[key]=="object"){return array_walk_recursive(array[key],funcname,userdata)}if(typeof(userdata)!="undefined"){eval(funcname+"( array [key] , key , userdata  )")}else{eval(funcname+"(  userdata ) ")}}return true}function arsort(d,q){var c=[],p=[],f,g,m,o;switch(q){case"SORT_STRING":o=function(r,k){return strnatcmp(k,r)};break;case"SORT_LOCALE_STRING":o=function(r,k){return(k.localeCompare(r))};break;case"SORT_NUMERIC":o=function(r,k){return(r-k)};break;case"SORT_REGULAR":default:o=function(r,k){if(r>k){return 1}if(r<k){return -1}return 0};break}var n=function(k,x){var u,t,v,r;for(u=x.length-2;u>=0;u--){for(t=0;t<=u;t++){m=o(x[t+1],x[t]);if(m>0){v=x[t];x[t]=x[t+1];x[t+1]=v;r=k[t];k[t]=k[t+1];k[t+1]=r}}}};for(f in d){c.push(d[f]);p.push(f);delete d[f]}try{n(p,c)}catch(l){return false}for(g=0;g<c.length;g++){d[p[g]]=c[g]}return true}function asin(c){return Math.asin(c)}function asinh(c){return Math.log(c+Math.sqrt(c*c+1))}function asort(d,q){var c=[],p=[],f,g,m,o;switch(q){case"SORT_STRING":o=function(r,k){return strnatcmp(r,k)};break;case"SORT_LOCALE_STRING":o=function(r,k){return(r.localeCompare(k))};break;case"SORT_NUMERIC":o=function(r,k){return(r-k)};break;case"SORT_REGULAR":default:o=function(r,k){if(r>k){return 1}if(r<k){return -1}return 0};break}var n=function(k,x){var u,t,v,r;for(u=x.length-2;u>=0;u--){for(t=0;t<=u;t++){m=o(x[t+1],x[t]);if(m<0){v=x[t];x[t]=x[t+1];x[t+1]=v;r=k[t];k[t]=k[t+1];k[t+1]=r}}}};for(f in d){c.push(d[f]);p.push(f);delete d[f]}try{n(p,c)}catch(l){return false}for(g=0;g<c.length;g++){d[p[g]]=c[g]}return true}function atan(c){return Math.atan(c)}function atanh(c){return 0.5*Math.log((1+c)/(1-c))}function base64_decode(n){var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var f,d,c,r,q,p,o,t,m=0,u=0,k="",l=[];if(!n){return n}n+="";do{r=g.indexOf(n.charAt(m++));q=g.indexOf(n.charAt(m++));p=g.indexOf(n.charAt(m++));o=g.indexOf(n.charAt(m++));t=r<<18|q<<12|p<<6|o;f=t>>16&255;d=t>>8&255;c=t&255;if(p==64){l[u++]=String.fromCharCode(f)}else{if(o==64){l[u++]=String.fromCharCode(f,d)}else{l[u++]=String.fromCharCode(f,d,c)}}}while(m<n.length);k=l.join("");k=utf8_decode(k);return k}function base64_encode(n){var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var f,d,c,r,q,p,o,t,m=0,u=0,l="",k=[];if(!n){return n}n=utf8_encode(n+"");do{f=n.charCodeAt(m++);d=n.charCodeAt(m++);c=n.charCodeAt(m++);t=f<<16|d<<8|c;r=t>>18&63;q=t>>12&63;p=t>>6&63;o=t&63;k[u++]=g.charAt(r)+g.charAt(q)+g.charAt(p)+g.charAt(o)}while(m<n.length);l=k.join("");switch(n.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"=";break}return l}function base_convert(d,c,f){return parseInt(d+"",c+0).toString(f+0)}function bin2hex(g){var d,k=0,c=[];g+="";k=g.length;for(d=0;d<k;d++){c[d]=g.charCodeAt(d).toString(16).replace(/^([\da-f])$/,"0$1")}return c.join("")}function bindec(c){c=(c+"").replace(/[^01]/gi,"");return parseInt(c,2)}function ceil(c){return Math.ceil(c)}function checkdate(g,c,f){var d=new Date();d.setFullYear(f,(g-1),c);return((d.getMonth()+1)==g&&c<32)}function chop(d,c){return rtrim(d,c)}function chr(c){return String.fromCharCode(c)}function chunk_split(d,k,g){if(l<1){return false}var c="",l=k||76,f=g||"\r\n";while(d.length>l){c+=d.substring(0,l)+f;d=d.substring(l)}return c+d+f}function class_exists(c){var d="";c=window[c];if(typeof c!=="function"){return false}for(d in c.prototype){return true}for(d in c){if(d!=="prototype"){return true}}if(c.toSource&&c.toSource().match(/this\./)){return true}return false}function compact(){var c={};var d;var f=function(n){var m=0,g=n.length,k="";for(m=0;m<g;m++){k=n[m];if(k instanceof Array){f(k)}else{if(typeof window[k]!=="undefined"){c[k]=window[k]}}}return true};f(arguments);return c}function cos(c){return Math.cos(c)}function cosh(c){return(Math.exp(c)+Math.exp(-c))/2}function count(f,g){var d,c=0;if(g=="COUNT_RECURSIVE"){g=1}if(g!=1){g=0}for(d in f){c++;if(g==1&&f[d]&&(f[d].constructor===Array||f[d].constructor===Object)){c+=count(f[d],1)}}return c}function count_chars(m,k){var n={},f=[];var o,g,c,p=0;var d=arguments.length;var l=0;if(d==1){k=0}l=(k&1)==0;if(l){for(g=1;g<256;++g){n[g]=0}}m+="";p=m.length;for(g=0;g<p;++g){c=m.charCodeAt(g);if(c in n){++n[c]}else{n[c]=1}}if(k>0){for(o in n){if(n[o]==0!=l){delete n[o]}}}if(k<3){return n}else{for(o in n){f.push(String.fromCharCode(o))}return f.join("")}}function crc32(l){l=utf8_encode(l);var f="00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";var g=0;var c=0;var m=0;g=g^(-1);for(var d=0,k=l.length;d<k;d++){m=(g^l.charCodeAt(d))&255;c="0x"+f.substr(m*9,8);g=(g>>>8)^c}return g^(-1)}function date(p,k){var o,m=[],n=((typeof(k)=="undefined")?new Date():(typeof(k)=="number")?new Date(k*1000):new Date(k));var c=function(t,f){if((t=t+"").length<f){return new Array(++f-t.length).join("0")+t}else{return t}};var l="";var r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var q={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"};var d=["","January","February","March","April","May","June","July","August","September","October","November","December"];var g={d:function(){return c(g.j(),2)},D:function(){var f=g.l();return f.substr(0,3)},j:function(){return n.getDate()},l:function(){return r[g.w()]},N:function(){return g.w()+1},S:function(){return q[g.j()]?q[g.j()]:"th"},w:function(){return n.getDay()},z:function(){return(n-new Date(n.getFullYear()+"/1/1"))/86400000>>0},W:function(){var t=g.z(),f=364+g.L()-t;var u,v=(new Date(n.getFullYear()+"/1/1").getDay()||7)-1;if(f<=2&&((n.getDay()||7)-1)<=2-f){return 1}else{if(t<=2&&v>=4&&t>=(6-v)){u=new Date(n.getFullYear()-1+"/12/31");return date("W",Math.round(u.getTime()/1000))}else{return(1+(v<=3?((t+v)/7):(t-(7-v))/7)>>0)}}},F:function(){return d[g.n()]},m:function(){return c(g.n(),2)},M:function(){var f;f=g.F();return f.substr(0,3)},n:function(){return n.getMonth()+1},t:function(){var f;if((f=n.getMonth()+1)==2){return 28+g.L()}else{if(f&1&&f<8||!(f&1)&&f>7){return 31}else{return 30}}},L:function(){var f=g.Y();return(!(f&3)&&(f%100||!(f%400)))?1:0},o:function(){if(g.n()===12&&g.W()===1){return n.getFullYear()+1}if(g.n()===1&&g.W()>=52){return n.getFullYear()-1}return n.getFullYear()},Y:function(){return n.getFullYear()},y:function(){return(n.getFullYear()+"").slice(2)},a:function(){return n.getHours()>11?"pm":"am"},A:function(){return g.a().toUpperCase()},B:function(){var u=(n.getTimezoneOffset()+60)*60;var f=(n.getHours()*3600)+(n.getMinutes()*60)+n.getSeconds()+u;var t=Math.floor(f/86.4);if(t>1000){t-=1000}if(t<0){t+=1000}if((String(t)).length==1){t="00"+t}if((String(t)).length==2){t="0"+t}return t},g:function(){return n.getHours()%12||12},G:function(){return n.getHours()},h:function(){return c(g.g(),2)},H:function(){return c(n.getHours(),2)},i:function(){return c(n.getMinutes(),2)},s:function(){return c(n.getSeconds(),2)},u:function(){return c(n.getMilliseconds()*1000,6)},e:function(){return"UTC"},I:function(){var t=(new Date(n.getFullYear(),6,1,0,0,0));t=t.getHours()-t.getUTCHours();var f=n.getHours()-n.getUTCHours();return f!=t?1:0},O:function(){var f=c(Math.abs(n.getTimezoneOffset()/60*100),4);if(n.getTimezoneOffset()>0){f="-"+f}else{f="+"+f}return f},P:function(){var f=g.O();return(f.substr(0,3)+":"+f.substr(3,2))},T:function(){return"UTC"},Z:function(){var f=-n.getTimezoneOffset()*60;return f},c:function(){return g.Y()+"-"+g.m()+"-"+g.d()+"T"+g.h()+":"+g.i()+":"+g.s()+g.P()},r:function(){return g.D()+", "+g.d()+" "+g.M()+" "+g.Y()+" "+g.H()+":"+g.i()+":"+g.s()+" "+g.O()},U:function(){return Math.round(n.getTime()/1000)}};return p.replace(/[\\]?([a-zA-Z])/g,function(f,u){if(f!=u){l=u}else{if(g[u]){l=g[u]()}else{l=u}}return l})}function decbin(c){return parseInt(c).toString(2)}function dechex(c){return parseInt(c).toString(16)}function decoct(c){return parseInt(c).toString(8)}function deg2rad(c){return(c/180)*Math.PI}function doubleval(c){return floatval(c)}function echo(){var d="",g=arguments.length,c=arguments,f=0;var k=function(y){var z=document;var x=function(q){return q.replace(/\r/g," ").replace(/\n/g," ")};var p=function(q){return q.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&nbsp;/g," ").replace(/&quot;/g,'"')};var o=function(q){return q.replace(/ /g,"")};var n=function(r){var q,C,B,A,v,u,t;q=z.createDocumentFragment();C=r.indexOf(" ");if(C===-1){q.appendChild(z.createElement(r.toLowerCase()))}else{t=o(r.substring(0,C)).toLowerCase();r=r.substr(C+1);q.appendChild(z.createElement(t));while(r.length){B=r.indexOf("=");if(B>=0){A=o(r.substring(0,B)).toLowerCase();v=r.indexOf('"');r=r.substr(v+1);v=r.indexOf('"');u=p(r.substring(0,v));r=r.substr(v+2);q.lastChild.setAttribute(A,u)}else{break}}}return q};var m=function(r,q,v){var u,t;u=q;v=v.toLowerCase();t=u.indexOf("</"+v+">");r=r.concat(u.substring(0,t));u=u.substr(t);while(r.indexOf("<"+v)!=-1){r=r.substr(r.indexOf("<"+v));r=r.substr(r.indexOf(">")+1);u=u.substr(u.indexOf(">")+1);t=u.indexOf("</"+v+">");r=r.concat(u.substring(0,t));u=u.substr(t)}return q.length-u.length};var l=function(L){var K,J,I,H,G,F,E,D,C,B,A,v,u,t,r;K=z.createDocumentFragment();while(L&&L.length){J=L.indexOf("<");if(J===-1){L=p(L);K.appendChild(z.createTextNode(L));L=null}else{if(J){r=p(L.substring(0,J));K.appendChild(z.createTextNode(r));L=L.substr(J)}else{I=L.indexOf("<!--");if(!I){H=L.indexOf("-->");G=L.substring(4,H);G=p(G);K.appendChild(z.createComment(G));L=L.substr(H+3)}else{F=L.indexOf(">");if(L.substring(F-1,F)==="/"){E=L.indexOf("/>");D=L.substring(1,E);K.appendChild(n(D));L=L.substr(E+2)}else{C=L.indexOf(">");B=L.substring(1,C);A=z.createDocumentFragment();A.appendChild(n(B));L=L.substr(C+1);v=L.substring(0,L.indexOf("</"));L=L.substr(L.indexOf("</"));if(v.indexOf("<")!=-1){u=A.lastChild.nodeName;t=m(v,L,u);v=v.concat(L.substring(0,t));L=L.substr(t)}L=L.substr(L.indexOf(">")+1);A.lastChild.appendChild(l(v));K.appendChild(A)}}}}}return K};return l(y)};for(f=0;f<g;f++){d=c[f];if(document.createDocumentFragment&&document.createTextNode&&document.appendChild){if(document.body){document.body.appendChild(k(d))}else{document.documentElement.appendChild(k(d))}}else{if(document.write){document.write(d)}else{print(d)}}}}function end(c){if(!this.php_js){this.php_js={}}if(!this.php_js.pointers){this.php_js.pointers=[]}var f=this.php_js.pointers;if(f.indexOf(c)===-1){f.push(c,0)}var l=f.indexOf(c);if(!(c instanceof Array)){var g=0;for(var d in c){g++;var m=c[d]}if(g===0){return false}f[l+1]=g-1;return m}if(c.length===0){return false}f[l+1]=c.length-1;return c[f[l+1]]}function exp(c){return Math.exp(c)}function explode(f,k,c){var l={0:""};if(arguments.length<2||typeof arguments[0]=="undefined"||typeof arguments[1]=="undefined"){return null}if(f===""||f===false||f===null){return false}if(typeof f=="function"||typeof f=="object"||typeof k=="function"||typeof k=="object"){return l}if(f===true){f="1"}if(!c){return k.toString().split(f.toString())}else{var m=k.toString().split(f.toString());var g=m.splice(0,c-1);var d=m.join(f.toString());g.push(d);return g}}function floatval(c){return(parseFloat(c)||0)}function floor(c){return Math.floor(c)}function fmod(d,o){var k,m,n=0,g=0,f=0,c=0;k=d.toExponential().match(/^.\.?(.*)e(.+)$/);n=parseInt(k[2])-(k[1]+"").length;k=o.toExponential().match(/^.\.?(.*)e(.+)$/);g=parseInt(k[2])-(k[1]+"").length;if(g>n){n=g}m=(d%o);if(n<-100||n>20){f=Math.round(Math.log(m)/Math.log(10));c=Math.pow(10,f);return(m/c).toFixed(f-n)*c}else{return parseFloat(m.toFixed(-n))}}function get_class(d){if(d instanceof Object&&!(d instanceof Array)&&!(d instanceof Function)&&d.constructor&&d!=window){var c=d.constructor.toString().match(/function\s*(\w+)/);if(c&&c.length==2){return c[1]}}return false}function get_defined_vars(){var f="",c=[],k={};for(f in window){try{if(typeof window[f]==="function"){if(!k[f]){k[f]=1;c.push(f)}}else{if(typeof window[f]==="object"){for(var d in window[f]){if(typeof window[d]==="function"&&window[d]&&!k[d]){k[d]=1;c.push(d)}}}}}catch(g){}}return c}function get_headers(c,k){var g=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(!g){throw new Error("XMLHttpRequest not supported")}var f,m,l,d;g.open("HEAD",c,false);g.send(null);if(g.readyState<3){return false}f=g.getAllResponseHeaders();alert(f);f=f.split("\n");f=array_filter(f,function(n){return n.substring(1)!=""});m=[g.status+" "+g.statusText];for(d in f){if(k){l=f[d].split(":");m[l.splice(0,1)]=l.join(":").substring(1)}else{m[m.length]=f[d]}}return m}function get_html_translation_table(o,l){var g={},n={},f=0,c="";var k={},d={};var p={},m={};p=(o?o.toUpperCase():"HTML_SPECIALCHARS");m=(l?l.toUpperCase():"ENT_COMPAT");k[0]="HTML_SPECIALCHARS";k[1]="HTML_ENTITIES";d[0]="ENT_NOQUOTES";d[2]="ENT_COMPAT";d[3]="ENT_QUOTES";if(!isNaN(p)){p=k[p]}if(!isNaN(m)){m=d[m]}if(p=="HTML_SPECIALCHARS"){g["38"]="&amp;";if(m!="ENT_NOQUOTES"){g["34"]="&quot;"}if(m=="ENT_QUOTES"){g["39"]="&#039;"}g["60"]="&lt;";g["62"]="&gt;"}else{if(p=="HTML_ENTITIES"){g["38"]="&amp;";if(m!="ENT_NOQUOTES"){g["34"]="&quot;"}if(m=="ENT_QUOTES"){g["39"]="&#039;"}g["60"]="&lt;";g["62"]="&gt;";g["160"]="&nbsp;";g["161"]="&iexcl;";g["162"]="&cent;";g["163"]="&pound;";g["164"]="&curren;";g["165"]="&yen;";g["166"]="&brvbar;";g["167"]="&sect;";g["168"]="&uml;";g["169"]="&copy;";g["170"]="&ordf;";g["171"]="&laquo;";g["172"]="&not;";g["173"]="&shy;";g["174"]="&reg;";g["175"]="&macr;";g["176"]="&deg;";g["177"]="&plusmn;";g["178"]="&sup2;";g["179"]="&sup3;";g["180"]="&acute;";g["181"]="&micro;";g["182"]="&para;";g["183"]="&middot;";g["184"]="&cedil;";g["185"]="&sup1;";g["186"]="&ordm;";g["187"]="&raquo;";g["188"]="&frac14;";g["189"]="&frac12;";g["190"]="&frac34;";g["191"]="&iquest;";g["192"]="&Agrave;";g["193"]="&Aacute;";g["194"]="&Acirc;";g["195"]="&Atilde;";g["196"]="&Auml;";g["197"]="&Aring;";g["198"]="&AElig;";g["199"]="&Ccedil;";g["200"]="&Egrave;";g["201"]="&Eacute;";g["202"]="&Ecirc;";g["203"]="&Euml;";g["204"]="&Igrave;";g["205"]="&Iacute;";g["206"]="&Icirc;";g["207"]="&Iuml;";g["208"]="&ETH;";g["209"]="&Ntilde;";g["210"]="&Ograve;";g["211"]="&Oacute;";g["212"]="&Ocirc;";g["213"]="&Otilde;";g["214"]="&Ouml;";g["215"]="&times;";g["216"]="&Oslash;";g["217"]="&Ugrave;";g["218"]="&Uacute;";g["219"]="&Ucirc;";g["220"]="&Uuml;";g["221"]="&Yacute;";g["222"]="&THORN;";g["223"]="&szlig;";g["224"]="&agrave;";g["225"]="&aacute;";g["226"]="&acirc;";g["227"]="&atilde;";g["228"]="&auml;";g["229"]="&aring;";g["230"]="&aelig;";g["231"]="&ccedil;";g["232"]="&egrave;";g["233"]="&eacute;";g["234"]="&ecirc;";g["235"]="&euml;";g["236"]="&igrave;";g["237"]="&iacute;";g["238"]="&icirc;";g["239"]="&iuml;";g["240"]="&eth;";g["241"]="&ntilde;";g["242"]="&ograve;";g["243"]="&oacute;";g["244"]="&ocirc;";g["245"]="&otilde;";g["246"]="&ouml;";g["247"]="&divide;";g["248"]="&oslash;";g["249"]="&ugrave;";g["250"]="&uacute;";g["251"]="&ucirc;";g["252"]="&uuml;";g["253"]="&yacute;";g["254"]="&thorn;";g["255"]="&yuml;"}else{throw Error("Table: "+p+" not supported");return false}}for(f in g){c=String.fromCharCode(f);n[c]=g[f]}return n}function getdate(n){var k=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var g=["January","February","March","April","May","June","July","August","September","October","November","December"];var o=(typeof n=="number")?new Date(n*1000):new Date();var f=o.getDay();var c=o.getMonth();var p=o.getFullYear();var l={};l.seconds=o.getSeconds();l.minutes=o.getMinutes();l.hours=o.getHours();l.mday=o.getDate();l.wday=f;l.mon=c+1;l.year=p;l.yday=Math.floor((o-(new Date(p,0,1)))/86400000);l.weekday=k[f];l.month=g[c];l["0"]=parseInt(o.getTime()/1000);return l}function getrandmax(){return 2147483647}function hexdec(c){c=(c+"").replace(/[^a-f0-9]/gi,"");return parseInt(c,16)}function html_entity_decode(f,l){var k={},g="",c="",d="";c=f.toString();if(false===(k=get_html_translation_table("HTML_ENTITIES",l))){return false}delete (k["&"]);k["&"]="&amp;";for(g in k){d=k[g];c=c.split(d).join(g)}return c}function htmlentities(f,l){var k={},g="",c="",d="";c=f.toString();if(false===(k=get_html_translation_table("HTML_ENTITIES",l))){return false}for(g in k){d=k[g];c=c.split(g).join(d)}return c}function htmlspecialchars(f,l){var k={},g="",c="",d="";c=f.toString();if(false===(k=get_html_translation_table("HTML_SPECIALCHARS",l))){return false}for(g in k){d=k[g];c=c.split(g).join(d)}return c}function htmlspecialchars_decode(f,l){var k={},g="",c="",d="";c=f.toString();if(false===(k=get_html_translation_table("HTML_SPECIALCHARS",l))){return false}delete (k["&"]);k["&"]="&amp;";for(g in k){d=k[g];c=c.split(d).join(g)}return c}function http_build_query(n,l,k){var m,c,o,g=0,f=0,d=[];if(!k){k="&"}for(m in n){c=urlencode(n[m].toString());o=urlencode(m);if(l&&!isNaN(m)){o=l+f;f++}d[g++]=o+"="+c}return d.join(k)}function hypot(c,d){return Math.sqrt(c*c+d*d)||0}function implode(d,c){return((c instanceof Array)?c.join(d):c)}function in_array(l,k,f){var g=false,d,c=!!f;for(d in k){if((c&&k[d]===l)||(!c&&k[d]==l)){g=true;break}}return g}function intval(d,g){var c;var f=typeof(d);if(f=="boolean"){if(d==true){return 1}else{return 0}}else{if(f=="string"){c=parseInt(d*1);if(isNaN(c)||!isFinite(c)){return 0}else{return c.toString(g||10)}}else{if(f=="number"&&isFinite(d)){return Math.floor(d)}else{return 0}}}}function ip2long(d){var c=false;var f=[];if(d.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)){f=d.split(".");c=(f[0]*16777216+(f[1]*65536)+(f[2]*256)+(f[3]*1))}return c}function is_bool(c){return(typeof c=="boolean")}function is_double(c){return is_float(c)}function is_finite(d){var c="";if(d===Infinity||d===-Infinity){return false}if(typeof d=="object"){c=(d instanceof Array?"array":"object")}else{if(typeof d=="string"&&!d.match(/^[\+\-]?\d/)){c="string"}}if(c){throw new Error("Warning: is_finite() expects parameter 1 to be double, "+c+" given")}return true}function is_float(c){return parseFloat(c*1)!=parseInt(c*1)}function is_infinite(d){var c="";if(d===Infinity||d===-Infinity){return true}if(typeof d=="object"){c=(d instanceof Array?"array":"object")}else{if(typeof d=="string"&&!d.match(/^[\+\-]?\d/)){c="string"}}if(c){throw new Error("Warning: is_infinite() expects parameter 1 to be double, "+c+" given")}return false}function is_int(c){if(typeof c!=="number"){return false}if(parseFloat(c)!=parseInt(c)){return false}return true}function is_integer(c){return is_int(c)}function is_long(c){return is_float(c)}function is_nan(d){var c="";if(typeof d=="number"&&isNaN(d)){return true}if(typeof d=="object"){c=(d instanceof Array?"array":"object")}else{if(typeof d=="string"&&!d.match(/^[\+\-]?\d/)){c="string"}}if(c){throw new Error("Warning: is_nan() expects parameter 1 to be double, "+c+" given")}return false}function is_null(c){return(c===null)}function is_numeric(c){if(c===""){return false}return !isNaN(c*1)}function is_real(c){return is_float(c)}function is_scalar(c){return/boolean|number|string/.test(typeof c)}function is_string(c){return(typeof(c)=="string")}function join(d,c){return implode(d,c)}function json_decode(str_json){var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var j;var text=str_json;var walk=function(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)};cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("json_decode")}function json_encode(l){var c;var g=l;var f;var d=function(m){var o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};o.lastIndex=0;return o.test(m)?'"'+m.replace(o,function(p){var q=n[p];return typeof q==="string"?q:"\\u"+("0000"+p.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+m+'"'};var k=function(y,r){var u="";var n="    ";var p=0;var o="";var z="";var m=0;var t=u;var q=[];var x=r[y];if(x&&typeof x==="object"&&typeof x.toJSON==="function"){x=x.toJSON(y)}switch(typeof x){case"string":return d(x);case"number":return isFinite(x)?String(x):"null";case"boolean":case"null":return String(x);case"object":if(!x){return"null"}u+=n;q=[];if(Object.prototype.toString.apply(x)==="[object Array]"){m=x.length;for(p=0;p<m;p+=1){q[p]=k(p,x)||"null"}z=q.length===0?"[]":u?"[\n"+u+q.join(",\n"+u)+"\n"+t+"]":"["+q.join(",")+"]";u=t;return z}for(o in x){if(Object.hasOwnProperty.call(x,o)){z=k(o,x);if(z){q.push(d(o)+(u?": ":":")+z)}}}z=q.length===0?"{}":u?"{\n"+u+q.join(",\n"+u)+"\n"+t+"}":"{"+q.join(",")+"}";u=t;return z}};return k("",{"":g})}function krsort(m,c){var d={},k=[],l,g,f;switch(c){case"SORT_STRING":l=function(o,n){return strnatcmp(n,o)};break;case"SORT_LOCALE_STRING":l=function(o,n){return(n.localeCompare(o))};break;case"SORT_NUMERIC":l=function(o,n){return(n-o)};break;case"SORT_REGULAR":default:l=function(o,n){if(o<n){return 1}if(o>n){return -1}return 0};break}for(f in m){k.push(f)}k.sort(l);for(g=0;g<k.length;g++){f=k[g];d[f]=m[f];delete m[f]}for(g in d){m[g]=d[g]}return true}function ksort(m,c){var d={},k=[],l,g,f;switch(c){case"SORT_STRING":l=function(o,n){return strnatcmp(o,n)};break;case"SORT_LOCALE_STRING":l=function(o,n){return(o.localeCompare(n))};break;case"SORT_NUMERIC":l=function(o,n){return(o-n)};break;case"SORT_REGULAR":default:l=function(o,n){if(o>n){return 1}if(o<n){return -1}return 0};break}for(f in m){k.push(f)}k.sort(l);for(g=0;g<k.length;g++){f=k[g];d[f]=m[f];delete m[f]}for(g in d){m[g]=d[g]}return true}function lcfirst(d){d+="";var c=d.charAt(0).toLowerCase();return c+d.substr(1)}function lcg_value(){return Math.random()}function levenshtein(t,q){var k=Math.min,l=0,f=0,u=0,m=0,n=[],p="",g=0,r=0;var o=false;try{o=!("0")[0]}catch(m){o=true}if(t==q){return 0}if(!t.length||!q.length){return q.length||t.length}if(o){t=t.split("");q=q.split("")}l=t.length+1;f=q.length+1;n=[[0]];while(++m<f){n[0][m]=m}m=0;while(++m<l){r=g=0;p=t[u];n[m]=[m];while(++g<f){n[m][g]=k(n[u][g]+1,n[m][r]+1,n[u][r]+(p!=q[r]));++r}++u}return n[l-1][f-1]}function log(c,d){if(d===undefined){return Math.log(c)}else{return Math.log(c)/Math.log(d)}}function log10(c){return Math.log(c)/Math.LN10}function long2ip(d){var c=false;if(!isNaN(d)&&(d>=0||d<=4294967295)){c=Math.floor(d/Math.pow(256,3))+"."+Math.floor((d%Math.pow(256,3))/Math.pow(256,2))+"."+Math.floor(((d%Math.pow(256,3))%Math.pow(256,2))/Math.pow(256,1))+"."+Math.floor((((d%Math.pow(256,3))%Math.pow(256,2))%Math.pow(256,1))/Math.pow(256,0))}return c}function ltrim(f,d){d=!d?" s\xA0":(d+"").replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"$1");var c=new RegExp("^["+d+"]+","g");return(f+"").replace(c,"")}function max(){var d,l,g=0,o=0;var c=arguments,k=c.length;var m=function(q){if(q instanceof Array){return q}else{var n=[];for(var p in q){n.push(q[p])}return n}};var f=function(v,u){var t=0,x=0,r=0;var q=0,p=0;if(v===u){return 0}else{if(typeof v=="object"){if(typeof u=="object"){v=m(v);u=m(u);p=v.length;q=u.length;if(q>p){return 1}else{if(q<p){return -1}else{for(t=0,x=p;t<x;++t){r=f(v[t],u[t]);if(r==1){return 1}else{if(r==-1){return -1}}}return 0}}}else{return -1}}else{if(typeof u=="object"){return 1}else{if(isNaN(u)&&!isNaN(v)){if(v==0){return 0}else{return(v<0?1:-1)}}else{if(isNaN(v)&&!isNaN(u)){if(u==0){return 0}else{return(u>0?1:-1)}}else{if(u==v){return 0}else{return(u>v?1:-1)}}}}}}};if(k==0){throw new Error("At least one value should be passed to max()")}else{if(k==1){if(typeof c[0]=="object"){d=m(c[0])}else{throw new Error("Wrong parameter count for max()")}if(d.length==0){throw new Error("Array must contain at least one element for max()")}}else{d=c}}l=d[0];for(g=1,o=d.length;g<o;++g){if(f(l,d[g])==1){l=d[g]}}return l}function md5(K){var M;var R=function(d,c){return(d<<c)|(d>>>(32-c))};var Q=function(F,d){var H,c,x,G,k;x=(F&2147483648);G=(d&2147483648);H=(F&1073741824);c=(d&1073741824);k=(F&1073741823)+(d&1073741823);if(H&c){return(k^2147483648^x^G)}if(H|c){if(k&1073741824){return(k^3221225472^x^G)}else{return(k^1073741824^x^G)}}else{return(k^x^G)}};var y=function(c,k,d){return(c&k)|((~c)&d)};var v=function(c,k,d){return(c&d)|(k&(~d))};var u=function(c,k,d){return(c^k^d)};var r=function(c,k,d){return(k^(c|(~d)))};var A=function(G,F,ag,af,k,H,I){G=Q(G,Q(Q(y(F,ag,af),k),I));return Q(R(G,H),F)};var g=function(G,F,ag,af,k,H,I){G=Q(G,Q(Q(v(F,ag,af),k),I));return Q(R(G,H),F)};var O=function(G,F,ag,af,k,H,I){G=Q(G,Q(Q(u(F,ag,af),k),I));return Q(R(G,H),F)};var z=function(G,F,ag,af,k,H,I){G=Q(G,Q(Q(r(F,ag,af),k),I));return Q(R(G,H),F)};var f=function(H){var I;var x=H.length;var k=x+8;var d=(k-(k%64))/64;var G=(d+1)*16;var af=Array(G-1);var c=0;var F=0;while(F<x){I=(F-(F%4))/4;c=(F%4)*8;af[I]=(af[I]|(H.charCodeAt(F)<<c));F++}I=(F-(F%4))/4;c=(F%4)*8;af[I]=af[I]|(128<<c);af[G-2]=x<<3;af[G-1]=x>>>29;return af};var L=function(k){var d="",x="",F,c;for(c=0;c<=3;c++){F=(k>>>(c*8))&255;x="0"+F.toString(16);d=d+x.substr(x.length-2,2)}return d};var N=Array();var V,m,P,B,l,ae,ad,ac,ab;var Y=7,W=12,T=17,S=22;var J=5,E=9,D=14,C=20;var t=4,q=11,p=16,o=23;var aa=6,Z=10,X=15,U=21;K=utf8_encode(K);N=f(K);ae=1732584193;ad=4023233417;ac=2562383102;ab=271733878;M=N.length;for(V=0;V<M;V+=16){m=ae;P=ad;B=ac;l=ab;ae=A(ae,ad,ac,ab,N[V+0],Y,3614090360);ab=A(ab,ae,ad,ac,N[V+1],W,3905402710);ac=A(ac,ab,ae,ad,N[V+2],T,606105819);ad=A(ad,ac,ab,ae,N[V+3],S,3250441966);ae=A(ae,ad,ac,ab,N[V+4],Y,4118548399);ab=A(ab,ae,ad,ac,N[V+5],W,1200080426);ac=A(ac,ab,ae,ad,N[V+6],T,2821735955);ad=A(ad,ac,ab,ae,N[V+7],S,4249261313);ae=A(ae,ad,ac,ab,N[V+8],Y,1770035416);ab=A(ab,ae,ad,ac,N[V+9],W,2336552879);ac=A(ac,ab,ae,ad,N[V+10],T,4294925233);ad=A(ad,ac,ab,ae,N[V+11],S,2304563134);ae=A(ae,ad,ac,ab,N[V+12],Y,1804603682);ab=A(ab,ae,ad,ac,N[V+13],W,4254626195);ac=A(ac,ab,ae,ad,N[V+14],T,2792965006);ad=A(ad,ac,ab,ae,N[V+15],S,1236535329);ae=g(ae,ad,ac,ab,N[V+1],J,4129170786);ab=g(ab,ae,ad,ac,N[V+6],E,3225465664);ac=g(ac,ab,ae,ad,N[V+11],D,643717713);ad=g(ad,ac,ab,ae,N[V+0],C,3921069994);ae=g(ae,ad,ac,ab,N[V+5],J,3593408605);ab=g(ab,ae,ad,ac,N[V+10],E,38016083);ac=g(ac,ab,ae,ad,N[V+15],D,3634488961);ad=g(ad,ac,ab,ae,N[V+4],C,3889429448);ae=g(ae,ad,ac,ab,N[V+9],J,568446438);ab=g(ab,ae,ad,ac,N[V+14],E,3275163606);ac=g(ac,ab,ae,ad,N[V+3],D,4107603335);ad=g(ad,ac,ab,ae,N[V+8],C,1163531501);ae=g(ae,ad,ac,ab,N[V+13],J,2850285829);ab=g(ab,ae,ad,ac,N[V+2],E,4243563512);ac=g(ac,ab,ae,ad,N[V+7],D,1735328473);ad=g(ad,ac,ab,ae,N[V+12],C,2368359562);ae=O(ae,ad,ac,ab,N[V+5],t,4294588738);ab=O(ab,ae,ad,ac,N[V+8],q,2272392833);ac=O(ac,ab,ae,ad,N[V+11],p,1839030562);ad=O(ad,ac,ab,ae,N[V+14],o,4259657740);ae=O(ae,ad,ac,ab,N[V+1],t,2763975236);ab=O(ab,ae,ad,ac,N[V+4],q,1272893353);ac=O(ac,ab,ae,ad,N[V+7],p,4139469664);ad=O(ad,ac,ab,ae,N[V+10],o,3200236656);ae=O(ae,ad,ac,ab,N[V+13],t,681279174);ab=O(ab,ae,ad,ac,N[V+0],q,3936430074);ac=O(ac,ab,ae,ad,N[V+3],p,3572445317);ad=O(ad,ac,ab,ae,N[V+6],o,76029189);ae=O(ae,ad,ac,ab,N[V+9],t,3654602809);ab=O(ab,ae,ad,ac,N[V+12],q,3873151461);ac=O(ac,ab,ae,ad,N[V+15],p,530742520);ad=O(ad,ac,ab,ae,N[V+2],o,3299628645);ae=z(ae,ad,ac,ab,N[V+0],aa,4096336452);ab=z(ab,ae,ad,ac,N[V+7],Z,1126891415);ac=z(ac,ab,ae,ad,N[V+14],X,2878612391);ad=z(ad,ac,ab,ae,N[V+5],U,4237533241);ae=z(ae,ad,ac,ab,N[V+12],aa,1700485571);ab=z(ab,ae,ad,ac,N[V+3],Z,2399980690);ac=z(ac,ab,ae,ad,N[V+10],X,4293915773);ad=z(ad,ac,ab,ae,N[V+1],U,2240044497);ae=z(ae,ad,ac,ab,N[V+8],aa,1873313359);ab=z(ab,ae,ad,ac,N[V+15],Z,4264355552);ac=z(ac,ab,ae,ad,N[V+6],X,2734768916);ad=z(ad,ac,ab,ae,N[V+13],U,1309151649);ae=z(ae,ad,ac,ab,N[V+4],aa,4149444226);ab=z(ab,ae,ad,ac,N[V+11],Z,3174756917);ac=z(ac,ab,ae,ad,N[V+2],X,718787259);ad=z(ad,ac,ab,ae,N[V+9],U,3951481745);ae=Q(ae,m);ad=Q(ad,P);ac=Q(ac,B);ab=Q(ab,l)}var n=L(ae)+L(ad)+L(ac)+L(ab);return n.toLowerCase()}function method_exists(c,d){if(typeof c==="string"){return window[c]&&typeof window[c][d]==="function"}return typeof c[d]==="function"}function microtime(d){var c=new Date().getTime()/1000;var f=parseInt(c);return(d)?c:(Math.round((c-f)*1000)/1000)+" "+f}function min(){var d,l,g=0,o=0;var c=arguments,k=c.length;var m=function(q){if(q instanceof Array){return q}else{var n=[];for(var p in q){n.push(q[p])}return n}};var f=function(v,u){var t=0,x=0,r=0;var q=0,p=0;if(v===u){return 0}else{if(typeof v=="object"){if(typeof u=="object"){v=m(v);u=m(u);p=v.length;q=u.length;if(q>p){return 1}else{if(q<p){return -1}else{for(t=0,x=p;t<x;++t){r=f(v[t],u[t]);if(r==1){return 1}else{if(r==-1){return -1}}}return 0}}}else{return -1}}else{if(typeof u=="object"){return 1}else{if(isNaN(u)&&!isNaN(v)){if(v==0){return 0}else{return(v<0?1:-1)}}else{if(isNaN(v)&&!isNaN(u)){if(u==0){return 0}else{return(u>0?1:-1)}}else{if(u==v){return 0}else{return(u>v?1:-1)}}}}}}};if(k==0){throw new Error("At least one value should be passed to min()")}else{if(k==1){if(typeof c[0]=="object"){d=m(c[0])}else{throw new Error("Wrong parameter count for min()")}if(d.length==0){throw new Error("Array must contain at least one element for min()")}}else{d=c}}l=d[0];for(g=1,o=d.length;g<o;++g){if(f(l,d[g])==-1){l=d[g]}}return l}function mktime(){var p=0,g=0,o=0,n=0,m=new Date(),k=new Date(),l=arguments,f=l.length;var c={0:function(d){return m.setHours(d)},1:function(d){return m.setMinutes(d)},2:function(d){var q=m.setSeconds(d);n=m.getDate()-k.getDate();return q},3:function(d){var q=m.setMonth(parseInt(d)-1);o=m.getFullYear()-k.getFullYear();return q},4:function(d){return m.setDate(d+n)},5:function(d){if(d>=0&&d<=69){d+=2000}else{if(d>=70&&d<=100){d+=1900}}return m.setFullYear(d+o)}};for(g=0;g<f;g++){p=parseInt(l[g]*1);if(isNaN(p)){return false}else{if(!c[g](p)){return false}}}for(g=f;g<6;g++){switch(g){case 0:p=k.getHours();break;case 1:p=k.getMinutes();break;case 2:p=k.getSeconds();break;case 3:p=k.getMonth()+1;break;case 4:p=k.getDate();break;case 5:p=k.getFullYear();break}c[g](p)}return Math.floor(m.getTime()/1000)}function mt_getrandmax(){return 2147483647}function mt_rand(d,c){var f=arguments.length;if(f==0){d=0;c=2147483647}else{if(f==1){throw new Error("Warning: mt_rand() expects exactly 2 parameters, 1 given")}}return Math.floor(Math.random()*(c-d+1))+d}function natcasesort(n){var m=[],d=[],c,g,f;var l=function(k,u){var r,q,t,p;for(r=u.length-2;r>=0;r--){for(q=0;q<=r;q++){f=strnatcasecmp(u[q+1],u[q]);if(f<0){t=u[q];u[q]=u[q+1];u[q+1]=t;p=k[q];k[q]=k[q+1];k[q+1]=p}}}};for(c in n){m.push(n[c]);d.push(c);delete n[c]}try{l(d,m)}catch(o){return false}for(g=0;g<m.length;g++){n[d[g]]=m[g]}return true}function natsort(n){var m=[],d=[],c,g,f;var l=function(k,u){var r,q,t,p;for(r=u.length-2;r>=0;r--){for(q=0;q<=r;q++){f=strnatcmp(u[q+1],u[q]);if(f<0){t=u[q];u[q]=u[q+1];u[q+1]=t;p=k[q];k[q]=k[q+1];k[q+1]=p}}}};for(c in n){m.push(n[c]);d.push(c);delete n[c]}try{l(d,m)}catch(o){return false}for(g=0;g<m.length;g++){n[d[g]]=m[g]}return true}function nl2br(f,d){var c="";c="<br />";if(typeof d!="undefined"&&!d){c="<br>"}return(f+"").replace(/([^>]?)\n/g,"$1"+c+"\n")}function number_format(l,f,p,k){var d=l,c=f;d=!isFinite(+d)?0:+d;c=!isFinite(+c)?0:Math.abs(c);var t=(typeof k=="undefined")?",":k;var g=(typeof p=="undefined")?".":p;var r=(c>0)?d.toFixed(c):Math.round(d).toFixed(c);var q=Math.abs(d).toFixed(c);var o,m;if(q>=1000){o=q.split(/\D/);m=o[0].length%3||3;o[0]=r.slice(0,m+(d<0))+o[0].slice(m).replace(/(\d{3})/g,t+"$1");r=o.join(g)}else{r=r.replace(".",g)}return r}function octdec(c){c=(c+"").replace(/[^0-7]/gi,"");return parseInt(c,8)}function ord(c){return(c+"").charCodeAt(0)}function parse_str(l,n){var d="=";var m="&";var g=(l+"").split(m);var k=0,f="",c=0;k=g.length;for(c=0;c<k;c++){f=g[c].split(d);n[unescape(f[0])]=unescape(f[1]).replace(/[+]/g," ")}}function parse_url(l,d){var k={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/\/?)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var c=k.parser[k.strictMode?"strict":"loose"].exec(l),g={},f=14;while(f--){g[k.key[f]]=c[f]||""}switch(d){case"PHP_URL_SCHEME":return g.protocol;case"PHP_URL_HOST":return g.host;case"PHP_URL_PORT":return g.port;case"PHP_URL_USER":return g.user;case"PHP_URL_PASS":return g.password;case"PHP_URL_PATH":return g.path;case"PHP_URL_QUERY":return g.query;case"PHP_URL_FRAGMENT":return g.anchor;default:var n={};if(g.protocol!==""){n.scheme=g.protocol}if(g.host!==""){n.host=g.host}if(g.port!==""){n.port=g.port}if(g.user!==""){n.user=g.user}if(g.password!==""){n.pass=g.password}if(g.path!==""){n.path=g.path}if(g.query!==""){n.query=g.query}if(g.anchor!==""){n.fragment=g.anchor}return n}}function pi(){return Math.PI}function pow(c,d){return Math.pow(c,d)}function preg_quote(c){return(c+"").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1")}function print_r(n,c){var d="",k=" ",l=4;var g=function(v,u,t,q){if(u>0){u++}var o=f(t*u,q);var r=f(t*(u+1),q);var x="";if(typeof v==="object"&&v!==null&&v.constructor&&v.constructor.name!=="PHPJS_Resource"){x+="Array\n"+o+"(\n";for(var p in v){if(v[p] instanceof Array){x+=r+"["+p+"] => "+g(v[p],u+1,t,q)}else{x+=r+"["+p+"] => "+v[p]+"\n"}}x+=o+")\n"}else{if(v==null||v==undefined){x=""}else{x=v.toString()}}return x};var f=function(o,q){var r="";for(var p=0;p<o;p++){r+=q}return r};d=g(n,0,l,k);if(c!==true){if(document.body){echo(d)}else{try{XULDocument;echo('<pre xmlns="http://www.w3.org/1999/xhtml" style="white-space:pre;">'+d+"</pre>")}catch(m){echo(d)}}return true}else{return d}}function property_exists(c,d){c=(typeof c==="string")?window[c]:c;if(typeof c==="function"&&c.toSource&&c.toSource().match(new RegExp("this\\."+d+"\\s"))){return true}return(c[d]!==undefined&&typeof c[d]!=="function")||(c.prototype!==undefined&&c.prototype[d]!==undefined&&typeof c.prototype[d]!=="function")||(c.constructor&&c.constructor[d]!==undefined&&typeof c.constructor[d]!=="function")}function quotemeta(c){return(c+"").replace(/([\.\\\+\*\?\[\^\]\$\(\)])/g,"\\$1")}function rad2deg(c){return(c/Math.PI)*180}function rand(d,c){var f=arguments.length;if(f==0){d=0;c=2147483647}else{if(f==1){throw new Error("Warning: rand() expects exactly 2 parameters, 1 given")}}return Math.floor(Math.random()*(c-d+1))+d}function range(n,f,d){var o=[];var g,l,k;var c=d||1;var m=false;if(!isNaN(n)&&!isNaN(f)){g=n;l=f}else{if(isNaN(n)&&isNaN(f)){m=true;g=n.charCodeAt(0);l=f.charCodeAt(0)}else{g=(isNaN(n)?0:n);l=(isNaN(f)?0:f)}}k=((g>l)?false:true);if(k){while(g<=l){o.push(((m)?String.fromCharCode(g):g));g+=c}}else{while(g>=l){o.push(((m)?String.fromCharCode(g):g));g-=c}}return o}function rawurldecode(g){var f={};var c=g.toString();var d=function(m,l,n){var k=[];k=n.split(m);return k.join(l)};f["'"]="%27";f["("]="%28";f[")"]="%29";f["*"]="%2A";f["~"]="%7E";f["!"]="%21";s;for(replace in f){search=f[replace];c=d(search,replace,c)}c=c.replace(/%([a-fA-F][0-9a-fA-F])/g,function(k,l){return String.fromCharCode("0x"+l)});c=decodeURIComponent(c);return c}function rawurlencode(k){var g={},d=[];var c=k.toString();var f=function(n,m,o){var l=[];l=o.split(n);return l.join(m)};g["'"]="%27";g["("]="%28";g[")"]="%29";g["*"]="%2A";g["~"]="%7E";g["!"]="%21";g["\u20AC"]="%80";g["\u0081"]="%81";g["\u201A"]="%82";g["\u0192"]="%83";g["\u201E"]="%84";g["\u2026"]="%85";g["\u2020"]="%86";g["\u2021"]="%87";g["\u02C6"]="%88";g["\u2030"]="%89";g["\u0160"]="%8A";g["\u2039"]="%8B";g["\u0152"]="%8C";g["\u008D"]="%8D";g["\u017D"]="%8E";g["\u008F"]="%8F";g["\u0090"]="%90";g["\u2018"]="%91";g["\u2019"]="%92";g["\u201C"]="%93";g["\u201D"]="%94";g["\u2022"]="%95";g["\u2013"]="%96";g["\u2014"]="%97";g["\u02DC"]="%98";g["\u2122"]="%99";g["\u0161"]="%9A";g["\u203A"]="%9B";g["\u0153"]="%9C";g["\u009D"]="%9D";g["\u017E"]="%9E";g["\u0178"]="%9F";c=encodeURIComponent(c);c=f("%20"," ",c);for(search in g){replace=g[search];c=f(search,replace,c)}return c.replace(/(\%([a-z0-9]{2}))/g,function(n,m,l){return"%"+l.toUpperCase()});return c}function reset(c){if(!this.php_js){this.php_js={}}if(!this.php_js.pointers){this.php_js.pointers=[]}var f=this.php_js.pointers;if(f.indexOf(c)===-1){f.push(c,0)}var g=f.indexOf(c);if(!(c instanceof Array)){for(var d in c){if(f.indexOf(c)===-1){f.push(c,0)}else{f[g+1]=0}return c[d]}return false}if(c.length===0){return false}f[g+1]=0;return c[f[g+1]]}function round(d,c){return parseFloat(parseFloat(d).toFixed(c))}function rsort(m,c){var l=[],f=[];var d="",g=0,n=false;for(d in m){l.push(m[d]);delete m[d]}switch(c){case"SORT_STRING":n=function(o,k){return strnatcmp(k,o)};break;case"SORT_LOCALE_STRING":n=function(o,k){return(k.localeCompare(o))};break;case"SORT_NUMERIC":n=function(o,k){return(k-o)};break;case"SORT_REGULAR":default:n=function(o,k){if(o<k){return 1}if(o>k){return -1}return 0};break}l.sort(n);for(g=0;g<l.length;g++){m[g]=l[g]}return true}function rtrim(f,d){d=!d?" s\xA0":(d+"").replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"$1");var c=new RegExp("["+d+"]+$","g");return(f+"").replace(c,"")}function serialize(f){var n=function(v){var u=typeof v,q;var t;if(u=="object"&&!v){return"null"}if(u=="object"){if(!v.constructor){return"object"}var p=v.constructor.toString();if(q=p.match(/(\w+)\(/)){p=q[1].toLowerCase()}var r=["boolean","number","string","array"];for(t in r){if(p==r[t]){u=r[t];break}}}return u};var k=n(f);var c,d="";switch(k){case"function":c="";break;case"undefined":c="N";break;case"boolean":c="b:"+(f?"1":"0");break;case"number":c=(Math.round(f)==f?"i":"d")+":"+f;break;case"string":c="s:"+f.length+':"'+f+'"';break;case"array":case"object":c="a";var g=0;var l="";var o;var m;for(m in f){d=n(f[m]);if(d=="function"){continue}o=(m.match(/^[0-9]+$/)?parseInt(m):m);l+=serialize(o)+serialize(f[m]);g++}c+=":"+g+":{"+l+"}";break}if(k!="object"&&k!="array"){c+=";"}return c}function setcookie(d,g,c,l,f,k){return setrawcookie(d,encodeURIComponent(g),c,l,f,k)}function setrawcookie(f,m,g,n,k,c){if(g instanceof Date){g=g.toGMTString()}else{if(typeof(g)=="number"){g=(new Date(+(new Date)+g*1000)).toGMTString()}}var d=[f+"="+m],o,l;for(l in o={expires:g,path:n,domain:k}){o[l]&&d.push(l+"="+o[l])}return c&&d.push("secure"),document.cookie=d.join(";"),true}function settype(o,l){var d=function(p){return typeof p==="object"&&typeof p.length==="number"&&!(p.propertyIsEnumerable("length"))&&typeof p.splice==="function"};var n,m,g,f;n=this[o]?this[o]:o;try{switch(l){case"boolean":if(d(n)&&n.length===0){this[o]=false}else{if(n==="0"){this[o]=false}else{if(typeof n==="object"&&!d(n)){var c=false;for(g in n){c=true}this[o]=c}else{this[o]=!!n}}}break;case"integer":if(typeof n==="number"){this[o]=parseInt(n,10)}else{if(typeof n==="string"){m=n.match(/^([+-]?)(\d+)/);if(!m){this[o]=0}else{this[o]=parseInt(n,10)}}else{if(n===true){this[o]=1}else{if(n===false||n===null){this[o]=0}else{if(d(n)&&n.length===0){this[o]=0}else{if(typeof n==="object"){this[o]=1}}}}}}break;case"float":if(typeof n==="string"){m=n.match(/^([+-]?)(\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)?/);if(!m){this[o]=0}else{this[o]=parseFloat(n,10)}}else{if(n===true){this[o]=1}else{if(n===false||n===null){this[o]=0}else{if(d(n)&&n.length===0){this[o]=0}else{if(typeof n==="object"){this[o]=1}}}}}break;case"string":if(n===null||n===false){this[o]=""}else{if(d(n)){this[o]="Array"}else{if(typeof n==="object"){this[o]="Object"}else{if(n===true){this[o]="1"}else{this[o]+=""}}}}break;case"array":if(n===null){this[o]=[]}else{if(typeof n!=="object"){this[o]=[n]}}break;case"object":if(n===null){this[o]={}}else{if(d(n)){for(g=0,f={};g<n.length;g++){f[g]=n}this[o]=f}else{if(typeof n!=="object"){this[o]={scalar:n}}}}break;case"null":delete this[o];break}return true}catch(k){return false}}function sha1(y){var f=function(C,B){var A=(C<<B)|(C>>>(32-B));return A};var v=function(D){var C="";var A;var E;var B;for(A=0;A<=6;A+=2){E=(D>>>(A*4+4))&15;B=(D>>>(A*4))&15;C+=E.toString(16)+B.toString(16)}return C};var z=function(D){var C="";var B;var A;for(B=7;B>=0;B--){A=(D>>>(B*4))&15;C+=A.toString(16)}return C};var l;var G,F;var d=new Array(80);var p=1732584193;var n=4023233417;var m=2562383102;var k=271733878;var g=3285377520;var x,u,t,r,q;var H;y=utf8_encode(y);var c=y.length;var o=[];for(G=0;G<c-3;G+=4){F=y.charCodeAt(G)<<24|y.charCodeAt(G+1)<<16|y.charCodeAt(G+2)<<8|y.charCodeAt(G+3);o.push(F)}switch(c%4){case 0:G=2147483648;break;case 1:G=y.charCodeAt(c-1)<<24|8388608;break;case 2:G=y.charCodeAt(c-2)<<24|y.charCodeAt(c-1)<<16|32768;break;case 3:G=y.charCodeAt(c-3)<<24|y.charCodeAt(c-2)<<16|y.charCodeAt(c-1)<<8|128;break}o.push(G);while((o.length%16)!=14){o.push(0)}o.push(c>>>29);o.push((c<<3)&4294967295);for(l=0;l<o.length;l+=16){for(G=0;G<16;G++){d[G]=o[l+G]}for(G=16;G<=79;G++){d[G]=f(d[G-3]^d[G-8]^d[G-14]^d[G-16],1)}x=p;u=n;t=m;r=k;q=g;for(G=0;G<=19;G++){H=(f(x,5)+((u&t)|(~u&r))+q+d[G]+1518500249)&4294967295;q=r;r=t;t=f(u,30);u=x;x=H}for(G=20;G<=39;G++){H=(f(x,5)+(u^t^r)+q+d[G]+1859775393)&4294967295;q=r;r=t;t=f(u,30);u=x;x=H}for(G=40;G<=59;G++){H=(f(x,5)+((u&t)|(u&r)|(t&r))+q+d[G]+2400959708)&4294967295;q=r;r=t;t=f(u,30);u=x;x=H}for(G=60;G<=79;G++){H=(f(x,5)+(u^t^r)+q+d[G]+3395469782)&4294967295;q=r;r=t;t=f(u,30);u=x;x=H}p=(p+x)&4294967295;n=(n+u)&4294967295;m=(m+t)&4294967295;k=(k+r)&4294967295;g=(g+q)&4294967295}H=z(p)+z(n)+z(m)+z(k)+z(g);return H.toLowerCase()}function shuffle(g){var f=[];var c="",d=0;for(c in g){f.push(g[c]);delete g[c]}f.sort(function(){return 0.5-Math.random()});for(d=0;d<f.length;d++){g[d]=f[d]}return true}function sin(c){return Math.sin(c)}function sinh(c){return(Math.exp(c)-Math.exp(-c))/2}function sizeof(c,d){return count(c,d)}function sort(m,c){var l=[],f=[];var d="",g=0,n=false;for(d in m){l.push(m[d]);delete m[d]}switch(c){case"SORT_STRING":n=function(o,k){return strnatcmp(o,k)};break;case"SORT_LOCALE_STRING":n=function(o,k){return(o.localeCompare(k))};break;case"SORT_NUMERIC":n=function(o,k){return(o-k)};break;case"SORT_REGULAR":default:n=function(o,k){if(o>k){return 1}if(o<k){return -1}return 0};break}l.sort(n);for(g=0;g<l.length;g++){m[g]=l[g]}return true}function soundex(q){var t="";var o,n,k,d=isNaN(d)?4:d>10?10:d<4?4:d;var f={BFPV:1,CGJKQSXZ:2,DT:3,L:4,MN:5,R:6};var c=(t=(q+"").toUpperCase().replace(/[^A-Z]/g,"").split("")).splice(0,1);var g=0;g=t.length;for(o=-1,k=g;++o<k;){for(n in f){if(n.indexOf(t[o])+1&&c[c.length-1]!=f[n]&&c.push(f[n])){break}}}return c.length>d&&(c.length=d),c.join("")+(new Array(d-c.length+1)).join("0")}function split(c,d){return explode(c,d)}function sprintf(){var l=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;var m=arguments,k=0,o=m[k++];var c=function(u,p,q,t){if(!q){q=" "}var r=(u.length>=p)?"":Array(1+p-u.length>>>0).join(q);return t?u+r:r+u};var d=function(t,r,x,p,q,v){var u=p-t.length;if(u>0){if(x||!q){t=c(t,p,v,x)}else{t=t.slice(0,r.length)+c("",u,"0",true)+t.slice(r.length)}}return t};var n=function(x,v,u,y,q,p,t){var r=x>>>0;u=u&&r&&{"2":"0b","8":"0","16":"0x"}[v]||"";x=u+c(r.toString(v),p||0,"0",false);return d(x,u,y,q,t)};var g=function(t,v,q,p,r,u){if(p!=null){t=t.slice(0,p)}return d(t,"",v,q,r,u)};var f=function(H,t,u,z,J,E,r){var p;var D;var q;var I;var B;if(H=="%%"){return"%"}var A=false,v="",y=false,G=false,F=" ";var x=u.length;for(var C=0;u&&C<x;C++){switch(u.charAt(C)){case" ":v=" ";break;case"+":v="+";break;case"-":A=true;break;case"'":F=u.charAt(C+1);break;case"0":y=true;break;case"#":G=true;break}}if(!z){z=0}else{if(z=="*"){z=+m[k++]}else{if(z.charAt(0)=="*"){z=+m[z.slice(1,-1)]}else{z=+z}}}if(z<0){z=-z;A=true}if(!isFinite(z)){throw new Error("sprintf: (minimum-)width must be finite")}if(!E){E="fFeE".indexOf(r)>-1?6:(r=="d")?0:void (0)}else{if(E=="*"){E=+m[k++]}else{if(E.charAt(0)=="*"){E=+m[E.slice(1,-1)]}else{E=+E}}}B=t?m[t.slice(0,-1)]:m[k++];switch(r){case"s":return g(String(B),A,z,E,y,F);case"c":return g(String.fromCharCode(+B),A,z,E,y);case"b":return n(B,2,G,A,z,E,y);case"o":return n(B,8,G,A,z,E,y);case"x":return n(B,16,G,A,z,E,y);case"X":return n(B,16,G,A,z,E,y).toUpperCase();case"u":return n(B,10,G,A,z,E,y);case"i":case"d":p=parseInt(+B);D=p<0?"-":v;B=D+c(String(Math.abs(p)),E,"0",false);return d(B,D,A,z,y);case"e":case"E":case"f":case"F":case"g":case"G":p=+B;D=p<0?"-":v;q=["toExponential","toFixed","toPrecision"]["efg".indexOf(r.toLowerCase())];I=["toString","toUpperCase"]["eEfFgG".indexOf(r)%2];B=D+Math.abs(p)[q](E);return d(B,D,A,z,y)[I]();default:return H}};return o.replace(l,f)}function sqrt(c){return Math.sqrt(c)}function str_ireplace(m,l,g){var f,c="";var d=0;var n;m+="";d=m.length;if(!(l instanceof Array)){l=new Array(l);if(m instanceof Array){while(d>l.length){l[l.length]=l[0]}}}if(!(m instanceof Array)){m=new Array(m)}while(m.length>l.length){l[l.length]=""}if(g instanceof Array){for(c in g){g[c]=str_ireplace(m,l,g[c])}return g}d=m.length;for(f=0;f<d;f++){n=new RegExp(m[f],"gi");g=g.replace(n,l[f])}return g}function str_pad(f,m,l,g){var k="",c;var d=function(p,n){var q="",o;while(q.length<n){q+=p}q=q.substr(0,n);return q};f+="";if(g!="STR_PAD_LEFT"&&g!="STR_PAD_RIGHT"&&g!="STR_PAD_BOTH"){g="STR_PAD_RIGHT"}if((c=m-f.length)>0){if(g=="STR_PAD_LEFT"){f=d(l,c)+f}else{if(g=="STR_PAD_RIGHT"){f=f+d(l,c)}else{if(g=="STR_PAD_BOTH"){k=d(l,Math.ceil(c/2));f=k+f+k;f=f.substr(0,m)}}}}return f}function str_repeat(c,d){return new Array(d+1).join(c)}function str_replace(q,g,n){var p=n;var d=c instanceof Array,o=p instanceof Array;var m=[].concat(q);var c=[].concat(g);var l=(p=[].concat(p)).length;var k=0;while(k=0,l--){if(p[l]){while(p[l]=(p[l]+"").split(m[k]).join(d?c[k]||"":c[0]),++k in m){}}}return o?p:p[0]}function str_rot13(c){return(c+"").replace(/[A-Za-z]/g,function(d){return String.fromCharCode((((d=d.charCodeAt(0))&223)-52)%26+(d&32)+65)})}function str_shuffle(g){if(g==undefined){throw"Wrong parameter count for str_shuffle()"}var d=function(k){return Math.floor(Math.random()*(k+1))};var c="",f=0;while(g.length){f=d(g.length-1);c+=g[f];g=g.substring(0,f)+g.substr(f+1)}return c}function str_split(f,d){f+="";if(d==undefined){d=1}if(d>0){var c=[];while(f.length>d){c[c.length]=f.substring(0,d);f=f.substring(d)}c[c.length]=f;return c}return false}function strcasecmp(f,d){var c=(f+"").toLowerCase();var g=(d+"").toLowerCase();if(c>g){return 1}else{if(c==g){return 0}}return -1}function strchr(d,f,c){return strstr(d,f,c)}function strcmp(d,c){return((d==c)?0:((d>c)?1:-1))}function strcspn(m,c,n,k){n=n?n:0;var g=(k&&((n+k)<m.length))?n+k:m.length;strct:for(var f=n,l=0;f<g;f++){for(var d=0;d<c.length;d++){if(m[f].indexOf(c[d])!==-1){continue strct}}++l}return l}function strip_tags(n,o){var r="",p=false;var m=[];var c=[];var q="";var g=0;var f="";var l="";var d=function(t,k,u){return u.split(t).join(k)};if(o){c=o.match(/([a-zA-Z]+)/gi)}n+="";m=n.match(/(<\/?[\S][^>]*>)/gi);for(r in m){if(isNaN(r)){continue}l=m[r].toString();p=false;for(f in c){q=c[f];g=-1;if(g!=0){g=l.toLowerCase().indexOf("<"+q+">")}if(g!=0){g=l.toLowerCase().indexOf("<"+q+" ")}if(g!=0){g=l.toLowerCase().indexOf("</"+q)}if(g==0){p=true;break}}if(!p){n=d(l,"",n)}}return n}function stripos(c,g,l){var f=(c+"").toLowerCase();var k=(g+"").toLowerCase();var d=0;if((d=f.indexOf(k,l))!==-1){return d}return false}function stripslashes(c){return(c+"").replace(/\0/g,"0").replace(/\\([\\'"])/g,"$1")}function stristr(d,f,c){var g=0;d+="";g=d.toLowerCase().indexOf((f+"").toLowerCase());if(g==-1){return false}else{if(c){return d.substr(0,g)}else{return d.slice(g)}}}function strlen(c){var l=c+"";var d=0,f="",g=0;var k=function(q,m){var p=q.charCodeAt(m);var n="",o="";if(55296<=p&&p<=56319){if(q.length<=(m+1)){throw"High surrogate without following low surrogate"}n=q.charCodeAt(m+1);if(56320>n||n>57343){throw"High surrogate without following low surrogate"}return q[m]+q[m+1]}else{if(56320<=p&&p<=57343){if(m===0){throw"Low surrogate without preceding high surrogate"}o=q.charCodeAt(m-1);if(55296>o||o>56319){throw"Low surrogate without preceding high surrogate"}return false}}return q[m]};for(d=0,g=0;d<l.length;d++){if((f=k(l,d))===false){continue}g++}return g}function strnatcasecmp(o,n){a=(o+"").toLowerCase();b=(n+"").toLowerCase();var m=function(t){return t.charCodeAt(0)<=32};var p=function(u){var t=u.charCodeAt(0);return(t>=48&&t<=57)};var r=function(y,u){var A=0;var z=0;var x=0;var v;var t;for(;;z++,x++){v=y.charAt(z);t=u.charAt(x);if(!p(v)&&!p(t)){return A}else{if(!p(v)){return -1}else{if(!p(t)){return +1}else{if(v<t){if(A==0){A=-1}}else{if(v>t){if(A==0){A=+1}}else{if(v==0&&t==0){return A}}}}}}}};var g=0,d=0;var f=0,c=0;var l,k;var q;while(true){f=c=0;l=a.charAt(g);k=b.charAt(d);while(m(l)||l=="0"){if(l=="0"){f++}else{f=0}l=a.charAt(++g)}while(m(k)||k=="0"){if(k=="0"){c++}else{c=0}k=b.charAt(++d)}if(p(l)&&p(k)){if((q=r(a.substring(g),b.substring(d)))!=0){return q}}if(l==0&&k==0){return f-c}if(l<k){return -1}else{if(l>k){return +1}}++g;++d}}function strnatcmp(l,k,f){if(f==undefined){f=false}var g=function(u){var r=[];var t="";var x="";var v=0,q=0;var y=true;q=u.length;for(v=0;v<q;v++){x=u.substring(v,v+1);if(x.match(/[0-9]/)){if(y){if(t.length>0){r[r.length]=t;t=""}y=false}t+=x}else{if((y==false)&&(x==".")&&(v<(u.length-1))&&(u.substring(v+1,v+2).match(/[0-9]/))){r[r.length]=t;t=""}else{if(y==false){if(t.length>0){r[r.length]=parseInt(t);t=""}y=true}t+=x}}}if(t.length>0){if(y){r[r.length]=t}else{r[r.length]=parseInt(t)}}return r};var p=g(l+"");var n=g(k+"");var d=p.length;var m=true;var o=-1;var c=0;if(d>n.length){d=n.length;o=1}for(i=0;i<d;i++){if(isNaN(p[i])){if(isNaN(n[i])){m=true;if((c=strcmp(p[i],n[i]))!=0){return c}}else{if(m){return 1}else{return -1}}}else{if(isNaN(n[i])){if(m){return -1}else{return 1}}else{if(m||f){if((c=(p[i]-n[i]))!=0){return c}}else{if((c=strcmp(p[i].toString(),n[i].toString()))!=0){return c}}m=false}}}return o}function strncasecmp(f,d,c){var m,g=0;var l=(f+"").toLowerCase().substr(0,c);var k=(d+"").toLowerCase().substr(0,c);if(l.length!==k.length){if(l.length<k.length){c=l.length;if(k.substr(0,l.length)==l){return l.length-k.length}}else{c=k.length;if(l.substr(0,k.length)==k){return l.length-k.length}}}else{c=l.length}for(m=0,g=0;g<c;g++){m=l.charCodeAt(g)-k.charCodeAt(g);if(m!==0){return m}}return 0}function strncmp(k,f,g){var d=(k+"").substr(0,g);var c=(f+"").substr(0,g);return((d==c)?0:((d>c)?1:-1))}function strpbrk(m,l){m+="";l+="";var n=m.length;var d=l.length;var g=false;var c="";var k=0,f=0;if(n>=d){if(n==d){if(m==l){g=m}}else{f=0;k=0;while(k<d&&f<n&&!g){if(l[k]==m[f]){k++;if(k==d){g=true}}f++}if(g){for(k=(f-d);k<n;k++){c+=m[k]}}if(c!=""){g=c}}}return g}function strpos(d,f,g){var c=(d+"").indexOf(f,g);return c===-1?false:c}function strrchr(c,d){var f=0;if(typeof d!=="string"){d=String.fromCharCode(parseInt(d,10))}d=d[0];f=c.lastIndexOf(d);if(f===-1){return false}return c.substr(f)}function strrev(d){var c="",f=0;d+="";for(f=d.length-1;f>=0;f--){c+=d.charAt(f)}return c}function strripos(d,f,g){var c=(d+"").toLowerCase().lastIndexOf((f+"").toLowerCase(),g);return c>=0?c:false}function strrpos(d,f,g){var c=(d+"").lastIndexOf(f,g);return c>=0?c:false}function strspn(l,f,c,d){var n;var o;var m;var g=0;var k=0;c=c?(c<0?(l.length+c):c):0;d=d?((d<0)?(l.length+d-c):d):l.length-c;l=l.substr(c,d);for(k=0;k<l.length;k++){n=0;o=l.substring(k,k+1);for(g=0;g<=f.length;g++){m=f.substring(g,g+1);if(o==m){n=1;break}}if(n!=1){return k}}return k}function strstr(d,f,c){var g=0;d+="";g=d.indexOf(f);if(g==-1){return false}else{if(c){return d.substr(0,g)}else{return d.slice(g)}}}function strtok(f,d){if(d===undefined){d=f;f=strtok.leftOver}if(f.length===0){return false}if(d.indexOf(f[0])!==-1){return strtok(f.substr(1),d)}for(var c=0;c<f.length;c++){if(d.indexOf(f[c])!==-1){break}}strtok.leftOver=f.substr(c+1);return f.substring(0,c)}function strtolower(c){return(c+"").toLowerCase()}function strtotime(m,d){var k,l,p,o="",g="";o=m;o=o.replace(/\s{2,}|^\s|\s$/g," ");o=o.replace(/[\t\r\n]/g,"");if(o=="now"){return(new Date()).getTime()}else{if(!isNaN(g=Date.parse(o))){return g/1000}else{if(d){d=new Date(d)}else{d=new Date()}}}o=o.toLowerCase();var c=function(q){var u=(q[2]&&q[2]=="ago");var t=(t=q[0]=="last"?-1:1)*(u?-1:1);switch(q[0]){case"last":case"next":switch(q[1].substring(0,3)){case"yea":d.setFullYear(d.getFullYear()+t);break;case"mon":d.setMonth(d.getMonth()+t);break;case"wee":d.setDate(d.getDate()+(t*7));break;case"day":d.setDate(d.getDate()+t);break;case"hou":d.setHours(d.getHours()+t);break;case"min":d.setMinutes(d.getMinutes()+t);break;case"sec":d.setSeconds(d.getSeconds()+t);break;default:var r;if(typeof(r=__is_day[q[1].substring(0,3)])!="undefined"){var v=r-d.getDay();if(v==0){v=7*t}else{if(v>0){if(q[0]=="last"){v-=7}}else{if(q[0]=="next"){v+=7}}}d.setDate(d.getDate()+v)}}break;default:if(/\d+/.test(q[0])){t*=parseInt(q[0]);switch(q[1].substring(0,3)){case"yea":d.setFullYear(d.getFullYear()+t);break;case"mon":d.setMonth(d.getMonth()+t);break;case"wee":d.setDate(d.getDate()+(t*7));break;case"day":d.setDate(d.getDate()+t);break;case"hou":d.setHours(d.getHours()+t);break;case"min":d.setMinutes(d.getMinutes()+t);break;case"sec":d.setSeconds(d.getSeconds()+t);break}}else{return false}break}return true};var f={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:{jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11}};l=o.match(/^(\d{2,4}-\d{2}-\d{2})(\s\d{1,2}:\d{1,2}(:\d{1,2})?)?$/);if(l!=null){if(!l[2]){l[2]="00:00:00"}else{if(!l[3]){l[2]+=":00"}}p=l[1].split(/-/g);for(k in f.mon){if(f.mon[k]==p[1]-1){p[1]=k}}return strtotime(p[2]+" "+p[1]+" "+p[0]+" "+l[2])}var n="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun.?|sunday|mon.?|monday|tue.?|tuesday|wed.?|wednesday|thu.?|thursday|fri.?|friday|sat.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun.?|sunday|mon.?|monday|tue.?|tuesday|wed.?|wednesday|thu.?|thursday|fri.?|friday|sat.?|saturday))(\\sago)?";l=o.match(new RegExp(n,"g"));if(l==null){return false}for(k in l){if(!c(l[k].split(" "))){return false}}return(d)}function strtoupper(c){return(c+"").toUpperCase()}function strtr(g,l,k){var c="",d=0,f=0;if(typeof l==="object"){for(c in l){g=g.replace(c,l[c])}return g}f=k.length;if(l.length<k.length){f=l.length}for(d=0;d<f;d++){g=g.replace(l[d],k[d],"g")}return g}function substr(c,f,d){c+="";if(f<0){f+=c.length}if(d==undefined){d=c.length}else{if(d<0){d+=c.length}else{d+=f}}if(d<f){d=f}return c.substring(f,d)}function substr_count(f,g,k,d){var l=0,c=0;f+="";g+="";if(isNaN(k)){k=0}if(isNaN(d)){d=0}k--;while((k=f.indexOf(g,k+1))!=-1){if(d>0&&(k+g.length)>d){return false}else{c++}}return c}function tan(c){return Math.tan(c)}function tanh(c){return(Math.exp(c)-Math.exp(-c))/(Math.exp(c)+Math.exp(-c))}function time(){return Math.round(new Date().getTime()/1000)}function trim(k,g){var d,c=0,f=0;k+="";if(!g){d=" \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000"}else{g+="";d=g.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"$1")}c=k.length;for(f=0;f<c;f++){if(d.indexOf(k.charAt(f))===-1){k=k.substring(f);break}}c=k.length;for(f=c-1;f>=0;f--){if(d.indexOf(k.charAt(f))===-1){k=k.substring(0,f+1);break}}return d.indexOf(k.charAt(0))===-1?k:""}function uasort(g,q){if(typeof q==="string"){q=this[q]}else{if(q instanceof Array){q=this[q[0]][q[1]]}}var d=[],r=[],n,c,p;var l="",m=0;var f=function(k,v){for(var u=v.length-2;u>=0;u--){for(var t=0;t<=u;t++){p=q(v[t+1],v[t]);if(p<0){c=v[t];v[t]=v[t+1];v[t+1]=c;n=k[t];k[t]=k[t+1];k[t+1]=n}}}};for(l in g){d.push(g[l]);r.push(l);delete g[l]}try{f(r,d)}catch(o){return false}for(m=0;m<d.length;m++){g[r[m]]=d[m]}return true}function ucfirst(d){d+="";var c=d.charAt(0).toUpperCase();return c+d.substr(1)}function ucwords(c){return(c+"").replace(/^(.)|\s(.)/g,function(d){return d.toUpperCase()})}function uksort(m,l){if(typeof l==="string"){l=window[l]}var c={},g=[],f=0,d="";for(d in m){g.push(d)}try{if(l){g.sort(l)}else{g.sort()}}catch(k){return false}for(f=0;f<g.length;f++){d=g[f];c[d]=m[d];delete m[d]}for(f in c){m[f]=c[f]}return true}function unserialize(g){var c=function(n,o,m,l){throw new window[n](o,m,l)};var k=function(o,q,p){var l=[];var n=o.slice(q,q+1);var m=2;while(n!=p){if((m+q)>o.length){c("Error","Invalid")}l.push(n);n=o.slice(q+(m-1),q+m);m+=1}return[l.length,l.join("")]};var f=function(p,q,o){var l;l=[];for(var m=0;m<o;m++){var n=p.slice(q+(m-1),q+m);l.push(n)}return[l.length,l.join("")]};var d=function(E,o){var D;var m;var u=0;var p;var l;var A;var t;if(!o){o=0}var C=(E.slice(o,o+1)).toLowerCase();var r=o+2;var B=new Function("x","return x");switch(C){case"i":B=new Function("x","return parseInt(x)");m=k(E,r,";");u=m[0];D=m[1];r+=u+1;break;case"b":B=new Function("x","return (parseInt(x) == 1)");m=k(E,r,";");u=m[0];D=m[1];r+=u+1;break;case"d":B=new Function("x","return parseFloat(x)");m=k(E,r,";");u=m[0];D=m[1];r+=u+1;break;case"n":D=null;break;case"s":p=k(E,r,":");u=p[0];l=p[1];r+=u+2;m=f(E,r+1,parseInt(l));u=m[0];D=m[1];r+=u+2;if(u!=parseInt(l)&&u!=D.length){c("SyntaxError","String length mismatch")}break;case"a":D={};A=k(E,r,":");u=A[0];t=A[1];r+=u+2;for(var z=0;z<parseInt(t);z++){var n=d(E,r);var v=n[1];var F=n[2];r+=v;var y=d(E,r);var q=y[1];var x=y[2];r+=q;D[F]=x}r+=1;break;default:c("SyntaxError","Unknown / Unhandled data type(s): "+C);break}return[C,r-o,B(D)]};return d(g,0)[2]}function urldecode(g){var f={};var c=g.toString();var d=function(m,l,n){var k=[];k=n.split(m);return k.join(l)};f["'"]="%27";f["("]="%28";f[")"]="%29";f["*"]="%2A";f["~"]="%7E";f["!"]="%21";f["%20"]="+";f["\u20AC"]="%80";f["\u0081"]="%81";f["\u201A"]="%82";f["\u0192"]="%83";f["\u201E"]="%84";f["\u2026"]="%85";f["\u2020"]="%86";f["\u2021"]="%87";f["\u02C6"]="%88";f["\u2030"]="%89";f["\u0160"]="%8A";f["\u2039"]="%8B";f["\u0152"]="%8C";f["\u008D"]="%8D";f["\u017D"]="%8E";f["\u008F"]="%8F";f["\u0090"]="%90";f["\u2018"]="%91";f["\u2019"]="%92";f["\u201C"]="%93";f["\u201D"]="%94";f["\u2022"]="%95";f["\u2013"]="%96";f["\u2014"]="%97";f["\u02DC"]="%98";f["\u2122"]="%99";f["\u0161"]="%9A";f["\u203A"]="%9B";f["\u0153"]="%9C";f["\u009D"]="%9D";f["\u017E"]="%9E";f["\u0178"]="%9F";for(replace in f){search=f[replace];c=d(search,replace,c)}c=decodeURIComponent(c);return c}function urlencode(k){var g={},d=[];var c=(k+"").toString();var f=function(n,m,o){var l=[];l=o.split(n);return l.join(m)};g["'"]="%27";g["("]="%28";g[")"]="%29";g["*"]="%2A";g["~"]="%7E";g["!"]="%21";g["%20"]="+";g["\u20AC"]="%80";g["\u0081"]="%81";g["\u201A"]="%82";g["\u0192"]="%83";g["\u201E"]="%84";g["\u2026"]="%85";g["\u2020"]="%86";g["\u2021"]="%87";g["\u02C6"]="%88";g["\u2030"]="%89";g["\u0160"]="%8A";g["\u2039"]="%8B";g["\u0152"]="%8C";g["\u008D"]="%8D";g["\u017D"]="%8E";g["\u008F"]="%8F";g["\u0090"]="%90";g["\u2018"]="%91";g["\u2019"]="%92";g["\u201C"]="%93";g["\u201D"]="%94";g["\u2022"]="%95";g["\u2013"]="%96";g["\u2014"]="%97";g["\u02DC"]="%98";g["\u2122"]="%99";g["\u0161"]="%9A";g["\u203A"]="%9B";g["\u0153"]="%9C";g["\u009D"]="%9D";g["\u017E"]="%9E";g["\u0178"]="%9F";c=encodeURIComponent(c);for(search in g){replace=g[search];c=f(search,replace,c)}return c.replace(/(\%([a-z0-9]{2}))/g,function(n,m,l){return"%"+l.toUpperCase()});return c}function usort(l,n){var g=[],d=[];var c="",f=0;if(typeof n==="string"){n=this[n]}else{if(n instanceof Array){n=this[n[0]][n[1]]}}for(c in l){g.push(l[c]);delete l[c]}try{g.sort(n)}catch(m){return false}for(f=0;f<g.length;f++){l[f]=g[f]}return true}function utf8_decode(c){var f=[],k=0,m=0,l=0,g=0,d=0;c+="";while(k<c.length){l=c.charCodeAt(k);if(l<128){f[m++]=String.fromCharCode(l);k++}else{if((l>191)&&(l<224)){g=c.charCodeAt(k+1);f[m++]=String.fromCharCode(((l&31)<<6)|(g&63));k+=2}else{g=c.charCodeAt(k+1);d=c.charCodeAt(k+2);f[m++]=String.fromCharCode(((l&15)<<12)|((g&63)<<6)|(d&63));k+=3}}}return f.join("")}function utf8_encode(g){g=(g+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var d="";var o,c;var l=0;o=c=0;l=g.length;for(var m=0;m<l;m++){var k=g.charCodeAt(m);var f=null;if(k<128){c++}else{if((k>127)&&(k<2048)){f=String.fromCharCode((k>>6)|192)+String.fromCharCode((k&63)|128)}else{f=String.fromCharCode((k>>12)|224)+String.fromCharCode(((k>>6)&63)|128)+String.fromCharCode((k&63)|128)}}if(f!=null){if(c>o){d+=g.substring(o,c)}d+=f;o=c=m+1}}if(c>o){d+=g.substring(o,g.length)}return d}function var_export(f,p){var k="";var c="";var d=0;var m=[];var n="",g=0;var o=function(v){var r,u=typeof v;if(u=="object"&&v.constructor&&v.constructor.name==="PHPJS_Resource"){return"resource"}if(u=="object"&&!v){return"null"}if(u=="object"){if(!v.constructor){return"object"}var q=v.constructor.toString();if(r=q.match(/(\w+)\(/)){q=r[1].toLowerCase()}var t=["boolean","number","string","array"];for(n in t){if(q==t[n]){u=t[n];break}}}return u};var l=o(f);if(l===null){k="NULL"}else{if(l=="array"||l=="object"){for(g in f){m[d++]=var_export(g,true)+" => "+var_export(f[g],true)}c=m.join(",\n  ");k="array (\n  "+c+"\n)"}else{if(l==="resource"){k="NULL"}else{k=(!isNaN(f))?f:"'"+f.replace("/([\"'])/g","\\$1").replace("/\0/g","\\0")+"'"}}}if(p!=true){echo(k);return null}else{return k}}function vsprintf(d,c){return sprintf.apply(this,[d].concat(c))}function wordwrap(q,v,f,u){var g=((arguments.length>=2)?arguments[1]:75);var t=((arguments.length>=3)?arguments[2]:"\n");var p=((arguments.length>=4)?arguments[3]:false);var o,n,k,x,d;q+="";if(g<1){return q}for(o=-1,k=(d=q.split("\n")).length;++o<k;d[o]+=x){for(x=d[o],d[o]="";x.length>g;d[o]+=x.slice(0,n)+((x=x.slice(n)).length?t:"")){n=p==2||(n=x.slice(0,g+1).match(/\S*(\s)?$/))[1]?g:n.input.length-n[0].length||p==1&&g||n.input.length+(n=x.slice(g).match(/^\S*/)).input.length}}return d.join("\n")}function show_grp_contact_us(){document.getElementById("grp_contact_popup").style.display="block";document.getElementById("subject_group").value="";document.getElementById("message_group").value=""}function closeContactUsMailDiv(){document.getElementById("grp_contact_popup").style.display="none"}function sendMailGroups(c,d){$("ajaxLoader_email_grp").show();$(c).request({action:d,method:"post",parameters:{actionType:"CONTACT_US"},onSuccess:handlecontactUsResponse,onException:handleContactUsError})}function handlecontactUsResponse(d){data=JSON.parse(d.responseText);if(data.STATUS=="SUCCESS"){var c=/MSIE \d+.\d+/;document.getElementById("err_email_grp").innerHTML=data.MESSAGE;if(navigator.appVersion.match(c)){setTimeout("location.reload()",100)}else{location.reload()}}else{document.getElementById("err_email_grp").innerHTML=data.MESSAGE}$("ajaxLoader_email_grp").hide()}function handleContactUsError(c){document.getElementById("err_email_grp").innerHTML="Error processing: Please try later.";$("ajaxLoader_email_grp").hide()}function showUploaderDiv(){document.getElementById("superUploader").style.display="block";document.getElementById("uploder_content_popup").style.height=parseInt(100)+"px";document.getElementById("uploder_menu").style.height=parseInt(110)+"px";parent.document.getElementById("uploder_div").style.height=parseInt(100)+"px";document.getElementById("uploaderdivErr").innerHTML="";showUploader("single_file_upload.php","lnk_singlefile_upload")}function closeUploaderDiv(){document.getElementById("uploaderdivErr").innerHTML="";document.getElementById("uploder_div").src="";document.getElementById("superUploader").style.display="none"}function showUploader(d,c){if(c=="lnk_singlefile_upload"){document.getElementById("lnk_singlefile_upload").className="uploadleft_box_active_link";document.getElementById("lnk_webcam").className="";document.getElementById("lnk_multi_upload").className="";document.getElementById("lnk_trv_upload").className="";document.getElementById("lnk_photo_transfer").className="";document.getElementById("lnk_youtube").className=""}else{if(c=="lnk_webcam"){document.getElementById("lnk_webcam").className="uploadleft_box_active_link";document.getElementById("lnk_singlefile_upload").className="";document.getElementById("lnk_multi_upload").className="";document.getElementById("lnk_trv_upload").className="";document.getElementById("lnk_photo_transfer").className="";document.getElementById("lnk_youtube").className=""}else{if(c=="lnk_multi_upload"){document.getElementById("lnk_multi_upload").className="uploadleft_box_active_link";document.getElementById("lnk_webcam").className="";document.getElementById("lnk_singlefile_upload").className="";document.getElementById("lnk_trv_upload").className="";document.getElementById("lnk_photo_transfer").className="";document.getElementById("lnk_youtube").className=""}else{if(c=="lnk_trv_upload"){document.getElementById("lnk_trv_upload").className="uploadleft_box_active_link";document.getElementById("lnk_webcam").className="";document.getElementById("lnk_multi_upload").className="";document.getElementById("lnk_singlefile_upload").className="";document.getElementById("lnk_photo_transfer").className="";document.getElementById("lnk_youtube").className=""}else{if(c=="lnk_photo_transfer"){document.getElementById("lnk_photo_transfer").className="uploadleft_box_active_link";document.getElementById("lnk_webcam").className="";document.getElementById("lnk_multi_upload").className="";document.getElementById("lnk_trv_upload").className="";document.getElementById("lnk_singlefile_upload").className="";document.getElementById("lnk_youtube").className=""}else{if(c=="lnk_youtube"){document.getElementById("lnk_youtube").className="uploadleft_box_active_link";document.getElementById("lnk_webcam").className="";document.getElementById("lnk_multi_upload").className="";document.getElementById("lnk_trv_upload").className="";document.getElementById("lnk_singlefile_upload").className="";document.getElementById("lnk_photo_transfer").className=""}}}}}}document.getElementById("uploder_div").src=d}function show_users_multibox(){document.getElementById("allUsersName").innerHTML="";document.getElementById("users_multiId").style.display="block";document.getElementById("user_list").style.display="none";document.getElementById("downImg").style.display="none";document.getElementById("upImg").style.display="block"}function hide_users_multibox(){document.getElementById("allUsersName").innerHTML="";document.getElementById("users_multiId").style.display="none";document.getElementById("user_list").style.display="none";document.getElementById("downImg").style.display="block";document.getElementById("upImg").style.display="none"}function show_users_name(){document.getElementById("allUsersName").style.display="block";document.getElementById("user_list").style.display="none";document.getElementById("users_multiId").style.display="none";document.getElementById("downImg").style.display="block";document.getElementById("upImg").style.display="none";var d=0;for(var c=0;c<document.getElementById("fm-buddyname").options.length;c++){if(document.getElementById("fm-buddyname").options[c].selected==true){if(d<=2){if(document.getElementById("allUsersName").innerHTML==null||document.getElementById("allUsersName").innerHTML==""){document.getElementById("allUsersName").innerHTML=document.getElementById("fm-buddyname").options[c].value}else{document.getElementById("allUsersName").innerHTML=document.getElementById("allUsersName").innerHTML+", "+document.getElementById("fm-buddyname").options[c].value}}d=d+1}}if(d>2){document.getElementById("allUsersName").innerHTML=document.getElementById("allUsersName").innerHTML+" ..."}}function msg_detail(k,n,g,f,o,m,l){close_channel_list();close_national_event();closeBroadcastBox();closeNotifyAlerts();close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();document.getElementById("homePageControlPopup").style.display="none";document.getElementById("inbox").style.display="block";document.getElementById("msgdivErr").innerHTML="";$("ajxLoader").show();$(k).request({action:n,method:"post",parameters:{actionType:"INBOX_DETAIL",msg:g,MsgAction:o,sid:f,mid:m,page:l},onSuccess:handleReplyActionResponse,onException:handleActionError})}function handleActionError(c){document.getElementById("msgdivErr").innerHTML="Error processing: Please try later.";$("ajxLoader").hide()}function handleReplyActionResponse(g){data=g.responseText;if(data=="PAGE_RELOAD"){location.reload()}else{document.getElementById("msg_div").innerHTML=g.responseText;var d=document.getElementById("popup_type").value;var f=document.getElementById("total_count").value;if(d=="inbox"){document.getElementById("INBOX_HEADERctnr").innerHTML='<div id="WELCOME">Inbox</div>';if(f!=0){document.getElementById("INBOX_HEADERctnr").innerHTML+="<div id=\"HEADER_right\"><div class=\"inbox_account_Status\"><a href=\"javascript:msg_detail(document.getElementById('msg_detail_form'), 'inbox_operation.php','INBOX',0,'delete',0);\">Delete Checked</a></div></div>"}else{document.getElementById("INBOX_HEADERctnr").innerHTML+='<div id="HEADER_right"></div>'}document.getElementById("unread_msg_count").innerHTML=document.getElementById("total_unread_count").value;document.getElementById("lnk_inbox").className="left_box_active_link";document.getElementById("lnk_outbox").className="";document.getElementById("lnk_trash").className="";document.getElementById("lnk_compose").className="";document.getElementById("lnk_recvreq").className="";document.getElementById("lnk_sentreq").className=""}else{if(d=="outbox"){document.getElementById("INBOX_HEADERctnr").innerHTML='<div id="WELCOME">Outbox</div>';if(f!=0){document.getElementById("INBOX_HEADERctnr").innerHTML+="<div id=\"HEADER_right\"><div class=\"inbox_account_Status\"><a href=\"javascript:msg_detail(document.getElementById('msg_detail_form'), 'inbox_operation.php','OUTBOX',0,'delete',0);\">Delete Checked</a></div></div>"}else{document.getElementById("INBOX_HEADERctnr").innerHTML+='<div id="HEADER_right"></div>'}document.getElementById("lnk_inbox").className="";document.getElementById("lnk_outbox").className="left_box_active_link";document.getElementById("lnk_trash").className="";document.getElementById("lnk_compose").className="";document.getElementById("lnk_recvreq").className="";document.getElementById("lnk_sentreq").className=""}else{if(d=="trash"){document.getElementById("INBOX_HEADERctnr").innerHTML='<div id="WELCOME">Trash</div><div id="HEADER_right"></div>';document.getElementById("lnk_inbox").className="";document.getElementById("lnk_outbox").className="";document.getElementById("lnk_trash").className="left_box_active_link";document.getElementById("lnk_compose").className="";document.getElementById("lnk_recvreq").className="";document.getElementById("lnk_sentreq").className=""}else{if(d=="compose"){document.getElementById("INBOX_HEADERctnr").innerHTML="<div id=\"WELCOME\">Compose</div><div id=\"HEADER_right\"><div class=\"inbox_account_Status\"><a href=\"javascript:msg_detail(document.getElementById('msg_detail_form'), 'inbox_operation.php','COMPOSE_CHANNEL_ADMIN',0,'add_msg',0,1);\">Send Email To Channel Admin</a></div></div>";document.getElementById("lnk_inbox").className="";document.getElementById("lnk_outbox").className="";document.getElementById("lnk_trash").className="";document.getElementById("lnk_compose").className="left_box_active_link";document.getElementById("lnk_recvreq").className="";document.getElementById("lnk_sentreq").className=""}else{if(d=="frnd_req_recv"){document.getElementById("INBOX_HEADERctnr").innerHTML='<div id="WELCOME">Received Friend Requests</div><div id="HEADER_right"></div>';document.getElementById("lnk_inbox").className="";document.getElementById("lnk_outbox").className="";document.getElementById("lnk_trash").className="";document.getElementById("lnk_compose").className="";document.getElementById("lnk_recvreq").className="left_box_active_link";document.getElementById("lnk_sentreq").className=""}else{if(d=="frnd_req_sent"){document.getElementById("INBOX_HEADERctnr").innerHTML='<div id="WELCOME">Sent Friend Requests</div><div id="HEADER_right"></div>';document.getElementById("lnk_inbox").className="";document.getElementById("lnk_outbox").className="";document.getElementById("lnk_trash").className="";document.getElementById("lnk_compose").className="";document.getElementById("lnk_recvreq").className="";document.getElementById("lnk_sentreq").className="left_box_active_link"}else{if(d=="read_msg"){document.getElementById("INBOX_HEADERctnr").innerHTML='<div id="WELCOME">Read Message</div><div id="HEADER_right"></div>';document.getElementById("unread_msg_count").innerHTML=document.getElementById("total_unread_count").value}}}}}}}var c=document.getElementById("msg_content_popup").offsetHeight;document.getElementById("top_box").style.height=parseInt(50+c)+"px";document.getElementById("left_box").style.height=document.getElementById("top_box").offsetHeight-10+"px";$("ajxLoader").hide()}}function getcomposeData(d){formObj=document.getElementById("msg_detail_form");postUrl="inbox_operation.php";var f=FCKeditorAPI.GetInstance("details_msg");var c=f.EditorDocument.details_msg.innerHTML;document.getElementById("compose_message").value=c;$(formObj).request({action:postUrl,method:"post",parameters:{actionType:"INBOX_DETAIL",msg:d},onSuccess:handlecomposeDataResponse,onException:handleEditBlogDataError})}function handlecomposeDataResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){putformData(data.MESSAGE)}else{document.getElementById("msgdivErr").innerHTML=data.MESSAGE}$("ajxLoader").hide()}}function handleEditBlogDataError(c){document.getElementById("msgdivErr").innerHTML="Error processing: Please try later.";$("ajxLoader").hide()}function show_block_popup(){document.getElementById("block_user").style.display="block"}function cancel_block_user(){document.getElementById("block_user").style.display="none"}function blockUser(c,d){$("ajaxLoader_block").show();$(c).request({action:d,method:"post",parameters:{actionType:"BLOCK_USER"},onSuccess:handleblockResponse,onException:handleblockError})}function handleblockResponse(d){data=JSON.parse(d.responseText);if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){var c=/MSIE \d+.\d+/;document.getElementById("divErrblock").innerHTML=data.MESSAGE;if(navigator.appVersion.match(c)){setTimeout("location.reload()",100)}else{location.reload()}}else{document.getElementById("divErrblock").innerHTML=data.MESSAGE}$("ajaxLoader_block").hide()}}function handleblockError(c){document.getElementById("divErrblock").innerHTML="Error processing: Please try later.";$("ajaxLoader_block").hide()}function show_block_popup_friend_request(c){document.getElementById("friend_reqst_block").style.display="block";document.getElementById("id_block").value=c}function blockUser_friend_request(c,d){$("ajaxLoaderBlock").show();$(c).request({action:d,method:"post",parameters:{actionType:"BLOCK_USER_FRIEND_REQUEST"},onSuccess:handleblockFriendResponse,onException:handleblockFriendError})}function handleblockFriendResponse(d){data=JSON.parse(d.responseText);if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divErrblockfrndRequest").innerHTML=data.MESSAGE;msg_detail(document.getElementById("msg_detail_form"),"inbox_operation.php","FRIEND_REQUEST",0,"read",0,1);var c=/MSIE \d+.\d+/;if(navigator.appVersion.match(c)){setTimeout("cancel_block_user_friend()",100)}else{cancel_block_user_friend()}}else{document.getElementById("divErrblockfrndRequest").innerHTML=data.MESSAGE}$("ajaxLoaderBlock").hide()}}function handleblockFriendError(c){document.getElementById("divErrblockfrndRequest").innerHTML="Error processing: Please try later.";$("ajaxLoaderBlock").hide()}function cancel_block_user_friend(){document.getElementById("friend_reqst_block").style.display="none";document.getElementById("id_block").value="";document.getElementById("divErrblockfrndRequest").innerHTML=""}function invite_frnd(c,d){document.getElementById("invite_frnds").style.display="block";document.getElementById("divErrInviteFrnd").innerHTML="";$("ajaxLoaderInvite").show();$(c).request({action:d,method:"post",parameters:{actionType:"INVITE_FRIENDS"},onSuccess:handleInviteFrndResponse,onException:handleInviteFrndError})}function handleInviteFrndResponse(c){data=c.responseText;if(data=="PAGE_RELOAD"){location.reload()}else{document.getElementById("output_div").innerHTML=c.responseText;$("ajaxLoaderInvite").hide()}}function handleInviteFrndError(c){document.getElementById("divErrInviteFrnd").innerHTML="Error processing: Please try later.";$("ajaxLoaderInvite").hide()}function cancel_invite_friend(){document.getElementById("invite_frnds").style.display="none"}function cancel_invitefriend_withnext(){document.getElementById("show_emailconfirm").submit()}function send_invitation(c,d){$("ajaxLoaderInvite").show();$(c).request({action:d,method:"post",parameters:{actionType:"SEND_INVITATION"},onSuccess:handleInvitationResponse,onException:handleInvitationError})}function handleInvitationResponse(d){data=JSON.parse(d.responseText);if(data.STATUS=="SUCCESS"){if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{document.getElementById("divErrInviteFrnd").innerHTML=data.MESSAGE;var c=/MSIE \d+.\d+/;if(navigator.appVersion.match(c)){if(data.UPDATEDATA=="not_required_next"){setTimeout("cancel_invite_friend()",100)}else{setTimeout("cancel_invitefriend_withnext()",100)}}else{if(data.UPDATEDATA=="not_required_next"){cancel_invite_friend()}else{cancel_invitefriend_withnext()}}}}else{document.getElementById("divErrInviteFrnd").innerHTML=data.MESSAGE}$("ajaxLoaderInvite").hide()}function handleInvitationError(c){document.getElementById("divErrInviteFrnd").innerHTML="Error processing: Please try later.";$("ajaxLoaderInvite").hide()}function national_event(c,d){close_inbox_text();close_channel_list();closeBroadcastBox();closeNotifyAlerts();close_help_box();close_alert_box();close_online_alert_box();close_instant_msg_box();close_gen_chat_box();document.getElementById("homePageControlPopup").style.display="none";document.getElementById("national_event").style.display="block";$("national_event_ajxLoader").show();$(c).request({action:d,method:"post",parameters:{actionType:"NATIONAL_EVENT"},onSuccess:HandleResponsenationalEvent,onException:handleErrornationalEvent})}function handleErrornationalEvent(c){$("national_event_ajxLoader").hide()}function HandleResponsenationalEvent(c){data=c.responseText;if(data=="PAGE_RELOAD"){location.reload()}else{document.getElementById("divResultsetNationalEvent").innerHTML=c.responseText;$("national_event_ajxLoader").hide()}}var Prototype={Version:"1.6.0.3",Browser:{IE:!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1),Opera:navigator.userAgent.indexOf("Opera")>-1,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")===-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div")["__proto__"]&&document.createElement("div")["__proto__"]!==document.createElement("form")["__proto__"]},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(c){return c}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class={create:function(){var k=null,g=$A(arguments);if(Object.isFunction(g[0])){k=g.shift()}function c(){this.initialize.apply(this,arguments)}Object.extend(c,Class.Methods);c.superclass=k;c.subclasses=[];if(k){var d=function(){};d.prototype=k.prototype;c.prototype=new d;k.subclasses.push(c)}for(var f=0;f<g.length;f++){c.addMethods(g[f])}if(!c.prototype.initialize){c.prototype.initialize=Prototype.emptyFunction}c.prototype.constructor=c;return c}};Class.Methods={addMethods:function(m){var f=this.superclass&&this.superclass.prototype;var d=Object.keys(m);if(!Object.keys({toString:true}).length){d.push("toString","valueOf")}for(var c=0,g=d.length;c<g;c++){var l=d[c],k=m[l];if(f&&Object.isFunction(k)&&k.argumentNames().first()=="$super"){var n=k;k=(function(o){return function(){return f[o].apply(this,arguments)}})(l).wrap(n);k.valueOf=n.valueOf.bind(n);k.toString=n.toString.bind(n)}this.prototype[l]=k}return this}};var Abstract={};Object.extend=function(c,f){for(var d in f){c[d]=f[d]}return c};Object.extend(Object,{inspect:function(c){try{if(Object.isUndefined(c)){return"undefined"}if(c===null){return"null"}return c.inspect?c.inspect():String(c)}catch(d){if(d instanceof RangeError){return"..."}throw d}},toJSON:function(c){var f=typeof c;switch(f){case"undefined":case"function":case"unknown":return;case"boolean":return c.toString()}if(c===null){return"null"}if(c.toJSON){return c.toJSON()}if(Object.isElement(c)){return}var d=[];for(var k in c){var g=Object.toJSON(c[k]);if(!Object.isUndefined(g)){d.push(k.toJSON()+": "+g)}}return"{"+d.join(", ")+"}"},toQueryString:function(c){return $H(c).toQueryString()},toHTML:function(c){return c&&c.toHTML?c.toHTML():String.interpret(c)},keys:function(c){var d=[];for(var f in c){d.push(f)}return d},values:function(d){var c=[];for(var f in d){c.push(d[f])}return c},clone:function(c){return Object.extend({},c)},isElement:function(c){return !!(c&&c.nodeType==1)},isArray:function(c){return c!=null&&typeof c=="object"&&"splice" in c&&"join" in c},isHash:function(c){return c instanceof Hash},isFunction:function(c){return typeof c=="function"},isString:function(c){return typeof c=="string"},isNumber:function(c){return typeof c=="number"},isUndefined:function(c){return typeof c=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var c=this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1].replace(/\s+/g,"").split(",");return c.length==1&&!c[0]?[]:c},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var c=this,f=$A(arguments),d=f.shift();return function(){return c.apply(d,f.concat($A(arguments)))}},bindAsEventListener:function(){var c=this,f=$A(arguments),d=f.shift();return function(g){return c.apply(d,[g||window.event].concat(f))}},curry:function(){if(!arguments.length){return this}var c=this,d=$A(arguments);return function(){return c.apply(this,d.concat($A(arguments)))}},delay:function(){var c=this,d=$A(arguments),f=d.shift()*1000;return window.setTimeout(function(){return c.apply(c,d)},f)},defer:function(){var c=[0.01].concat($A(arguments));return this.delay.apply(this,c)},wrap:function(d){var c=this;return function(){return d.apply(this,[c.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var c=this;return this._methodized=function(){return c.apply(null,[this].concat($A(arguments)))}}});Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var f;for(var d=0,g=arguments.length;d<g;d++){var c=arguments[d];try{f=c();break}catch(k){}}return f}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(c){return String(c).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(d,c){this.callback=d;this.frequency=c;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return}clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(c){return c==null?"":String(c)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(k,f){var c="",g=this,d;f=arguments.callee.prepareReplacement(f);while(g.length>0){if(d=g.match(k)){c+=g.slice(0,d.index);c+=String.interpret(f(d));g=g.slice(d.index+d[0].length)}else{c+=g,g=""}}return c},sub:function(f,c,d){c=this.gsub.prepareReplacement(c);d=Object.isUndefined(d)?1:d;return this.gsub(f,function(g){if(--d<0){return g[0]}return c(g)})},scan:function(d,c){this.gsub(d,c);return String(this)},truncate:function(d,c){d=d||30;c=Object.isUndefined(c)?"...":c;return this.length>d?this.slice(0,d-c.length)+c:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var d=new RegExp(Prototype.ScriptFragment,"img");var c=new RegExp(Prototype.ScriptFragment,"im");return(this.match(d)||[]).map(function(f){return(f.match(c)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var c=arguments.callee;c.text.data=this;return c.div.innerHTML},unescapeHTML:function(){var c=new Element("div");c.innerHTML=this.stripTags();return c.childNodes[0]?(c.childNodes.length>1?$A(c.childNodes).inject("",function(d,f){return d+f.nodeValue}):c.childNodes[0].nodeValue):""},toQueryParams:function(d){var c=this.strip().match(/([^?#]*)(#.*)?$/);if(!c){return{}}return c[1].split(d||"&").inject({},function(k,l){if((l=l.split("="))[0]){var f=decodeURIComponent(l.shift());var g=l.length>1?l.join("="):l[0];if(g!=undefined){g=decodeURIComponent(g)}if(f in k){if(!Object.isArray(k[f])){k[f]=[k[f]]}k[f].push(g)}else{k[f]=g}}return k})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(c){return c<1?"":new Array(c+1).join(this)},camelize:function(){var g=this.split("-"),c=g.length;if(c==1){return g[0]}var f=this.charAt(0)=="-"?g[0].charAt(0).toUpperCase()+g[0].substring(1):g[0];for(var d=1;d<c;d++){f+=g[d].charAt(0).toUpperCase()+g[d].substring(1)}return f},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(d){var c=this.gsub(/[\x00-\x1f\\]/,function(f){var g=String.specialChar[f[0]];return g?g:"\\u00"+f[0].charCodeAt().toPaddedString(2,16)});if(d){return'"'+c.replace(/"/g,'\\"')+'"'}return"'"+c.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(c){return this.sub(c||Prototype.JSONFilter,"#{1}")},isJSON:function(){var c=this;if(c.blank()){return false}c=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(c)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(c){return this.indexOf(c)>-1},startsWith:function(c){return this.indexOf(c)===0},endsWith:function(c){var f=this.length-c.length;return f>=0&&this.lastIndexOf(c)===f},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(c,d){return new Template(this,d).evaluate(c)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.stripTags().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(d){if(Object.isFunction(d)){return d}var c=new Template(d);return function(f){return c.evaluate(f)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);var Template=Class.create({initialize:function(c,d){this.template=c.toString();this.pattern=d||Template.Pattern},evaluate:function(c){if(Object.isFunction(c.toTemplateReplacements)){c=c.toTemplateReplacements()}return this.template.gsub(this.pattern,function(g){if(c==null){return""}var l=g[1]||"";if(l=="\\"){return g[2]}var d=c,m=g[3];var k=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;g=k.exec(m);if(g==null){return l}while(g!=null){var f=g[1].startsWith("[")?g[2].gsub("\\\\]","]"):g[1];d=d[f];if(null==d||""==g[3]){break}m=m.substring("["==g[3]?g[1].length:g[0].length);g=k.exec(m)}return l+String.interpret(d)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(f,d){var c=0;try{this._each(function(k){f.call(d,k,c++)})}catch(g){if(g!=$break){throw g}}return this},eachSlice:function(g,f,d){var c=-g,k=[],l=this.toArray();if(g<1){return l}while((c+=g)<l.length){k.push(l.slice(c,c+g))}return k.collect(f,d)},all:function(f,d){f=f||Prototype.K;var c=true;this.each(function(k,g){c=c&&!!f.call(d,k,g);if(!c){throw $break}});return c},any:function(f,d){f=f||Prototype.K;var c=false;this.each(function(k,g){if(c=!!f.call(d,k,g)){throw $break}});return c},collect:function(f,d){f=f||Prototype.K;var c=[];this.each(function(k,g){c.push(f.call(d,k,g))});return c},detect:function(f,d){var c;this.each(function(k,g){if(f.call(d,k,g)){c=k;throw $break}});return c},findAll:function(f,d){var c=[];this.each(function(k,g){if(f.call(d,k,g)){c.push(k)}});return c},grep:function(g,f,d){f=f||Prototype.K;var c=[];if(Object.isString(g)){g=new RegExp(g)}this.each(function(l,k){if(g.match(l)){c.push(f.call(d,l,k))}});return c},include:function(c){if(Object.isFunction(this.indexOf)){if(this.indexOf(c)!=-1){return true}}var d=false;this.each(function(f){if(f==c){d=true;throw $break}});return d},inGroupsOf:function(d,c){c=Object.isUndefined(c)?null:c;return this.eachSlice(d,function(f){while(f.length<d){f.push(c)}return f})},inject:function(c,f,d){this.each(function(k,g){c=f.call(d,c,k,g)});return c},invoke:function(d){var c=$A(arguments).slice(1);return this.map(function(f){return f[d].apply(f,c)})},max:function(f,d){f=f||Prototype.K;var c;this.each(function(k,g){k=f.call(d,k,g);if(c==null||k>=c){c=k}});return c},min:function(f,d){f=f||Prototype.K;var c;this.each(function(k,g){k=f.call(d,k,g);if(c==null||k<c){c=k}});return c},partition:function(g,d){g=g||Prototype.K;var f=[],c=[];this.each(function(l,k){(g.call(d,l,k)?f:c).push(l)});return[f,c]},pluck:function(d){var c=[];this.each(function(f){c.push(f[d])});return c},reject:function(f,d){var c=[];this.each(function(k,g){if(!f.call(d,k,g)){c.push(k)}});return c},sortBy:function(d,c){return this.map(function(g,f){return{value:g,criteria:d.call(c,g,f)}}).sort(function(l,k){var g=l.criteria,f=k.criteria;return g<f?-1:g>f?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var d=Prototype.K,c=$A(arguments);if(Object.isFunction(c.last())){d=c.pop()}var f=[this].concat(c).map($A);return this.map(function(k,g){return d(f.pluck(g))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(f){if(!f){return[]}if(f.toArray){return f.toArray()}var d=f.length||0,c=new Array(d);while(d--){c[d]=f[d]}return c}if(Prototype.Browser.WebKit){$A=function(f){if(!f){return[]}if(!(typeof f==="function"&&typeof f.length==="number"&&typeof f.item==="function")&&f.toArray){return f.toArray()}var d=f.length||0,c=new Array(d);while(d--){c[d]=f[d]}return c}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(d){for(var c=0,f=this.length;c<f;c++){d(this[c])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(c){return c!=null})},flatten:function(){return this.inject([],function(d,c){return d.concat(Object.isArray(c)?c.flatten():[c])})},without:function(){var c=$A(arguments);return this.select(function(d){return !c.include(d)})},reverse:function(c){return(c!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(c){return this.inject([],function(g,f,d){if(0==d||(c?g.last()!=f:!g.include(f))){g.push(f)}return g})},intersect:function(c){return this.uniq().findAll(function(d){return c.detect(function(f){return d===f})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var c=[];this.each(function(d){var f=Object.toJSON(d);if(!Object.isUndefined(f)){c.push(f)}});return"["+c.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(f,c){c||(c=0);var d=this.length;if(c<0){c=d+c}for(;c<d;c++){if(this[c]===f){return c}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(d,c){c=isNaN(c)?this.length:(c<0?this.length+c:c)+1;var f=this.slice(0,c).reverse().indexOf(d);return(f<0)?f:c-f-1}}Array.prototype.toArray=Array.prototype.clone;function $w(c){if(!Object.isString(c)){return[]}c=c.strip();return c?c.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var k=[];for(var d=0,f=this.length;d<f;d++){k.push(this[d])}for(var d=0,f=arguments.length;d<f;d++){if(Object.isArray(arguments[d])){for(var c=0,g=arguments[d].length;c<g;c++){k.push(arguments[d][c])}}else{k.push(arguments[d])}}return k}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(d,c){$R(0,this,true).each(d,c);return this},toPaddedString:function(f,d){var c=this.toString(d||10);return"0".times(f-c.length)+c},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(c){Number.prototype[c]=Math[c].methodize()});function $H(c){return new Hash(c)}var Hash=Class.create(Enumerable,(function(){function c(d,f){if(Object.isUndefined(f)){return d}return d+"="+encodeURIComponent(String.interpret(f))}return{initialize:function(d){this._object=Object.isHash(d)?d.toObject():Object.clone(d)},_each:function(f){for(var d in this._object){var g=this._object[d],k=[d,g];k.key=d;k.value=g;f(k)}},set:function(d,f){return this._object[d]=f},get:function(d){if(this._object[d]!==Object.prototype[d]){return this._object[d]}},unset:function(d){var f=this._object[d];delete this._object[d];return f},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(f){var d=this.detect(function(g){return g.value===f});return d&&d.key},merge:function(d){return this.clone().update(d)},update:function(d){return new Hash(d).inject(this,function(f,g){f.set(g.key,g.value);return f})},toQueryString:function(){return this.inject([],function(g,k){var f=encodeURIComponent(k.key),d=k.value;if(d&&typeof d=="object"){if(Object.isArray(d)){return g.concat(d.map(c.curry(f)))}}else{g.push(c(f,d))}return g}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(d){return d.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(f,c,d){this.start=f;this.end=c;this.exclusive=d},_each:function(c){var d=this.start;while(this.include(d)){c(d);d=d.succ()}},include:function(c){if(c<this.start){return false}if(this.exclusive){return c<this.end}return c<=this.end}});var $R=function(f,c,d){return new ObjectRange(f,c,d)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(c){this.responders._each(c)},register:function(c){if(!this.include(c)){this.responders.push(c)}},unregister:function(c){this.responders=this.responders.without(c)},dispatch:function(g,d,f,c){this.each(function(k){if(Object.isFunction(k[g])){try{k[g].apply(k,[d,f,c])}catch(l){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(c){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,c||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,d,c){$super(c);this.transport=Ajax.getTransport();this.request(d)},request:function(d){this.url=d;this.method=this.options.method;var g=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){g._method=this.method;this.method="post"}this.parameters=g;if(g=Object.toQueryString(g)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+g}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){g+="&_="}}}try{var c=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(c)}Ajax.Responders.dispatch("onCreate",this,c);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||g):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(f){this.dispatchException(f)}},onStateChange:function(){var c=this.transport.readyState;if(c>1&&!((c==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var k={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){k["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){k.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var f=this.options.requestHeaders;if(Object.isFunction(f.push)){for(var d=0,g=f.length;d<g;d+=2){k[f[d]]=f[d+1]}}else{$H(f).each(function(l){k[l.key]=l.value})}}for(var c in k){this.transport.setRequestHeader(c,k[c])}},success:function(){var c=this.getStatus();return !c||(c>=200&&c<300)},getStatus:function(){try{return this.transport.status||0}catch(c){return 0}},respondToReadyState:function(c){var f=Ajax.Request.Events[c],d=new Ajax.Response(this);if(f=="Complete"){try{this._complete=true;(this.options["on"+d.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(d,d.headerJSON)}catch(g){this.dispatchException(g)}var k=d.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&k&&k.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+f]||Prototype.emptyFunction)(d,d.headerJSON);Ajax.Responders.dispatch("on"+f,this,d,d.headerJSON)}catch(g){this.dispatchException(g)}if(f=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var c=this.url.match(/^\s*https?:\/\/[^\/]*/);return !c||(c[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(c){try{return this.transport.getResponseHeader(c)||null}catch(d){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(c){(this.options.onException||Prototype.emptyFunction)(this,c);Ajax.Responders.dispatch("onException",this,c)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(f){this.request=f;var g=this.transport=f.transport,c=this.readyState=g.readyState;if((c>2&&!Prototype.Browser.IE)||c==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(g.responseText);this.headerJSON=this._getHeaderJSON()}if(c==4){var d=g.responseXML;this.responseXML=Object.isUndefined(d)?null:d;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(c){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(c){return null}},getResponseHeader:function(c){return this.transport.getResponseHeader(c)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var c=this.getHeader("X-JSON");if(!c){return null}c=decodeURIComponent(escape(c));try{return c.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(d){this.request.dispatchException(d)}},_getResponseJSON:function(){var c=this.request.options;if(!c.evalJSON||(c.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(c.sanitizeJSON||!this.request.isSameOrigin())}catch(d){this.request.dispatchException(d)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,c,f,d){this.container={success:(c.success||c),failure:(c.failure||(c.success?null:c))};d=Object.clone(d);var g=d.onComplete;d.onComplete=(function(k,l){this.updateContent(k.responseText);if(Object.isFunction(g)){g(k,l)}}).bind(this);$super(f,d)},updateContent:function(g){var f=this.container[this.success()?"success":"failure"],c=this.options;if(!c.evalScripts){g=g.stripScripts()}if(f=$(f)){if(c.insertion){if(Object.isString(c.insertion)){var d={};d[c.insertion]=g;f.insert(d)}else{c.insertion(f,g)}}else{f.update(g)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,c,f,d){$super(d);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=c;this.url=f;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(c){if(this.options.decay){this.decay=(c.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=c.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(d){if(arguments.length>1){for(var c=0,g=[],f=arguments.length;c<f;c++){g.push($(arguments[c]))}return g}if(Object.isString(d)){d=document.getElementById(d)}return Element.extend(d)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(l,c){var f=[];var k=document.evaluate(l,$(c)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var d=0,g=k.snapshotLength;d<g;d++){f.push(Element.extend(k.snapshotItem(d)))}return f}}if(!window.Node){var Node={}}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var c=this.Element;this.Element=function(g,f){f=f||{};g=g.toLowerCase();var d=Element.cache;if(Prototype.Browser.IE&&f.name){g="<"+g+' name="'+f.name+'">';delete f.name;return Element.writeAttribute(document.createElement(g),f)}if(!d[g]){d[g]=Element.extend(document.createElement(g))}return Element.writeAttribute(d[g].cloneNode(false),f)};Object.extend(this.Element,c||{});if(c){this.Element.prototype=c.prototype}}).call(window);Element.cache={};Element.Methods={visible:function(c){return $(c).style.display!="none"},toggle:function(c){c=$(c);Element[Element.visible(c)?"hide":"show"](c);return c},hide:function(c){c=$(c);c.style.display="none";return c},show:function(c){c=$(c);c.style.display="";return c},remove:function(c){c=$(c);c.parentNode.removeChild(c);return c},update:function(c,d){c=$(c);if(d&&d.toElement){d=d.toElement()}if(Object.isElement(d)){return c.update().insert(d)}d=Object.toHTML(d);c.innerHTML=d.stripScripts();d.evalScripts.bind(d).defer();return c},replace:function(d,f){d=$(d);if(f&&f.toElement){f=f.toElement()}else{if(!Object.isElement(f)){f=Object.toHTML(f);var c=d.ownerDocument.createRange();c.selectNode(d);f.evalScripts.bind(f).defer();f=c.createContextualFragment(f.stripScripts())}}d.parentNode.replaceChild(f,d);return d},insert:function(f,k){f=$(f);if(Object.isString(k)||Object.isNumber(k)||Object.isElement(k)||(k&&(k.toElement||k.toHTML))){k={bottom:k}}var g,l,d,m;for(var c in k){g=k[c];c=c.toLowerCase();l=Element._insertionTranslations[c];if(g&&g.toElement){g=g.toElement()}if(Object.isElement(g)){l(f,g);continue}g=Object.toHTML(g);d=((c=="before"||c=="after")?f.parentNode:f).tagName.toUpperCase();m=Element._getContentFromAnonymousElement(d,g.stripScripts());if(c=="top"||c=="after"){m.reverse()}m.each(l.curry(f));g.evalScripts.bind(g).defer()}return f},wrap:function(d,f,c){d=$(d);if(Object.isElement(f)){$(f).writeAttribute(c||{})}else{if(Object.isString(f)){f=new Element(f,c)}else{f=new Element("div",f)}}if(d.parentNode){d.parentNode.replaceChild(f,d)}f.appendChild(d);return f},inspect:function(d){d=$(d);var c="<"+d.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(l){var k=l.first(),f=l.last();var g=(d[k]||"").toString();if(g){c+=" "+f+"="+g.inspect(true)}});return c+">"},recursivelyCollect:function(c,f){c=$(c);var d=[];while(c=c[f]){if(c.nodeType==1){d.push(Element.extend(c))}}return d},ancestors:function(c){return $(c).recursivelyCollect("parentNode")},descendants:function(c){return $(c).select("*")},firstDescendant:function(c){c=$(c).firstChild;while(c&&c.nodeType!=1){c=c.nextSibling}return $(c)},immediateDescendants:function(c){if(!(c=$(c).firstChild)){return[]}while(c&&c.nodeType!=1){c=c.nextSibling}if(c){return[c].concat($(c).nextSiblings())}return[]},previousSiblings:function(c){return $(c).recursivelyCollect("previousSibling")},nextSiblings:function(c){return $(c).recursivelyCollect("nextSibling")},siblings:function(c){c=$(c);return c.previousSiblings().reverse().concat(c.nextSiblings())},match:function(d,c){if(Object.isString(c)){c=new Selector(c)}return c.match($(d))},up:function(d,g,c){d=$(d);if(arguments.length==1){return $(d.parentNode)}var f=d.ancestors();return Object.isNumber(g)?f[g]:Selector.findElement(f,g,c)},down:function(d,f,c){d=$(d);if(arguments.length==1){return d.firstDescendant()}return Object.isNumber(f)?d.descendants()[f]:Element.select(d,f)[c||0]},previous:function(d,g,c){d=$(d);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(d))}var f=d.previousSiblings();return Object.isNumber(g)?f[g]:Selector.findElement(f,g,c)},next:function(f,g,d){f=$(f);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(f))}var c=f.nextSiblings();return Object.isNumber(g)?c[g]:Selector.findElement(c,g,d)},select:function(){var c=$A(arguments),d=$(c.shift());return Selector.findChildElements(d,c)},adjacent:function(){var c=$A(arguments),d=$(c.shift());return Selector.findChildElements(d.parentNode,c).without(d)},identify:function(d){d=$(d);var f=d.readAttribute("id"),c=arguments.callee;if(f){return f}do{f="anonymous_element_"+c.counter++}while($(f));d.writeAttribute("id",f);return f},readAttribute:function(f,c){f=$(f);if(Prototype.Browser.IE){var d=Element._attributeTranslations.read;if(d.values[c]){return d.values[c](f,c)}if(d.names[c]){c=d.names[c]}if(c.include(":")){return(!f.attributes||!f.attributes[c])?null:f.attributes[c].value}}return f.getAttribute(c)},writeAttribute:function(k,f,l){k=$(k);var d={},g=Element._attributeTranslations.write;if(typeof f=="object"){d=f}else{d[f]=Object.isUndefined(l)?true:l}for(var c in d){f=g.names[c]||c;l=d[c];if(g.values[c]){f=g.values[c](k,l)}if(l===false||l===null){k.removeAttribute(f)}else{if(l===true){k.setAttribute(f,f)}else{k.setAttribute(f,l)}}}return k},getHeight:function(c){return $(c).getDimensions().height},getWidth:function(c){return $(c).getDimensions().width},classNames:function(c){return new Element.ClassNames(c)},hasClassName:function(c,d){if(!(c=$(c))){return}var f=c.className;return(f.length>0&&(f==d||new RegExp("(^|\\s)"+d+"(\\s|$)").test(f)))},addClassName:function(c,d){if(!(c=$(c))){return}if(!c.hasClassName(d)){c.className+=(c.className?" ":"")+d}return c},removeClassName:function(c,d){if(!(c=$(c))){return}c.className=c.className.replace(new RegExp("(^|\\s+)"+d+"(\\s+|$)")," ").strip();return c},toggleClassName:function(c,d){if(!(c=$(c))){return}return c[c.hasClassName(d)?"removeClassName":"addClassName"](d)},cleanWhitespace:function(d){d=$(d);var f=d.firstChild;while(f){var c=f.nextSibling;if(f.nodeType==3&&!/\S/.test(f.nodeValue)){d.removeChild(f)}f=c}return d},empty:function(c){return $(c).innerHTML.blank()},descendantOf:function(d,c){d=$(d),c=$(c);if(d.compareDocumentPosition){return(d.compareDocumentPosition(c)&8)===8}if(c.contains){return c.contains(d)&&c!==d}while(d=d.parentNode){if(d==c){return true}}return false},scrollTo:function(c){c=$(c);var d=c.cumulativeOffset();window.scrollTo(d[0],d[1]);return c},getStyle:function(d,f){d=$(d);f=f=="float"?"cssFloat":f.camelize();var g=d.style[f];if(!g||g=="auto"){var c=document.defaultView.getComputedStyle(d,null);g=c?c[f]:null}if(f=="opacity"){return g?parseFloat(g):1}return g=="auto"?null:g},getOpacity:function(c){return $(c).getStyle("opacity")},setStyle:function(d,f){d=$(d);var k=d.style,c;if(Object.isString(f)){d.style.cssText+=";"+f;return f.include("opacity")?d.setOpacity(f.match(/opacity:\s*(\d?\.?\d*)/)[1]):d}for(var g in f){if(g=="opacity"){d.setOpacity(f[g])}else{k[(g=="float"||g=="cssFloat")?(Object.isUndefined(k.styleFloat)?"cssFloat":"styleFloat"):g]=f[g]}}return d},setOpacity:function(c,d){c=$(c);c.style.opacity=(d==1||d==="")?"":(d<0.00001)?0:d;return c},getDimensions:function(f){f=$(f);var m=f.getStyle("display");if(m!="none"&&m!=null){return{width:f.offsetWidth,height:f.offsetHeight}}var d=f.style;var l=d.visibility;var g=d.position;var c=d.display;d.visibility="hidden";d.position="absolute";d.display="block";var n=f.clientWidth;var k=f.clientHeight;d.display=c;d.position=g;d.visibility=l;return{width:n,height:k}},makePositioned:function(c){c=$(c);var d=Element.getStyle(c,"position");if(d=="static"||!d){c._madePositioned=true;c.style.position="relative";if(Prototype.Browser.Opera){c.style.top=0;c.style.left=0}}return c},undoPositioned:function(c){c=$(c);if(c._madePositioned){c._madePositioned=undefined;c.style.position=c.style.top=c.style.left=c.style.bottom=c.style.right=""}return c},makeClipping:function(c){c=$(c);if(c._overflow){return c}c._overflow=Element.getStyle(c,"overflow")||"auto";if(c._overflow!=="hidden"){c.style.overflow="hidden"}return c},undoClipping:function(c){c=$(c);if(!c._overflow){return c}c.style.overflow=c._overflow=="auto"?"":c._overflow;c._overflow=null;return c},cumulativeOffset:function(d){var c=0,f=0;do{c+=d.offsetTop||0;f+=d.offsetLeft||0;d=d.offsetParent}while(d);return Element._returnOffset(f,c)},positionedOffset:function(d){var c=0,g=0;do{c+=d.offsetTop||0;g+=d.offsetLeft||0;d=d.offsetParent;if(d){if(d.tagName.toUpperCase()=="BODY"){break}var f=Element.getStyle(d,"position");if(f!=="static"){break}}}while(d);return Element._returnOffset(g,c)},absolutize:function(d){d=$(d);if(d.getStyle("position")=="absolute"){return d}var g=d.positionedOffset();var l=g[1];var k=g[0];var f=d.clientWidth;var c=d.clientHeight;d._originalLeft=k-parseFloat(d.style.left||0);d._originalTop=l-parseFloat(d.style.top||0);d._originalWidth=d.style.width;d._originalHeight=d.style.height;d.style.position="absolute";d.style.top=l+"px";d.style.left=k+"px";d.style.width=f+"px";d.style.height=c+"px";return d},relativize:function(c){c=$(c);if(c.getStyle("position")=="relative"){return c}c.style.position="relative";var f=parseFloat(c.style.top||0)-(c._originalTop||0);var d=parseFloat(c.style.left||0)-(c._originalLeft||0);c.style.top=f+"px";c.style.left=d+"px";c.style.height=c._originalHeight;c.style.width=c._originalWidth;return c},cumulativeScrollOffset:function(d){var c=0,f=0;do{c+=d.scrollTop||0;f+=d.scrollLeft||0;d=d.parentNode}while(d);return Element._returnOffset(f,c)},getOffsetParent:function(c){if(c.offsetParent){return $(c.offsetParent)}if(c==document.body){return $(c)}while((c=c.parentNode)&&c!=document.body){if(Element.getStyle(c,"position")!="static"){return $(c)}}return $(document.body)},viewportOffset:function(g){var c=0,f=0;var d=g;do{c+=d.offsetTop||0;f+=d.offsetLeft||0;if(d.offsetParent==document.body&&Element.getStyle(d,"position")=="absolute"){break}}while(d=d.offsetParent);d=g;do{if(!Prototype.Browser.Opera||(d.tagName&&(d.tagName.toUpperCase()=="BODY"))){c-=d.scrollTop||0;f-=d.scrollLeft||0}}while(d=d.parentNode);return Element._returnOffset(f,c)},clonePosition:function(d,g){var c=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});g=$(g);var k=g.viewportOffset();d=$(d);var l=[0,0];var f=null;if(Element.getStyle(d,"position")=="absolute"){f=d.getOffsetParent();l=f.viewportOffset()}if(f==document.body){l[0]-=document.body.offsetLeft;l[1]-=document.body.offsetTop}if(c.setLeft){d.style.left=(k[0]-l[0]+c.offsetLeft)+"px"}if(c.setTop){d.style.top=(k[1]-l[1]+c.offsetTop)+"px"}if(c.setWidth){d.style.width=g.offsetWidth+"px"}if(c.setHeight){d.style.height=g.offsetHeight+"px"}return d}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(g,d,f){switch(f){case"left":case"top":case"right":case"bottom":if(g(d,"position")==="static"){return null}case"height":case"width":if(!Element.visible(d)){return null}var k=parseInt(g(d,f),10);if(k!==d["offset"+f.capitalize()]){return k+"px"}var c;if(f==="height"){c=["border-top-width","padding-top","padding-bottom","border-bottom-width"]}else{c=["border-left-width","padding-left","padding-right","border-right-width"]}return c.inject(k,function(l,m){var n=g(d,m);return n===null?l:l-parseInt(n,10)})+"px";default:return g(d,f)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(f,c,d){if(d==="title"){return c.title}return f(c,d)})}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(f,d){d=$(d);try{d.offsetParent}catch(k){return $(document.body)}var c=d.getStyle("position");if(c!=="static"){return f(d)}d.setStyle({position:"relative"});var g=f(d);d.setStyle({position:c});return g});$w("positionedOffset viewportOffset").each(function(c){Element.Methods[c]=Element.Methods[c].wrap(function(k,f){f=$(f);try{f.offsetParent}catch(m){return Element._returnOffset(0,0)}var d=f.getStyle("position");if(d!=="static"){return k(f)}var g=f.getOffsetParent();if(g&&g.getStyle("position")==="fixed"){g.setStyle({zoom:1})}f.setStyle({position:"relative"});var l=k(f);f.setStyle({position:d});return l})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(d,c){try{c.offsetParent}catch(f){return Element._returnOffset(0,0)}return d(c)});Element.Methods.getStyle=function(c,d){c=$(c);d=(d=="float"||d=="cssFloat")?"styleFloat":d.camelize();var f=c.style[d];if(!f&&c.currentStyle){f=c.currentStyle[d]}if(d=="opacity"){if(f=(c.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(f[1]){return parseFloat(f[1])/100}}return 1}if(f=="auto"){if((d=="width"||d=="height")&&(c.getStyle("display")!="none")){return c["offset"+d.capitalize()]+"px"}return null}return f};Element.Methods.setOpacity=function(d,k){function l(m){return m.replace(/alpha\([^\)]*\)/gi,"")}d=$(d);var c=d.currentStyle;if((c&&!c.hasLayout)||(!c&&d.style.zoom=="normal")){d.style.zoom=1}var g=d.getStyle("filter"),f=d.style;if(k==1||k===""){(g=l(g))?f.filter=g:f.removeAttribute("filter");return d}else{if(k<0.00001){k=0}}f.filter=l(g)+"alpha(opacity="+(k*100)+")";return d};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(c,d){return c.getAttribute(d,2)},_getAttrNode:function(c,f){var d=c.getAttributeNode(f);return d?d.value:""},_getEv:function(c,d){d=c.getAttribute(d);return d?d.toString().slice(23,-2):null},_flag:function(c,d){return $(c).hasAttribute(d)?d:null},style:function(c){return c.style.cssText.toLowerCase()},title:function(c){return c.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(c,d){c.checked=!!d},style:function(c,d){c.style.cssText=d?d:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(c){Element._attributeTranslations.write.names[c.toLowerCase()]=c;Element._attributeTranslations.has[c.toLowerCase()]=c});(function(c){Object.extend(c,{href:c._getAttr,src:c._getAttr,type:c._getAttr,action:c._getAttrNode,disabled:c._flag,checked:c._flag,readonly:c._flag,multiple:c._flag,onload:c._getEv,onunload:c._getEv,onclick:c._getEv,ondblclick:c._getEv,onmousedown:c._getEv,onmouseup:c._getEv,onmouseover:c._getEv,onmousemove:c._getEv,onmouseout:c._getEv,onfocus:c._getEv,onblur:c._getEv,onkeypress:c._getEv,onkeydown:c._getEv,onkeyup:c._getEv,onsubmit:c._getEv,onreset:c._getEv,onselect:c._getEv,onchange:c._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(c,d){c=$(c);c.style.opacity=(d==1)?0.999999:(d==="")?"":(d<0.00001)?0:d;return c}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(c,d){c=$(c);c.style.opacity=(d==1||d==="")?"":(d<0.00001)?0:d;if(d==1){if(c.tagName.toUpperCase()=="IMG"&&c.width){c.width++;c.width--}else{try{var g=document.createTextNode(" ");c.appendChild(g);c.removeChild(g)}catch(f){}}}return c};Element.Methods.cumulativeOffset=function(d){var c=0,f=0;do{c+=d.offsetTop||0;f+=d.offsetLeft||0;if(d.offsetParent==document.body){if(Element.getStyle(d,"position")=="absolute"){break}}d=d.offsetParent}while(d);return Element._returnOffset(f,c)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(d,f){d=$(d);if(f&&f.toElement){f=f.toElement()}if(Object.isElement(f)){return d.update().insert(f)}f=Object.toHTML(f);var c=d.tagName.toUpperCase();if(c in Element._insertionTranslations.tags){$A(d.childNodes).each(function(g){d.removeChild(g)});Element._getContentFromAnonymousElement(c,f.stripScripts()).each(function(g){d.appendChild(g)})}else{d.innerHTML=f.stripScripts()}f.evalScripts.bind(f).defer();return d}}if("outerHTML" in document.createElement("div")){Element.Methods.replace=function(f,k){f=$(f);if(k&&k.toElement){k=k.toElement()}if(Object.isElement(k)){f.parentNode.replaceChild(k,f);return f}k=Object.toHTML(k);var g=f.parentNode,d=g.tagName.toUpperCase();if(Element._insertionTranslations.tags[d]){var l=f.next();var c=Element._getContentFromAnonymousElement(d,k.stripScripts());g.removeChild(f);if(l){c.each(function(m){g.insertBefore(m,l)})}else{c.each(function(m){g.appendChild(m)})}}else{f.outerHTML=k.stripScripts()}k.evalScripts.bind(k).defer();return f}}Element._returnOffset=function(d,f){var c=[d,f];c.left=d;c.top=f;return c};Element._getContentFromAnonymousElement=function(f,d){var g=new Element("div"),c=Element._insertionTranslations.tags[f];if(c){g.innerHTML=c[0]+d+c[1];c[2].times(function(){g=g.firstChild})}else{g.innerHTML=d}return $A(g.childNodes)};Element._insertionTranslations={before:function(c,d){c.parentNode.insertBefore(d,c)},top:function(c,d){c.insertBefore(d,c.firstChild)},bottom:function(c,d){c.appendChild(d)},after:function(c,d){c.parentNode.insertBefore(d,c.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(c,f){f=Element._attributeTranslations.has[f]||f;var d=$(c).getAttributeNode(f);return !!(d&&d.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div")["__proto__"]){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div")["__proto__"];Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var c={},d=Element.Methods.ByTag;var f=Object.extend(function(l){if(!l||l._extendedByPrototype||l.nodeType!=1||l==window){return l}var g=Object.clone(c),k=l.tagName.toUpperCase(),n,m;if(d[k]){Object.extend(g,d[k])}for(n in g){m=g[n];if(Object.isFunction(m)&&!(n in l)){l[n]=m.methodize()}}l._extendedByPrototype=Prototype.emptyFunction;return l},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(c,Element.Methods);Object.extend(c,Element.Methods.Simulated)}}});f.refresh();return f})();Element.hasAttribute=function(c,d){if(c.hasAttribute){return c.hasAttribute(d)}return Element.Methods.Simulated.hasAttribute(c,d)};Element.addMethods=function(f){var n=Prototype.BrowserFeatures,g=Element.Methods.ByTag;if(!f){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var d=f;f=arguments[1]}if(!d){Object.extend(Element.Methods,f||{})}else{if(Object.isArray(d)){d.each(m)}else{m(d)}}function m(p){p=p.toUpperCase();if(!Element.Methods.ByTag[p]){Element.Methods.ByTag[p]={}}Object.extend(Element.Methods.ByTag[p],f)}function c(r,q,p){p=p||false;for(var u in r){var t=r[u];if(!Object.isFunction(t)){continue}if(!p||!(u in q)){q[u]=t.methodize()}}}function k(r){var p;var q={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(q[r]){p="HTML"+q[r]+"Element"}if(window[p]){return window[p]}p="HTML"+r+"Element";if(window[p]){return window[p]}p="HTML"+r.capitalize()+"Element";if(window[p]){return window[p]}window[p]={};window[p].prototype=document.createElement(r)["__proto__"];return window[p]}if(n.ElementExtensions){c(Element.Methods,HTMLElement.prototype);c(Element.Methods.Simulated,HTMLElement.prototype,true)}if(n.SpecificElementExtensions){for(var o in Element.Methods.ByTag){var l=k(o);if(Object.isUndefined(l)){continue}c(g[o],l.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){var c={},d=Prototype.Browser;$w("width height").each(function(g){var f=g.capitalize();if(d.WebKit&&!document.evaluate){c[g]=self["inner"+f]}else{if(d.Opera&&parseFloat(window.opera.version())<9.5){c[g]=document.body["client"+f]}else{c[g]=document.documentElement["client"+f]}}});return c},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(c){this.expression=c.strip();if(this.shouldUseSelectorsAPI()){this.mode="selectorsAPI"}else{if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}}},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath){return false}var c=this.expression;if(Prototype.Browser.WebKit&&(c.include("-of-type")||c.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(c)){return false}return true},shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI){return false}if(!Selector._div){Selector._div=new Element("div")}try{Selector._div.querySelector(this.expression)}catch(c){return false}return true},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var k=this.expression,l=Selector.patterns,d=Selector.xpath,g,c;if(Selector._cache[k]){this.xpath=Selector._cache[k];return}this.matcher=[".//*"];while(k&&g!=k&&(/\S/).test(k)){g=k;for(var f in l){if(c=k.match(l[f])){this.matcher.push(Object.isFunction(d[f])?d[f](c):new Template(d[f]).evaluate(c));k=k.replace(c[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(c){c=c||document;var f=this.expression,d;switch(this.mode){case"selectorsAPI":if(c!==document){var g=c.id,k=$(c).identify();f="#"+k+" "+f}d=$A(c.querySelectorAll(f)).map(Element.extend);c.id=g;return d;case"xpath":return document._getElementsByXPath(this.xpath,c);default:return this.matcher(c)}},match:function(o){this.tokens=[];var u=this.expression,c=Selector.patterns,k=Selector.assertions;var d,g,l;while(u&&d!==u&&(/\S/).test(u)){d=u;for(var q in c){g=c[q];if(l=u.match(g)){if(k[q]){this.tokens.push([q,Object.clone(l)]);u=u.replace(l[0],"")}else{return this.findElements(document).include(o)}}}}var t=true,f,r;for(var q=0,n;n=this.tokens[q];q++){f=n[0],r=n[1];if(!Selector.assertions[f](o,r)){t=false;break}}return t},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(c){if(c[1]=="*"){return""}return"[local-name()='"+c[1].toLowerCase()+"' or local-name()='"+c[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(c){c[1]=c[1].toLowerCase();return new Template("[@#{1}]").evaluate(c)},attr:function(c){c[1]=c[1].toLowerCase();c[3]=c[5]||c[6];return new Template(Selector.xpath.operators[c[2]]).evaluate(c)},pseudo:function(c){var d=Selector.xpath.pseudos[c[1]];if(!d){return""}if(Object.isFunction(d)){return d(c)}return new Template(Selector.xpath.pseudos[c[1]]).evaluate(c)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(d){var o=d[6],n=Selector.patterns,c=Selector.xpath,k,f;var l=[];while(o&&k!=o&&(/\S/).test(o)){k=o;for(var g in n){if(d=o.match(n[g])){f=Object.isFunction(c[g])?c[g](d):new Template(c[g]).evaluate(d);l.push("("+f.substring(1,f.length-1)+")");o=o.replace(d[0],"");break}}}return"[not("+l.join(" and ")+")]"},"nth-child":function(c){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",c)},"nth-last-child":function(c){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",c)},"nth-of-type":function(c){return Selector.xpath.pseudos.nth("position() ",c)},"nth-last-of-type":function(c){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",c)},"first-of-type":function(c){c[6]="1";return Selector.xpath.pseudos["nth-of-type"](c)},"last-of-type":function(c){c[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](c)},"only-of-type":function(c){var d=Selector.xpath.pseudos;return d["first-of-type"](c)+d["last-of-type"](c)},nth:function(k,f){var l,n=f[6],d;if(n=="even"){n="2n+0"}if(n=="odd"){n="2n+1"}if(l=n.match(/^(\d+)$/)){return"["+k+"= "+l[1]+"]"}if(l=n.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(l[1]=="-"){l[1]=-1}var g=l[1]?Number(l[1]):1;var c=l[2]?Number(l[2]):0;d="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(d).evaluate({fragment:k,a:g,b:c})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(c){c[3]=(c[5]||c[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(c)},pseudo:function(c){if(c[6]){c[6]=c[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(c)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[((?:[\w]+:)?[\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(c,d){return d[1].toUpperCase()==c.tagName.toUpperCase()},className:function(c,d){return Element.hasClassName(c,d[1])},id:function(c,d){return c.id===d[1]},attrPresence:function(c,d){return Element.hasAttribute(c,d[1])},attr:function(d,f){var c=Element.readAttribute(d,f[1]);return c&&Selector.operators[f[2]](c,f[5]||f[6])}},handlers:{concat:function(d,c){for(var f=0,g;g=c[f];f++){d.push(g)}return d},mark:function(c){var g=Prototype.emptyFunction;for(var d=0,f;f=c[d];d++){f._countedByPrototype=g}return c},unmark:function(c){for(var d=0,f;f=c[d];d++){f._countedByPrototype=undefined}return c},index:function(c,g,m){c._countedByPrototype=Prototype.emptyFunction;if(g){for(var d=c.childNodes,k=d.length-1,f=1;k>=0;k--){var l=d[k];if(l.nodeType==1&&(!m||l._countedByPrototype)){l.nodeIndex=f++}}}else{for(var k=0,f=1,d=c.childNodes;l=d[k];k++){if(l.nodeType==1&&(!m||l._countedByPrototype)){l.nodeIndex=f++}}}},unique:function(d){if(d.length==0){return d}var g=[],k;for(var f=0,c=d.length;f<c;f++){if(!(k=d[f])._countedByPrototype){k._countedByPrototype=Prototype.emptyFunction;g.push(Element.extend(k))}}return Selector.handlers.unmark(g)},descendant:function(c){var g=Selector.handlers;for(var f=0,d=[],k;k=c[f];f++){g.concat(d,k.getElementsByTagName("*"))}return d},child:function(c){var k=Selector.handlers;for(var g=0,f=[],l;l=c[g];g++){for(var d=0,m;m=l.childNodes[d];d++){if(m.nodeType==1&&m.tagName!="!"){f.push(m)}}}return f},adjacent:function(c){for(var f=0,d=[],k;k=c[f];f++){var g=this.nextElementSibling(k);if(g){d.push(g)}}return d},laterSibling:function(c){var g=Selector.handlers;for(var f=0,d=[],k;k=c[f];f++){g.concat(d,Element.nextSiblings(k))}return d},nextElementSibling:function(c){while(c=c.nextSibling){if(c.nodeType==1){return c}}return null},previousElementSibling:function(c){while(c=c.previousSibling){if(c.nodeType==1){return c}}return null},tagName:function(c,n,f,d){var o=f.toUpperCase();var k=[],m=Selector.handlers;if(c){if(d){if(d=="descendant"){for(var l=0,g;g=c[l];l++){m.concat(k,g.getElementsByTagName(f))}return k}else{c=this[d](c)}if(f=="*"){return c}}for(var l=0,g;g=c[l];l++){if(g.tagName.toUpperCase()===o){k.push(g)}}return k}else{return n.getElementsByTagName(f)}},id:function(d,c,n,l){var m=$(n),g=Selector.handlers;if(!m){return[]}if(!d&&c==document){return[m]}if(d){if(l){if(l=="child"){for(var f=0,k;k=d[f];f++){if(m.parentNode==k){return[m]}}}else{if(l=="descendant"){for(var f=0,k;k=d[f];f++){if(Element.descendantOf(m,k)){return[m]}}}else{if(l=="adjacent"){for(var f=0,k;k=d[f];f++){if(Selector.handlers.previousElementSibling(m)==k){return[m]}}}else{d=g[l](d)}}}}for(var f=0,k;k=d[f];f++){if(k==m){return[m]}}return[]}return(m&&Element.descendantOf(m,c))?[m]:[]},className:function(d,c,f,g){if(d&&g){d=this[g](d)}return Selector.handlers.byClassName(d,c,f)},byClassName:function(f,d,l){if(!f){f=Selector.handlers.descendant([d])}var n=" "+l+" ";for(var k=0,g=[],m,c;m=f[k];k++){c=m.className;if(c.length==0){continue}if(c==l||(" "+c+" ").include(n)){g.push(m)}}return g},attrPresence:function(f,d,c,m){if(!f){f=d.getElementsByTagName("*")}if(f&&m){f=this[m](f)}var k=[];for(var g=0,l;l=f[g];g++){if(Element.hasAttribute(l,c)){k.push(l)}}return k},attr:function(c,o,n,p,f,d){if(!c){c=o.getElementsByTagName("*")}if(c&&d){c=this[d](c)}var q=Selector.operators[f],l=[];for(var k=0,g;g=c[k];k++){var m=Element.readAttribute(g,n);if(m===null){continue}if(q(m,p)){l.push(g)}}return l},pseudo:function(d,f,k,c,g){if(d&&g){d=this[g](d)}if(!d){d=c.getElementsByTagName("*")}return Selector.pseudos[f](d,k,c)}},pseudos:{"first-child":function(d,l,c){for(var g=0,f=[],k;k=d[g];g++){if(Selector.handlers.previousElementSibling(k)){continue}f.push(k)}return f},"last-child":function(d,l,c){for(var g=0,f=[],k;k=d[g];g++){if(Selector.handlers.nextElementSibling(k)){continue}f.push(k)}return f},"only-child":function(d,m,c){var k=Selector.handlers;for(var g=0,f=[],l;l=d[g];g++){if(!k.previousElementSibling(l)&&!k.nextElementSibling(l)){f.push(l)}}return f},"nth-child":function(d,f,c){return Selector.pseudos.nth(d,f,c)},"nth-last-child":function(d,f,c){return Selector.pseudos.nth(d,f,c,true)},"nth-of-type":function(d,f,c){return Selector.pseudos.nth(d,f,c,false,true)},"nth-last-of-type":function(d,f,c){return Selector.pseudos.nth(d,f,c,true,true)},"first-of-type":function(d,f,c){return Selector.pseudos.nth(d,"1",c,false,true)},"last-of-type":function(d,f,c){return Selector.pseudos.nth(d,"1",c,true,true)},"only-of-type":function(d,g,c){var f=Selector.pseudos;return f["last-of-type"](f["first-of-type"](d,g,c),g,c)},getIndices:function(d,c,f){if(d==0){return c>0?[c]:[]}return $R(1,f).inject([],function(g,k){if(0==(k-c)%d&&(k-c)/d>=0){g.push(k)}return g})},nth:function(c,u,x,t,f){if(c.length==0){return[]}if(u=="even"){u="2n+0"}if(u=="odd"){u="2n+1"}var r=Selector.handlers,q=[],d=[],k;r.mark(c);for(var p=0,g;g=c[p];p++){if(!g.parentNode._countedByPrototype){r.index(g.parentNode,t,f);d.push(g.parentNode)}}if(u.match(/^\d+$/)){u=Number(u);for(var p=0,g;g=c[p];p++){if(g.nodeIndex==u){q.push(g)}}}else{if(k=u.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(k[1]=="-"){k[1]=-1}var y=k[1]?Number(k[1]):1;var v=k[2]?Number(k[2]):0;var z=Selector.pseudos.getIndices(y,v,c.length);for(var p=0,g,n=z.length;g=c[p];p++){for(var o=0;o<n;o++){if(g.nodeIndex==z[o]){q.push(g)}}}}}r.unmark(c);r.unmark(d);return q},empty:function(d,l,c){for(var g=0,f=[],k;k=d[g];g++){if(k.tagName=="!"||k.firstChild){continue}f.push(k)}return f},not:function(c,g,p){var n=Selector.handlers,q,f;var o=new Selector(g).findElements(p);n.mark(o);for(var l=0,k=[],d;d=c[l];l++){if(!d._countedByPrototype){k.push(d)}}n.unmark(o);return k},enabled:function(d,l,c){for(var g=0,f=[],k;k=d[g];g++){if(!k.disabled&&(!k.type||k.type!=="hidden")){f.push(k)}}return f},disabled:function(d,l,c){for(var g=0,f=[],k;k=d[g];g++){if(k.disabled){f.push(k)}}return f},checked:function(d,l,c){for(var g=0,f=[],k;k=d[g];g++){if(k.checked){f.push(k)}}return f}},operators:{"=":function(d,c){return d==c},"!=":function(d,c){return d!=c},"^=":function(d,c){return d==c||d&&d.startsWith(c)},"$=":function(d,c){return d==c||d&&d.endsWith(c)},"*=":function(d,c){return d==c||d&&d.include(c)},"$=":function(d,c){return d.endsWith(c)},"*=":function(d,c){return d.include(c)},"~=":function(d,c){return(" "+d+" ").include(" "+c+" ")},"|=":function(d,c){return("-"+(d||"").toUpperCase()+"-").include("-"+(c||"").toUpperCase()+"-")}},split:function(d){var c=[];d.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(f){c.push(f[1].strip())});return c},matchElements:function(l,m){var k=$$(m),g=Selector.handlers;g.mark(k);for(var f=0,d=[],c;c=l[f];f++){if(c._countedByPrototype){d.push(c)}}g.unmark(k);return d},findElement:function(d,f,c){if(Object.isNumber(f)){c=f;f=false}return Selector.matchElements(d,f||"*")[c||0]},findChildElements:function(k,n){n=Selector.split(n.join(","));var g=[],m=Selector.handlers;for(var f=0,d=n.length,c;f<d;f++){c=new Selector(n[f].strip());m.concat(g,c.findElements(k))}return(d>1)?m.unique(g):g}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(d,c){for(var f=0,g;g=c[f];f++){if(g.tagName!=="!"){d.push(g)}}return d},unmark:function(c){for(var d=0,f;f=c[d];d++){f.removeAttribute("_countedByPrototype")}return c}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(c){$(c).reset();return c},serializeElements:function(m,d){if(typeof d!="object"){d={hash:!!d}}else{if(Object.isUndefined(d.hash)){d.hash=true}}var f,l,c=false,k=d.submit;var g=m.inject({},function(n,o){if(!o.disabled&&o.name){f=o.name;l=$(o).getValue();if(l!=null&&o.type!="file"&&(o.type!="submit"||(!c&&k!==false&&(!k||f==k)&&(c=true)))){if(f in n){if(!Object.isArray(n[f])){n[f]=[n[f]]}n[f].push(l)}else{n[f]=l}}}return n});return d.hash?g:Object.toQueryString(g)}};Form.Methods={serialize:function(d,c){return Form.serializeElements(Form.getElements(d),c)},getElements:function(c){return $A($(c).getElementsByTagName("*")).inject([],function(d,f){if(Form.Element.Serializers[f.tagName.toLowerCase()]){d.push(Element.extend(f))}return d})},getInputs:function(m,f,g){m=$(m);var c=m.getElementsByTagName("input");if(!f&&!g){return $A(c).map(Element.extend)}for(var k=0,n=[],l=c.length;k<l;k++){var d=c[k];if((f&&d.type!=f)||(g&&d.name!=g)){continue}n.push(Element.extend(d))}return n},disable:function(c){c=$(c);Form.getElements(c).invoke("disable");return c},enable:function(c){c=$(c);Form.getElements(c).invoke("enable");return c},findFirstElement:function(d){var f=$(d).getElements().findAll(function(g){return"hidden"!=g.type&&!g.disabled});var c=f.findAll(function(g){return g.hasAttribute("tabIndex")&&g.tabIndex>=0}).sortBy(function(g){return g.tabIndex}).first();return c?c:f.find(function(g){return["input","select","textarea"].include(g.tagName.toLowerCase())})},focusFirstElement:function(c){c=$(c);c.findFirstElement().activate();return c},request:function(d,c){d=$(d),c=Object.clone(c||{});var g=c.parameters,f=d.readAttribute("action")||"";if(f.blank()){f=window.location.href}c.parameters=d.serialize(true);if(g){if(Object.isString(g)){g=g.toQueryParams()}Object.extend(c.parameters,g)}if(d.hasAttribute("method")&&!c.method){c.method=d.method}return new Ajax.Request(f,c)}};Form.Element={focus:function(c){$(c).focus();return c},select:function(c){$(c).select();return c}};Form.Element.Methods={serialize:function(c){c=$(c);if(!c.disabled&&c.name){var d=c.getValue();if(d!=undefined){var f={};f[c.name]=d;return Object.toQueryString(f)}}return""},getValue:function(c){c=$(c);var d=c.tagName.toLowerCase();return Form.Element.Serializers[d](c)},setValue:function(c,d){c=$(c);var f=c.tagName.toLowerCase();Form.Element.Serializers[f](c,d);return c},clear:function(c){$(c).value="";return c},present:function(c){return $(c).value!=""},activate:function(c){c=$(c);try{c.focus();if(c.select&&(c.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(c.type))){c.select()}}catch(d){}return c},disable:function(c){c=$(c);c.disabled=true;return c},enable:function(c){c=$(c);c.disabled=false;return c}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(c,d){switch(c.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(c,d);default:return Form.Element.Serializers.textarea(c,d)}},inputSelector:function(c,d){if(Object.isUndefined(d)){return c.checked?c.value:null}else{c.checked=!!d}},textarea:function(c,d){if(Object.isUndefined(d)){return c.value}else{c.value=d}},select:function(f,l){if(Object.isUndefined(l)){return this[f.type=="select-one"?"selectOne":"selectMany"](f)}else{var d,g,m=!Object.isArray(l);for(var c=0,k=f.length;c<k;c++){d=f.options[c];g=this.optionValue(d);if(m){if(g==l){d.selected=true;return}}else{d.selected=l.include(g)}}}},selectOne:function(d){var c=d.selectedIndex;return c>=0?this.optionValue(d.options[c]):null},selectMany:function(g){var c,k=g.length;if(!k){return null}for(var f=0,c=[];f<k;f++){var d=g.options[f];if(d.selected){c.push(this.optionValue(d))}}return c},optionValue:function(c){return Element.extend(c).hasAttribute("value")?c.value:c.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,c,d,f){$super(f,d);this.element=$(c);this.lastValue=this.getValue()},execute:function(){var c=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(c)?this.lastValue!=c:String(this.lastValue)!=String(c)){this.callback(this.element,c);this.lastValue=c}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(c,d){this.element=$(c);this.callback=d;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var c=this.getValue();if(this.lastValue!=c){this.callback(this.element,c);this.lastValue=c}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(c){if(c.type){switch(c.type.toLowerCase()){case"checkbox":case"radio":Event.observe(c,"click",this.onElementEvent.bind(this));break;default:Event.observe(c,"change",this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event={}}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(d){var c;switch(d.type){case"mouseover":c=d.fromElement;break;case"mouseout":c=d.toElement;break;default:return null}return Element.extend(c)}});Event.Methods=(function(){var c;if(Prototype.Browser.IE){var d={0:1,1:4,2:2};c=function(g,f){return g.button==d[f]}}else{if(Prototype.Browser.WebKit){c=function(g,f){switch(f){case 0:return g.which==1&&!g.metaKey;case 1:return g.which==1&&g.metaKey;default:return false}}}else{c=function(g,f){return g.which?(g.which===f+1):(g.button===f)}}}return{isLeftClick:function(f){return c(f,0)},isMiddleClick:function(f){return c(f,1)},isRightClick:function(f){return c(f,2)},element:function(k){k=Event.extend(k);var g=k.target,f=k.type,l=k.currentTarget;if(l&&l.tagName){if(f==="load"||f==="error"||(f==="click"&&l.tagName.toLowerCase()==="input"&&l.type==="radio")){g=l}}if(g.nodeType==Node.TEXT_NODE){g=g.parentNode}return Element.extend(g)},findElement:function(g,l){var f=Event.element(g);if(!l){return f}var k=[f].concat(f.ancestors());return Selector.findElement(k,l,0)},pointer:function(k){var g=document.documentElement,f=document.body||{scrollLeft:0,scrollTop:0};return{x:k.pageX||(k.clientX+(g.scrollLeft||f.scrollLeft)-(g.clientLeft||0)),y:k.pageY||(k.clientY+(g.scrollTop||f.scrollTop)-(g.clientTop||0))}},pointerX:function(f){return Event.pointer(f).x},pointerY:function(f){return Event.pointer(f).y},stop:function(f){Event.extend(f);f.preventDefault();f.stopPropagation();f.stopped=true}}})();Event.extend=(function(){var c=Object.keys(Event.Methods).inject({},function(d,f){d[f]=Event.Methods[f].methodize();return d});if(Prototype.Browser.IE){Object.extend(c,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(d){if(!d){return false}if(d._extendedByPrototype){return d}d._extendedByPrototype=Prototype.emptyFunction;var f=Event.pointer(d);Object.extend(d,{target:d.srcElement,relatedTarget:Event.relatedTarget(d),pageX:f.x,pageY:f.y});return Object.extend(d,c)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents")["__proto__"];Object.extend(Event.prototype,c);return Prototype.K}})();Object.extend(Event,(function(){var d=Event.cache;function f(p){if(p._prototypeEventID){return p._prototypeEventID[0]}arguments.callee.id=arguments.callee.id||1;return p._prototypeEventID=[++arguments.callee.id]}function m(p){if(p&&p.include(":")){return"dataavailable"}return p}function c(p){return d[p]=d[p]||{}}function l(r,p){var q=c(r);return q[p]=q[p]||[]}function n(q,p,r){var v=f(q);var u=l(v,p);if(u.pluck("handler").include(r)){return false}var t=function(x){if(!Event||!Event.extend||(x.eventName&&x.eventName!=p)){return false}Event.extend(x);r.call(q,x)};t.handler=r;u.push(t);return t}function o(t,p,q){var r=l(t,p);return r.find(function(u){return u.handler==q})}function g(t,p,q){var r=c(t);if(!r[p]){return false}r[p]=r[p].without(o(t,p,q))}function k(){for(var q in d){for(var p in d[q]){d[q][p]=null}}}if(window.attachEvent){window.attachEvent("onunload",k)}if(Prototype.Browser.WebKit){window.addEventListener("unload",Prototype.emptyFunction,false)}return{observe:function(r,p,t){r=$(r);var q=m(p);var u=n(r,p,t);if(!u){return r}if(r.addEventListener){r.addEventListener(q,u,false)}else{r.attachEvent("on"+q,u)}return r},stopObserving:function(r,p,t){r=$(r);var v=f(r),q=m(p);if(!t&&p){l(v,p).each(function(x){r.stopObserving(p,x.handler)});return r}else{if(!p){Object.keys(c(v)).each(function(x){r.stopObserving(x)});return r}}var u=o(v,p,t);if(!u){return r}if(r.removeEventListener){r.removeEventListener(q,u,false)}else{r.detachEvent("on"+q,u)}g(v,p,t);return r},fire:function(r,q,p){r=$(r);if(r==document&&document.createEvent&&!r.dispatchEvent){r=document.documentElement}var t;if(document.createEvent){t=document.createEvent("HTMLEvents");t.initEvent("dataavailable",true,true)}else{t=document.createEventObject();t.eventType="ondataavailable"}t.eventName=q;t.memo=p||{};if(document.createEvent){r.dispatchEvent(t)}else{r.fireEvent(t.eventType,t)}return Event.extend(t)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var d;function c(){if(document.loaded){return}if(d){window.clearInterval(d)}document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){d=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){c()}},0);Event.observe(window,"load",c)}else{document.addEventListener("DOMContentLoaded",c,false)}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;c()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(c,d){return Element.insert(c,{before:d})},Top:function(c,d){return Element.insert(c,{top:d})},Bottom:function(c,d){return Element.insert(c,{bottom:d})},After:function(c,d){return Element.insert(c,{after:d})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(d,c,f){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(d,c,f)}this.xcomp=c;this.ycomp=f;this.offset=Element.cumulativeOffset(d);return(f>=this.offset[1]&&f<this.offset[1]+d.offsetHeight&&c>=this.offset[0]&&c<this.offset[0]+d.offsetWidth)},withinIncludingScrolloffsets:function(d,c,g){var f=Element.cumulativeScrollOffset(d);this.xcomp=c+f[0]-this.deltaX;this.ycomp=g+f[1]-this.deltaY;this.offset=Element.cumulativeOffset(d);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+d.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+d.offsetWidth)},overlap:function(d,c){if(!d){return 0}if(d=="vertical"){return((this.offset[1]+c.offsetHeight)-this.ycomp)/c.offsetHeight}if(d=="horizontal"){return((this.offset[0]+c.offsetWidth)-this.xcomp)/c.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(c){Position.prepare();return Element.absolutize(c)},relativize:function(c){Position.prepare();return Element.relativize(c)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(d,f,c){c=c||{};return Element.clonePosition(f,d,c)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(d){function c(f){return f.blank()?null:"[contains(concat(' ', @class, ' '), ' "+f+" ')]"}d.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(f,k){k=k.toString().strip();var g=/\s/.test(k)?$w(k).map(c).join(""):c(k);return g?document._getElementsByXPath(".//*"+g,f):[]}:function(k,l){l=l.toString().strip();var m=[],n=(/\s/.test(l)?$w(l):null);if(!n&&!l){return m}var f=$(k).getElementsByTagName("*");l=" "+l+" ";for(var g=0,p,o;p=f[g];g++){if(p.className&&(o=" "+p.className+" ")&&(o.include(l)||(n&&n.all(function(q){return !q.toString().blank()&&o.include(" "+q+" ")})))){m.push(Element.extend(p))}}return m};return function(g,f){return $(f||document.body).getElementsByClassName(g)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(c){this.element=$(c)},_each:function(c){this.element.className.split(/\s+/).select(function(d){return d.length>0})._each(c)},set:function(c){this.element.className=c},add:function(c){if(this.include(c)){return}this.set($A(this).concat(c).join(" "))},remove:function(c){if(!this.include(c)){return}this.set($A(this).without(c).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var c;var d;var f;try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");c=d.GetVariable("$version")}catch(f){}if(!c){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");c="WIN 6,0,21,0";d.AllowScriptAccess="always";c=d.GetVariable("$version")}catch(f){}}if(!c){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");c=d.GetVariable("$version")}catch(f){}}if(!c){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");c="WIN 3,0,18,0"}catch(f){}}if(!c){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");c="WIN 2,0,0,11"}catch(f){c=-1}}return c}function GetSwfVer(){var m=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var l=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var c=navigator.plugins["Shockwave Flash"+l].description;var k=c.split(" ");var f=k[2].split(".");var n=f[0];var d=f[1];var g=k[3];if(g==""){g=k[4]}if(g[0]=="d"){g=g.substring(1)}else{if(g[0]=="r"){g=g.substring(1);if(g.indexOf("d")>0){g=g.substring(0,g.indexOf("d"))}}}var m=n+"."+d+"."+g}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){m=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){m=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){m=2}else{if(isIE&&isWin&&!isOpera){m=ControlVersion()}}}}}return m}function DetectFlashVer(l,g,f){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var k=versionArray[0];var c=versionArray[1];var d=versionArray[2];if(k>parseFloat(l)){return true}else{if(k==parseFloat(l)){if(c>parseFloat(g)){return true}else{if(c==parseFloat(g)){if(d>=parseFloat(f)){return true}}}}}return false}}}Array.prototype.remove=function(d){var c=this.indexOf(d);if(c!=-1){this.splice(c,1)}};function show_add_photoset_div(){document.getElementById("divErr2").innerHTML="";document.getElementById("addphotoset").reset();document.getElementById("add_photoset").style.display="block"}function close_photoset_div(){document.getElementById("addphotoset").reset();reloadCaptcha_addphotoset();document.getElementById("add_photoset").style.display="none";return false}function close_photosetedit_div(){document.getElementById("editphotoset").reset();reloadCaptcha_editphotoset();document.getElementById("edit_photo").style.display="none";return false}function reset_photosetform(){document.getElementById("addphotoset").reset();window.frames.upload_frame.location.href="upload_photoset_icon.php";reloadCaptcha_addphotoset()}function add_photoset_detail(c,d){$("ajxLoader1").show();$(c).request({action:d,method:"post",parameters:{actionType:"ADD_PHOTOSET"},onSuccess:handlePhotoSetActionResponse,onException:handleActionError})}function handlePhotoSetActionResponse(d){data=d.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){close_photoset_div();var c=document.getElementById("channel_id_photoset").value;if(c==""){location.href="photosets.php"}else{location.href="photosets.php?chid="+c}}else{document.getElementById("divErr2").innerHTML=data.MESSAGE;reloadCaptcha_addphotoset()}$("ajxLoader1").hide()}}function handleActionError(c){document.getElementById("divErr2").innerHTML="Error processing: Please try later.";reloadCaptcha_addphotoset();$("ajxLoader1").hide()}function edit_photoset_detail(c,d){$("ajxLoader2").show();$(c).request({action:d,method:"post",parameters:{actionType:"EDIT_PHOTOSET"},onSuccess:handlePhotoSetEditActionResponse,onException:handleEditActionError})}function handlePhotoSetEditActionResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.location.href="my_photosets.php?action=editphotoset"}else{document.getElementById("divErr3").innerHTML=data.MESSAGE;reloadCaptcha_editphotoset()}$("ajxLoader2").hide()}}function handleEditActionError(c){document.getElementById("divErr3").innerHTML="Error processing: Please try later.";reloadCaptcha_editphotoset();$("ajxLoader2").hide()}function editPhotoSet(c){document.getElementById("divErr3").innerHTML="";document.getElementById("editphotoset").reset();document.getElementById("edit_photo").style.display="block";document.getElementById("psid").value=c.value;document.getElementById("edit_bg_pic_file").value=c.value+".jpg";populatePhotoSetdetail(c.value)}function populatePhotoSetdetail(d){var c=document.getElementById("editPsetForm");var f="photoset_operations.php";$("ajxLoader2").show();$(c).request({action:f,method:"post",parameters:{actionType:"POPULATE_PSDETAILS",psid:d},onSuccess:handlePSdetailsResponse,onException:handlePSdetailsError})}function handlePSdetailsResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){putPhotoSetData(data.MESSAGE)}else{document.getElementById("divErr3").innerHTML=data.MESSAGE;reloadCaptcha_editphotoset()}$("ajxLoader2").hide()}}function handlePSdetailsError(c){document.getElementById("divErr3").innerHTML="Error processing: Please try later.";reloadCaptcha_editphotoset();$("ajxLoader2").hide()}function putPhotoSetData(d){var f=d.split("%");document.getElementById("edit_title").value=f[0];document.getElementById("edit_description").value=f[1];document.getElementById("edit_tags").value=f[2];var c=f[3].split("|");c.remove("0");c.remove("0");if(c.length>1){document.getElementById("edit_mychannels").value="all"}else{document.getElementById("edit_mychannels").value=c}if(f[4]==1){document.getElementById("edit_mostrecent").checked=true}else{document.getElementById("edit_mostrecent").checked=false}document.getElementById("photosets_pics_div").innerHTML=f[6]}function reloadCaptcha_addphotoset(){document.getElementById("imgCaptcha2").src="captcha.php?forsec=psadd&"+Math.random()}function reloadCaptcha_editphotoset(){document.getElementById("imgCaptcha3").src="captcha.php?forsec=psedit"+Math.random()}function select_all_images(d,c){if(d=="select"){if(c=="add"){document.getElementById("deselect").style.display="";document.getElementById("select").style.display="none";for(i=1;i<=document.getElementById("my_imgcount").value;i++){document.getElementById("img_checkbox"+i).checked=true}}else{document.getElementById("editdeselect").style.display="";document.getElementById("editselect").style.display="none";for(i=1;i<=document.getElementById("edit_my_imgcount").value;i++){document.getElementById("edit_img_checkbox"+i).checked=true}}}else{if(c=="add"){document.getElementById("deselect").style.display="none";document.getElementById("select").style.display="";for(i=1;i<=document.getElementById("my_imgcount").value;i++){document.getElementById("img_checkbox"+i).checked=false}}else{document.getElementById("editdeselect").style.display="none";document.getElementById("editselect").style.display="";for(i=1;i<=document.getElementById("edit_my_imgcount").value;i++){document.getElementById("edit_img_checkbox"+i).checked=false}}}}function manipulateRatingPhotoset(d,c){document.getElementById("hdnRate").value=d;for(i=2;i<=d;i=i+2){document.getElementById("image"+i).src=c+"/tpl_icon_star_full.gif"}for(i=parseInt(d)+2;i<=10;i=i+2){document.getElementById("image"+i).src=c+"/tpl_icon_star_empty.gif"}}function clearRating(){for(i=2;i<=10;i=i+2){document.getElementById("img"+i).src=imgurl+"/tpl_icon_star_empty.gif"}}function manipulateRatingPhotoset2(d,c){document.getElementById("hdnRate").value=d;for(i=2;i<=d;i=i+2){document.getElementById("img"+i).src=c+"/tpl_icon_star_full.gif"}for(i=parseInt(d)+2;i<=10;i=i+2){document.getElementById("img"+i).src=c+"/tpl_icon_star_empty.gif"}}function addComment(){document.getElementById("divErr").innerHTML="";document.getElementById("photostComment").value="";rate_comment_view_pic(0);$("ajaxLoaderPhotoset").hide();if(document.getElementById("divReport")){document.getElementById("divReport").style.display="none"}document.getElementById("divComment").style.display="block";document.getElementById("hdnRate").value="";document.getElementById("photosetCommentCapcha").value="";document.getElementById("photostComment").value="";location.href="#photoset_comment"}function postCommentPhotoset(c,d){$("ajaxLoaderPhotoset").show();$(c).request({action:d,method:"post",parameters:{actionType:"POST_COMMENT"},onSuccess:handleCommentResponsephotoset,onException:handleCommentError_photoset_comment})}function handleCommentResponsephotoset(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divResultset").innerHTML=data.UPDATEDATA;document.getElementById("divStatus").innerHTML=data.MESSAGE;rate_comment_view_pic(0);reloadPicCommentCaptcha();closeDivComment()}else{document.getElementById("divErr").innerHTML=data.MESSAGE;reloadPicCommentCaptcha()}$("ajaxLoaderPhotoset").hide()}}function handleCommentError_photoset_comment(c){document.getElementById("divErr").innerHTML="Error processing: Please try later.";reloadPicCommentCaptcha();$("ajaxLoaderPhotoset").hide()}function reloadPicCommentCaptcha(){document.getElementById("picCommentCaptcha").src="captcha.php?forsec=vpscom&"+Math.random()}function closeDivComment(){document.getElementById("divComment").style.display="none"}function reportComment(d,c){document.getElementById("divErr2").innerHTML="";document.getElementById("hdnTOUID").value=d;$("ajaxLoader2").hide();if(document.getElementById("divComment")){document.getElementById("divComment").style.display="none"}document.getElementById("divReport").style.display="block";document.getElementById("frmReport").reset();document.getElementById("hdnCID").value=d;document.getElementById("hdnTOUID").value=c;location.href="#pic_report"}function closeDivReport(){document.getElementById("divReport").style.display="none"}function postReport(c,d){$("ajaxLoader2").show();$(c).request({action:d,method:"post",parameters:{actionType:"POST_REPORT"},onSuccess:handleReportResponse,onException:handleReportError})}function handleReportResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divStatus").innerHTML=data.MESSAGE;closeDivReport()}else{document.getElementById("divErr2").innerHTML=data.MESSAGE}$("ajaxLoader2").hide()}}function handleReportError(c){document.getElementById("divErr2").innerHTML="Error processing: Please try later.";$("ajaxLoader2").hide()}function delPicComment(g,c){var d="";path="photoset_operations.php?actionType=DELETE_COMMENT&cid="+g+"&vid="+c;var f=new Ajax.Request(path,{method:"post",parameters:d,onSuccess:handleDelPicCommentResponse})}function handleDelPicCommentResponse(c){data=c.responseText.evalJSON();if(data.MESSAGE=="PAGE_RELOAD"){location.reload()}else{if(data.STATUS=="SUCCESS"){document.getElementById("divStatus").innerHTML=data.MESSAGE;document.getElementById("divResultset").innerHTML=data.UPDATEDATA}else{document.getElementById("divStatus").innerHTML="Error in deleting Comment."}}}function getRelatedPhotoset(k,c,f){var d;var g=new Ajax.Request("view_photoset.php?action=GetPHOTOSET&cat="+k+"&viewkey="+c+"&UID="+f,{method:"post",parameters:d,onSuccess:populatePhotosetList})}function populatePhotosetList(c){data=c.responseText;document.getElementById("Related_Pics").innerHTML=data}var addtoLayout="";var addtoMethod=1;var txtVersion="0.1";var addtoInterval=null;var popupWin="";function truncate(f,d,c){if(typeof d=="undefined"){var d=100}if(typeof c=="undefined"){var c="..."}if(f.length<d){return f}else{return f.substr(0,d)+c}}switch(addtoLayout){case 0:document.write('<div class="addToContent"><dl class="addTo"><dd><span title="Learn about Social Bookmarking" class="addToAbout" onclick');document.write('="addto(0)">ADD TO:</span></dd><dd><span title="Add this page to Blink"  onclick="addto(1)"><img src="modules/bookmarks/AddTo_Blin');document.write('k.gif" width="16" height="16" border="0" />Blink</span></dd><dd><span title="Add this page to Delicious" onclick="addto');document.write('(2)"><img src="modules/bookmarks/AddTo_Delicious.gif" width="16" height="16" border="0" />Del.icio.us</span></dd><dd><span title="');document.write('Add this page to Digg" onclick="addto(3)"><img src="modules/bookmarks/AddTo_Digg.gif" width="16" height="16" border="0" />Digg</spa');document.write('n></dd><dd><span title="Add this page to Furl" onclick="addto(4)"><img src="modules/bookmarks/AddTo_Furl.gif" width="16" height="1');document.write('6" border="0" />Furl</span></dd><dd><span title="Add this page to Google" onclick="addto(5)"><img src="modules/bookmarks/AddTo_Goo');document.write('gle.gif" width="16" height="16" border="0" />Google</span></dd><dd><span title="Add this page to Simpy" onclick="addto(');document.write('6)"><img src="modules/bookmarks/AddTo_Simpy.gif" width="16" height="16" border="0" />Simpy</span></dd><dd><span title="Add this pa');document.write('ge to Spurl" onclick="addto(8)"><img src="modules/bookmarks/AddTo_Spurl.gif" width="16" height="16" border="0" />Spurl</span></dd>');document.write('<dd><span title="Add this page to Yahoo! MyWeb" onclick="addto(7)"><img src="modules/bookmarks/AddTo_Yahoo.gif" width="16" height="');document.write('16" border="0" />Y! MyWeb</span></dd></dl></div>');break;case 1:document.write('<div class="addToContent"><div class="addTo2Row"><div class="addToHeader" onclick="addto(0)">ADD THIS TO YOUR SOCIAL BO');document.write('OKMARKS</div><div class="addToFloat"><span title="Add this page to Blink"  onclick="addto(1)"><img src="modules/bookmarks/AddTo_Bl');document.write('ink.gif" width="16" height="16" border="0" /> Blink</span><br /><span title="Add this page to Delicious" onclick="addto');document.write('(2)"><img src="modules/bookmarks/AddTo_Delicious.gif" width="16" height="16" border="0" /> Del.icio.us</span></div><div class="add');document.write('ToFloat"><span title="Add this page to Digg" onclick="addto(3)"><img src="modules/bookmarks/AddTo_Digg.gif" width="16" height="16" ');document.write('border="0" /> Digg</span><br /><span title="Add this page to Furl" onclick="addto(4)"><img src="modules/bookmarks/AddTo_Furl.gif" ');document.write('width="16" height="16" border="0" /> Furl</span></div><div class="addToFloat"><span title="Add this page to Google" onc');document.write('lick="addto(5)"><img src="modules/bookmarks/AddTo_Google.gif" width="16" height="16" border="0" /> Google</span><br /><span title=');document.write('"Add this page to Simpy" onclick="addto(6)"><img src="modules/bookmarks/AddTo_Simpy.gif" width="16" height="16" border="0" />Simpy<');document.write('/span></div><div class="addToFloat"><span title="Add this page to Spurl" onclick="addto(8)"><img src="modules/bookmarks/AddTo_Spur');document.write('l.gif" width="16" height="16" border="0" />Spurl</span><br /><span title="Add this page to Yahoo! MyWeb" onclick="addto');document.write('(7)"><img src="modules/bookmarks/AddTo_Yahoo.gif" width="16" height="16" border="0" /> Y! MyWeb</span><br /></div></div></div>');break;case 2:document.write('<div class="addToContent"><dl class="addToV"><dd><span title="Learn about Social Bookmarking" class="addToAbout" onclic');document.write('k="addto(0)">ADD TO:</span></dd><dd><span title="Add this page to Blink"  onclick="addto(1)"><img src="modules/bookmarks/AddTo_Bli');document.write('nk.gif" width="16" height="16" border="0" />Blink</span></dd><dd><span title="Add this page to Delicious" onclick="addt');document.write('o(2)"><img src="modules/bookmarks/AddTo_Delicious.gif" width="16" height="16" border="0" />Del.icio.us</span></dd><dd><span title=');document.write('"Add this page to Digg" onclick="addto(3)"><img src="modules/bookmarks/AddTo_Digg.gif" width="16" height="16" border="0" />Digg</sp');document.write('an></dd><dd><span title="Add this page to Furl" onclick="addto(4)"><img src="modules/bookmarks/AddTo_Furl.gif" width="16" height="');document.write('16" border="0" />Furl</span></dd><dd><span title="Add this page to Google" onclick="addto(5)"><img src="modules/bookmarks/AddTo_Go');document.write('ogle.gif" width="16" height="16" border="0" />Google</span></dd><dd><span title="Add this page to Simpy" onclick="addto');document.write('(6)"><img src="modules/bookmarks/AddTo_Simpy.gif" width="16" height="16" border="0" />Simpy</span></dd><dd><span title="Add this p');document.write('age to Spurl" onclick="addto(8)"><img src="modules/bookmarks/AddTo_Spurl.gif" width="16" height="16" border="0" />Spurl</span></dd>');document.write('<dd><span title="Add this page to Yahoo! MyWeb" onclick="addto(7)"><img src="modules/bookmarks/AddTo_Yahoo.gif" width="16" height=');document.write('"16" border="0" />Y! MyWeb</span></dd></dl></div>');break;case 3:document.write('<div class="addToContent"><dl class="addToVNoImg"><dd><span title="Learn about Social Bookmarking" class="addToAbout" o');document.write('nclick="addto(0)">ADD TO:</span></dd><dd><span title="Add this page to Blink" onclick="addto(1)">Blink</span></dd><dd>');document.write('<span title="Add this page to Delicious" onclick="addto(2)">Del.icio.us</span></dd><dd><span title="Add this page to Di');document.write('gg" onclick="addto(3)">Digg</span></dd><dd><span title="Add this page to Furl" onclick="addto(4)">Furl</span></dd><dd>');document.write('<span title="Add this page to Google" onclick="addto(5)">Google</span></dd><dd><span title="Add this page to Simpy" onc');document.write('lick="addto(6)">Simpy</span></dd><dd><span title="Add this page to Spurl" onclick="addto(8)">Spurl</span></dd><dd><spa');document.write('n title="Add this page to Yahoo! MyWeb" onclick="addto(7)">Y! MyWeb</span></dd></dl></div>');break;default:}function addtoWin(c){if(!popupWin.closed&&popupWin.location){popupWin.location.href=c}else{popupWin=window.open(c,"addtoPopUp","width=770px,height=500px,status=0,location=0,resizable=1,scrollbars=1,left=0,top=100");if(!popupWin.opener){popupWin.opener=self}}if(window.focus){popupWin.focus()}return false}function closeAddTo(){if(!popupWin.closed&&popupWin.location){if(popupWin.location.href==AddURL){popupWin.close()}}else{clearInterval(addtoInterval);return true}}function addto(g){switch(g){case"myspace":var d="http://www.myspace.com/index.cfm?fuseaction=postto&";var c="u";var n="t";var m="";var l="";var f="&c="+EmbedCode+"&l=";break;case"facebook":var d="http://www.facebook.com/share.php?";var c="u";var n="t";var m="";var l="";var f="";break;case"delicio":var d="http://del.icio.us/save?v=5&noui=yes&jump=close&";var c="url";var n="title";var m="";var l="";var f="";break;case"digg":var d="http://digg.com/submit?";var c="url";var n="title";var m="";var l="";var f="";break;case"stumbleupon":var d="http://www.stumbleupon.com/submit?";var c="url";var n="title";var m="";var l="";var f="";break;case"googleBookMarks":var d="http://www.google.com/bookmarks/mark?op=edit&output=popup&";var c="bkmk";var n="title";var m="";var l="";var f="";break;case"WindowsLive":var d="https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&";var c="url";var n="title";var m="";var l="";var f="";break;case"reddit":var d="http://reddit.com/submit?";var c="url";var n="title";var m="";var l="";var f="";break;case"twitter":var d="http://twitter.com/home?";var c="status";var n="";var m="";var l="";var f="";break;default:}if(g=="twitter"){var k=d+c+"="+truncate(AddTitle,100)+" "+AddURL}else{var k=d+c+"="+AddURL+"&"+n+"="+AddTitle+f}if(m!=""){var k=k+"&"+m+"="+AddTitle}if(l!=""){var k=k+"&"+l+"="+AddURL}switch(addtoMethod){case 0:self.location=k;break;case 1:addtoWin(k);break;default:}return true}function addto_editorspick(l,k,n,f){switch(l){case"myspace":var m="http://www.myspace.com/index.cfm?fuseaction=postto&";var d="u";var c="t";var p="";var q="";var g="&c="+f+"&l=";break;case"facebook":var m="http://www.facebook.com/share.php?";var d="u";var c="t";var p="";var q="";var g="";break;case"delicio":var m="http://del.icio.us/save?v=5&noui=yes&jump=close&";var d="url";var c="title";var p="";var q="";var g="";break;case"digg":var m="http://digg.com/submit?";var d="url";var c="title";var p="";var q="";var g="";break;case"stumbleupon":var m="http://www.stumbleupon.com/submit?";var d="url";var c="title";var p="";var q="";var g="";break;case"googleBookMarks":var m="http://www.google.com/bookmarks/mark?op=edit&output=popup&";var d="bkmk";var c="title";var p="";var q="";var g="";break;case"windowsLive":var m="https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&";var d="url";var c="title";var p="";var q="";var g="";break;case"reddit":var m="http://reddit.com/submit?";var d="url";var c="title";var p="";var q="";var g="";break;case"twitter":var m="http://twitter.com/home?";var d="status";var c="";var p="";var q="";var g="";break;default:}if(l=="twitter"){var o=m+d+"="+truncate(n,100)+" "+k}else{var o=m+d+"="+k+"&"+c+"="+n+g}if(p!=""){var o=o+"&"+p+"="+n}if(q!=""){var o=o+"&"+q+"="+k}switch(addtoMethod){case 0:self.location=o;break;case 1:addtoWin(o);break;default:}return true}function addtopicture(g){switch(g){case"myspace":var d="http://www.myspace.com/index.cfm?fuseaction=postto&";var c="u";var n="t";var m="";var l="";var f="&c=&l=";break;case"facebook":var d="http://www.facebook.com/share.php?";var c="u";var n="t";var m="";var l="";var f="";break;case"delicio":var d="http://del.icio.us/save?v=5&noui=yes&jump=close&";var c="url";var n="title";var m="";var l="";var f="";break;case"digg":var d="http://digg.com/submit?";var c="url";var n="title";var m="";var l="";var f="";break;case"stumbleupon":var d="http://www.stumbleupon.com/submit?";var c="url";var n="title";var m="";var l="";var f="";break;case"googleBookMarks":var d="http://www.google.com/bookmarks/mark?op=edit&output=popup&";var c="bkmk";var n="title";var m="";var l="";var f="";break;case"WindowsLive":var d="https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&";var c="url";var n="title";var m="";var l="";var f="";break;case"reddit":var d="http://reddit.com/submit?";var c="url";var n="title";var m="";var l="";var f="";break;case"twitter":var d="http://twitter.com/home?";var c="status";var n="";var m="";var l="";var f="";break;default:}if(g=="twitter"){var k=d+c+"="+truncate(AddTitle,100)+" "+AddURL}else{var k=d+c+"="+AddURL+"&"+n+"="+AddTitle+f}if(m!=""){var k=k+"&"+m+"="+AddTitle}if(l!=""){var k=k+"&"+l+"="+AddURL}switch(addtoMethod){case 0:self.location=k;break;case 1:addtoWin(k);break;default:}return true}function handleError(){return true}window.onerror=handleError;function LightOut(){var c=/MSIE \d+.\d+/;if(document.getElementById("lightsout").style.display=="none"){document.getElementById("lightsout").style.display="block";if(player_id=="FLASH"&&navigator.appVersion.match(c)){document.getElementById("video_player_div").style.position="relative"}if(navigator.appVersion.match(c)){document.getElementById("TOP_MENU").style.zIndex="";document.getElementById("UPLOAD_TEXT").style.zIndex="";if(is_login==0){document.getElementById("LANG").style.zIndex=""}else{document.getElementById("LANG_LOGIN").style.zIndex="";document.getElementById("CP_TEXT").style.zIndex="";document.getElementById("BOTTOM_CONTROL_HOLDER").style.zIndex=""}}document.getElementById("video_player_div").style.zIndex="20000"}else{document.getElementById("lightsout").style.display="none";if(player_id=="FLASH"&&navigator.appVersion.match(c)){document.getElementById("video_player_div").style.position=""}if(navigator.appVersion.match(c)){document.getElementById("TOP_MENU").style.zIndex="30";document.getElementById("UPLOAD_TEXT").style.zIndex="30";if(is_login==0){document.getElementById("LANG").style.zIndex="30"}else{document.getElementById("LANG_LOGIN").style.zIndex="30";document.getElementById("CP_TEXT").style.zIndex="30";document.getElementById("BOTTOM_CONTROL_HOLDER").style.zIndex="1000"}}document.getElementById("video_player_div").style.zIndex="2";thisMovie(player_id).sendTextToFlash("lightIn")}}function copyEmbedCode(){var c=/MSIE \d+.\d+/;if(navigator.appVersion.match(c)){window.clipboardData.setData("Text",decodeURIComponent(EmbedCode))}else{thisMovie("copyembedcode").sendTextToFlash(decodeURIComponent(EmbedCode))}};