
function setLinkCookie(linkID)
{if(getCookie("auxiliary")==null||getCookie("auxiliary")=="")
{document.cookie="auxiliary="+escape(linkID)+";path=/;domain=batanga.com";}
return true;}
function resetLinkCookie()
{document.cookie="auxiliary=;path=/;domain=batanga.com;expires=Thu, 01-Jan-1970 00:00:01 GMT";return true;}
function addFavorites(){var title="Batanga: Videos y Radio";var url="http://www.batanga.com";if(window.sidebar){window.sidebar.addPanel(title,url,"");}else if(window.external){window.external.AddFavorite(url,title);}else if(window.opera&&window.print){return true;}}
function OpenMyRadioURL(URL)
{window.open(URL,'LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=430,height=745');}
function OpenMyRadio(PlaylistID)
{OpenMyRadioURL('./Player/player.aspx?PlaylistID='+PlaylistID);}
function ShowDetailError(spanID)
{var spanTag=document.getElementById(spanID);if(spanTag.style.display=="")
spanTag.style.display="none";else
spanTag.style.display="";}
function OpenPlaylistBrowser(PlaylistID)
{window.open('http://music.batanga.com/'+languageId+'/MyRadio/PlaylistEditor/GeneratePlayList.asp?PlaylistID='+PlaylistID,'BrowserMain','width=1000,height=700');}
function OpenHelp()
{window.open('http://myradio.batanga.com/Help.html');}
function AskBeforeDelete(PlaylistID)
{if(confirm('Are you sure you want to delete this radio station?'))
{document.getElementById("ctl00_theContent_delete1").value=PlaylistID;return true;}
else
{document.getElementById("ctl00_theContent_delete1").value=-1;return false;}}
function logoutClubSubscriber()
{setCookieD("LoggedInClub","0",-1,"batanga.com");document.location.reload();}
function getCookie(Name)
{var search=Name+"=";document.cookie.setDomain="batanga.com"
if(document.cookie.length>0)
{offset=document.cookie.indexOf(search)
if(offset!=-1&&offset!=null){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)
end=document.cookie.length;return unescape(document.cookie.substring(offset,end));}}
else
{return null;}}
var languageId=getCookie("idioma");var idioma;if(languageId!=null){if(languageId.toUpperCase()=="EN"){languageId="en";idioma="EN";}else{languageId="sp";idioma="ES";}}else{idioma="ES";languageId="sp";}
(function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return!!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return!!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E<I;E++){var F=L[E];if(F.selected){J=n(F).val();if(G){return J}K.push(J)}}return K}return(D.value||"").replace(/\r/g,"")}return g}if(typeof J==="number"){J+=""}return this.each(function(){if(this.nodeType!=1){return}if(n.isArray(J)&&/radio|checkbox/.test(this.type)){this.checked=(n.inArray(this.value,J)>=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),G>0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return+new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G<H;G++){if((F=arguments[G])!=null){for(var E in F){var J=I[E],K=F[E];if(I===K){continue}if(D&&K&&typeof K==="object"&&!K.nodeType){I[E]=n.extend(D,J||(K.length!=null?[]:{}),K)}else{if(K!==g){I[E]=K}}}}}return I};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,p=document.defaultView||{},r=Object.prototype.toString;n.extend({noConflict:function(D){l.$=o;if(D){l.jQuery=x}return n},isFunction:function(D){return r.call(D)==="[object Function]"},isArray:function(D){return r.call(D)==="[object Array]"},isXMLDoc:function(D){return D.documentElement&&!D.body||D.tagName&&D.ownerDocument&&!D.ownerDocument.body},globalEval:function(F){F=n.trim(F);if(F){var E=document.getElementsByTagName("head")[0]||document.documentElement,D=document.createElement("script");D.type="text/javascript";if(n.support.scriptEval){D.appendChild(document.createTextNode(F))}else{D.text=F}E.insertBefore(D,E.firstChild);E.removeChild(D)}},nodeName:function(E,D){return E.nodeName&&E.nodeName.toUpperCase()==D.toUpperCase()},each:function(F,J,E){var D,G=0,H=F.length;if(E){if(H===g){for(D in F){if(J.apply(F[D],E)===false){break}}}else{for(;G<H;){if(J.apply(F[G++],E)===false){break}}}}else{if(H===g){for(D in F){if(J.call(F[D],D,F[D])===false){break}}}else{for(var I=F[0];G<H&&J.call(I,G,I)!==false;I=F[++G]){}}}return F},prop:function(G,H,F,E,D){if(n.isFunction(H)){H=H.call(G,E)}return typeof H==="number"&&F=="curCSS"&&!b.test(D)?H+"px":H},className:{add:function(D,E){n.each((E||"").split(/\s+/),function(F,G){if(D.nodeType==1&&!n.className.has(D.className,G)){D.className+=(D.className?" ":"")+G}})},remove:function(D,E){if(D.nodeType==1){D.className=E!==g?n.grep(D.className.split(/\s+/),function(F){return!n.className.has(E,F)}).join(" "):""}},has:function(E,D){return n.inArray(D,(E.className||E).toString().split(/\s+/))>-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+"></"+R+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!N.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!N.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!N.indexOf("<td")||!N.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!N.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!n.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf("<table")&&N.indexOf("<tbody")<0?K.firstChild&&K.firstChild.childNodes:P[1]=="<table>"&&N.indexOf("<tbody")<0?K.childNodes:[];for(var L=M.length-1;L>=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D<E;D++){if(G[D]===F){return D}}return-1},merge:function(G,D){var E=0,F,H=G.length;if(!n.support.getAll){while((F=D[E++])!=null){if(F.nodeType!=8){G[H++]=F}}}else{while((F=D[E++])!=null){G[H++]=F}}return G},unique:function(J){var E=[],D={};try{for(var F=0,G=J.length;F<G;F++){var I=n.data(J[F]);if(!D[I]){D[I]=true;E.push(J[F])}}}catch(H){E=J}return E},grep:function(E,I,D){var F=[];for(var G=0,H=E.length;G<H;G++){if(!D!=!I(E[G],G)){F.push(E[G])}}return F},map:function(D,I){var E=[];for(var F=0,G=D.length;F<G;F++){var H=I(D[F],F);if(H!=null){E[E.length]=H}}return E.concat.apply([],E)}});var B=navigator.userAgent.toLowerCase();n.browser={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)};n.each({parent:function(D){return D.parentNode},parents:function(D){return n.dir(D,"parentNode")},next:function(D){return n.nth(D,2,"nextSibling")},prev:function(D){return n.nth(D,2,"previousSibling")},nextAll:function(D){return n.dir(D,"nextSibling")},prevAll:function(D){return n.dir(D,"previousSibling")},siblings:function(D){return n.sibling(D.parentNode.firstChild,D)},children:function(D){return n.sibling(D.firstChild)},contents:function(D){return n.nodeName(D,"iframe")?D.contentDocument||D.contentWindow.document:n.makeArray(D.childNodes)}},function(D,E){n.fn[D]=function(F){var G=n.map(this,E);if(F&&typeof F=="string"){G=n.multiFilter(F,G)}return this.pushStack(n.unique(G),D,F)}});n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(D,E){n.fn[D]=function(){var F=arguments;return this.each(function(){for(var G=0,H=F.length;G<H;G++){n(F[G])[E](this)}})}});n.each({removeAttr:function(D){n.attr(this,D,"");if(this.nodeType==1){this.removeAttribute(D)}},addClass:function(D){n.className.add(this,D)},removeClass:function(D){n.className.remove(this,D)},toggleClass:function(E,D){if(typeof D!=="boolean"){D=!n.className.has(this,E)}n.className[D?"add":"remove"](this,E)},remove:function(D){if(!D||n.filter(D,[this]).length){n("*",this).add([this]).each(function(){n.event.remove(this);n.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){n(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}});(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af<ad;af++){E(ae,Y[af],P)}Y=P}}}else{var ai=V?{expr:ab.pop(),set:D(V)}:E.find(ab.pop(),ab.length===1&&S.parentNode?S.parentNode:S);Y=E.filter(ai.expr,ai.set);if(ab.length>0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R<P;R++){var T=G.order[R],Q;if((Q=G.match[T].exec(V))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){Q[1]=(Q[1]||"").replace(/\\/g,"");W=G.find[T](Q,S);if(W!=null){V=V.replace(G.match[T],"");break}}}}if(!W){W=S.getElementsByTagName("*")}return{set:W,expr:V}};E.filter=function(S,ac,ad,T){var Q=S,Y=[],ah=ac,V,ab;while(S&&ac.length){for(var U in G.filter){if((V=G.match[U].exec(S))!=null){var Z=G.filter[U],R=null,X=0,aa,ag;ab=false;if(ah==Y){Y=[]}if(G.preFilter[U]){V=G.preFilter[U](V,ah,ad,Y,T);if(!V){ab=aa=true}else{if(V===true){continue}else{if(V[0]===true){R=[];var W=null,af;for(var ae=0;(af=ah[ae])!==g;ae++){if(af&&W!==af){R.push(af);W=af}}}}}}if(V){for(var ae=0;(ag=ah[ae])!==g;ae++){if(ag){if(R&&ag!=R[X]){X++}aa=Z(ag,V,X,R);var P=T^!!aa;if(ad&&aa!=null){if(P){ab=true}else{ah[ae]=false}}else{if(P){Y.push(ag);ab=true}}}}}if(aa!==g){if(!ad){ah=Y}S=S.replace(G.match[U],"");if(!ab){return[]}break}}}S=S.replace(/\s*,\s*/,"");if(S==Q){if(ab==null){throw"Syntax error, unrecognized expression: "+S}else{break}}Q=S}return ah};var G=E.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(P){return P.getAttribute("href")}},relative:{"+":function(T,Q){for(var R=0,P=T.length;R<P;R++){var S=T[R];if(S){var U=S.previousSibling;while(U&&U.nodeType!==1){U=U.previousSibling}T[R]=typeof Q==="string"?U||false:U===Q}}if(typeof Q==="string"){E.filter(Q,T,true)}},">":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){var S=T.parentNode;U[R]=S.nodeName===Q?S:false}}}else{for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){U[R]=typeof Q==="string"?T.parentNode:T.parentNode===Q}}if(typeof Q==="string"){E.filter(Q,U,true)}}},"":function(S,Q,U){var R="done"+(I++),P=O;if(!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("parentNode",Q,R,S,T,U)},"~":function(S,Q,U){var R="done"+(I++),P=O;if(typeof Q==="string"&&!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("previousSibling",Q,R,S,T,U)}},find:{ID:function(Q,R){if(R.getElementById){var P=R.getElementById(Q[1]);return P?[P]:[]}},NAME:function(P,Q){return Q.getElementsByName?Q.getElementsByName(P[1]):null},TAG:function(P,Q){return Q.getElementsByTagName(P[1])}},preFilter:{CLASS:function(S,Q,R,P,U){S=" "+S[1].replace(/\\/g,"")+" ";for(var T=0;Q[T];T++){if(U^(" "+Q[T].className+" ").indexOf(S)>=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return!!P.firstChild},empty:function(P){return!P.firstChild},has:function(R,Q,P){return!!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return Q<P[3]-0},gt:function(R,Q,P){return Q>P[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S<P;S++){if(U[S]===V){return false}}return true}}}},ID:function(Q,P){return Q.nodeType===1&&Q.getAttribute("id")===P},TAG:function(Q,P){return(P==="*"&&Q.nodeType===1)||Q.nodeName===P},CLASS:function(Q,P){return P.test(Q.className)},ATTR:function(T,R){var P=G.attrHandle[R[1]]?G.attrHandle[R[1]](T):T[R[1]]||T.getAttribute(R[1]),U=P+"",S=R[2],Q=R[4];return P==null?false:S==="="?U===Q:S==="*="?U.indexOf(Q)>=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R<P;R++){Q.push(T[R])}}else{for(var R=0;T[R];R++){Q.push(T[R])}}}return Q}}(function(){var Q=document.createElement("form"),R="script"+(new Date).getTime();Q.innerHTML="<input name='"+R+"'/>";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="<a href='#'></a>";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T<R;T++){var P=Z[T];if(P){P=P[Q];var U=false;while(P&&P.nodeType){var S=P[V];if(S){U=Z[S];break}if(P.nodeType===1&&!Y){P[V]=T}if(P.nodeName===W){U=P;break}P=P[Q]}Z[T]=U}}}function O(Q,V,U,Y,W,X){for(var S=0,R=Y.length;S<R;S++){var P=Y[S];if(P){P=P[Q];var T=false;while(P&&P.nodeType){if(P[U]){T=Y[P[U]];break}if(P.nodeType===1){if(!X){P[U]=S}if(typeof V!=="string"){if(P===V){T=true;break}}else{if(E.filter(V,[P]).length>0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E<D.length){n.event.proxy(F,D[E++])}return this.click(n.event.proxy(F,function(G){this.lastToggle=(this.lastToggle||0)%E;G.preventDefault();return D[this.lastToggle++].apply(this,arguments)||false}))},hover:function(D,E){return this.mouseenter(D).mouseleave(E)},ready:function(D){A();if(n.isReady){D.call(document,n)}else{n.readyList.push(D)}return this},live:function(F,E){var D=n.event.proxy(E);D.guid+=this.selector+F;n(document).bind(i(F,this.selector),this.selector,D);return this},die:function(E,D){n(document).unbind(i(E,this.selector),D?{guid:D.guid+this.selector+E}:null);return this}});function c(G){var D=RegExp("(^|\\.)"+G.type+"(\\.|$)"),F=true,E=[];n.each(n.data(this,"events").live||[],function(H,I){if(D.test(I.type)){var J=n(G.target).closest(I.data)[0];if(J){E.push({elem:J,fn:I})}}});n.each(E,function(){if(!G.isImmediatePropagationStopped()&&this.fn.call(this.elem,G,this.fn.data)===false){F=false}});return F}function i(E,D){return["live",E,D.replace(/\./g,"`").replace(/ /g,"|")].join(".")}n.extend({isReady:false,readyList:[],ready:function(){if(!n.isReady){n.isReady=true;if(n.readyList){n.each(n.readyList,function(){this.call(document,n)});n.readyList=null}n(document).triggerHandler("ready")}}});var w=false;function A(){if(w){return}w=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);n.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);n.ready()}});if(document.documentElement.doScroll&&!true){(function(){if(n.isReady){return}try{document.documentElement.doScroll("left")}catch(D){setTimeout(arguments.callee,0);return}n.ready()})()}}}n.event.add(l,"load",n.ready)}n.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(E,D){n.fn[D]=function(F){return F?this.bind(D,F):this.trigger(D)}});n(l).bind("unload",function(){for(var D in n.cache){if(D!=1&&n.cache[D].handle){n.event.remove(n.cache[D].handle.elem)}}});(function(){n.support={};var E=document.documentElement,F=document.createElement("script"),J=document.createElement("div"),I="script"+(new Date).getTime();J.style.display="none";J.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var G=J.getElementsByTagName("*"),D=J.getElementsByTagName("a")[0];if(!G||!G.length||!D){return}n.support={leadingWhitespace:J.firstChild.nodeType==3,tbody:!J.getElementsByTagName("tbody").length,objectAll:!!J.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(D.getAttribute("style")),hrefNormalized:D.getAttribute("href")==="/a",opacity:D.style.opacity==="0.5",cssFloat:!!D.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};F.type="text/javascript";try{F.appendChild(document.createTextNode("window."+I+"=1;"))}catch(H){}E.insertBefore(F,E.firstChild);if(l[I]){n.support.scriptEval=true;delete l[I]}E.removeChild(F);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function(){n.support.noCloneEvent=false;J.detachEvent("onclick",arguments.callee)});J.cloneNode(true).fireEvent("onclick")}n(function(){var K=document.createElement("div");K.style.width="1px";K.style.paddingLeft="1px";document.body.appendChild(K);n.boxModel=n.support.boxModel=K.offsetWidth===2;document.body.removeChild(K)})})();var v=n.support.cssFloat?"cssFloat":"styleFloat";n.props={"for":"htmlFor","class":"className","float":v,cssFloat:v,styleFloat:v,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};n.fn.extend({_load:n.fn.load,load:function(F,I,J){if(typeof F!=="string"){return this._load(F)}var H=F.indexOf(" ");if(H>=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return!E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G<E;G++){var D=n.data(this[G],"olddisplay");this[G].style.display=D||"";if(n.css(this[G],"display")==="none"){var F=this[G].tagName,J;if(m[F]){J=m[F]}else{var H=n("<"+F+" />").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F<E;F++){var D=n.data(this[F],"olddisplay");if(!D&&D!=="none"){n.data(this[F],"olddisplay",n.css(this[F],"display"))}this[F].style.display="none"}return this}},_toggle:n.fn.toggle,toggle:function(F,E){var D=typeof F==="boolean";return n.isFunction(F)&&n.isFunction(E)?this._toggle.apply(this,arguments):F==null||D?this.each(function(){var G=D?F:n(this).is(":hidden");n(this)[G?"show":"hide"]()}):this.animate(s("toggle",3),F,E)},fadeTo:function(D,F,E){return this.animate({opacity:F},D,E)},animate:function(H,E,G,F){var D=n.speed(E,G,F);return this[D.queue===false?"each":"queue"](function(){var J=n.extend({},D),L,K=this.nodeType==1&&n(this).is(":hidden"),I=this;for(L in H){if(H[L]=="hide"&&K||H[L]=="show"&&!K){return J.complete.call(this)}if((L=="height"||L=="width")&&this.style){J.display=n.css(this,"display");J.overflow=this.style.overflow}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=n.extend({},H);n.each(H,function(N,R){var Q=new n.fx(I,J,N);if(/toggle|show|hide/.test(R)){Q[R=="toggle"?K?"show":"hide":R](H)}else{var P=R.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),S=Q.cur(true)||0;if(P){var M=parseFloat(P[2]),O=P[3]||"px";if(O!="px"){I.style[N]=(M||1)+O;S=((M||1)/Q.cur(true))*S;I.style[N]=S+O}if(P[1]){M=((P[1]=="-="?-1:1)*M)+S}Q.custom(S,M,O)}else{Q.custom(S,R,"")}}});return true})},stop:function(E,D){var F=n.timers;if(E){this.queue([])}this.each(function(){for(var G=F.length-1;G>=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I<J.length;I++){if(!J[I]()){J.splice(I--,1)}}if(!J.length){clearInterval(n.timerId);n.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());n(this.elem).show()},hide:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(G){var F=e();if(G||F>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})();var BNetjQuery=true;(function($){$.fn.closeDOMWindow=function(settings){if(!settings){settings={};}
var run=function(passingThis){if(settings.anchoredClassName){var $anchorClassName=$('.'+settings.anchoredClassName);$anchorClassName.fadeOut('fast',function(){if($.fn.draggable){$anchorClassName.draggable('destory').trigger("unload").remove();}else{$anchorClassName.trigger("unload").remove();}});if(settings.functionCallOnClose){settings.functionCallAfterClose();}}else{var $DOMWindowOverlay=$('#DOMWindowOverlay');var $DOMWindow=$('#DOMWindow');$DOMWindowOverlay.fadeOut('fast',function(){$DOMWindowOverlay.trigger('unload').unbind().remove();});$DOMWindow.fadeOut('fast',function(){if($.fn.draggable){$DOMWindow.draggable("destroy").trigger("unload").remove();}else{$DOMWindow.trigger("unload").remove();}});$(window).unbind('scroll.DOMWindow');$(window).unbind('resize.DOMWindow');if($.fn.openDOMWindow.isIE6){$('#DOMWindowIE6FixIframe').remove();}
if(settings.functionCallOnClose){settings.functionCallAfterClose();}}};if(settings.eventType){return this.each(function(index){$(this).bind(settings.eventType,function(){run(this);return false;});});}else{run();}};$.closeDOMWindow=function(s){$.fn.closeDOMWindow(s);};$.fn.openDOMWindow=function(instanceSettings){var shortcut=$.fn.openDOMWindow;shortcut.defaultsSettings={anchoredClassName:'',anchoredSelector:'',borderColor:'#ccc',borderSize:'4',draggable:0,eventType:null,fixedWindowY:100,functionCallOnOpen:null,functionCallOnClose:null,height:500,loader:0,loaderHeight:0,loaderImagePath:'',loaderWidth:0,modal:0,overlay:1,overlayColor:'#000',overlayOpacity:'85',positionLeft:0,positionTop:0,positionType:'centered',width:500,windowBGColor:'#fff',windowBGImage:null,windowHTTPType:'get',windowPadding:10,windowSource:'inline',windowSourceID:'',windowSourceURL:'',windowSourceAttrURL:'href'};var settings=$.extend({},$.fn.openDOMWindow.defaultsSettings,instanceSettings||{});shortcut.viewPortHeight=function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;};shortcut.viewPortWidth=function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;};shortcut.scrollOffsetHeight=function(){return self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;};shortcut.scrollOffsetWidth=function(){return self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft;};shortcut.isIE6=typeof document.body.style.maxHeight==="undefined";var sizeOverlay=function(){var $DOMWindowOverlay=$('#DOMWindowOverlay');if(shortcut.isIE6){var overlayViewportHeight=document.documentElement.offsetHeight+document.documentElement.scrollTop-4;var overlayViewportWidth=document.documentElement.offsetWidth-21;$DOMWindowOverlay.css({'height':overlayViewportHeight+'px','width':overlayViewportWidth+'px'});}else{$DOMWindowOverlay.css({'height':'100%','width':'100%','position':'fixed'});}};var sizeIE6Iframe=function(){var overlayViewportHeight=document.documentElement.offsetHeight+document.documentElement.scrollTop-4;var overlayViewportWidth=document.documentElement.offsetWidth-21;$('#DOMWindowIE6FixIframe').css({'height':overlayViewportHeight+'px','width':overlayViewportWidth+'px'});};var centerDOMWindow=function(){var $DOMWindow=$('#DOMWindow');if(settings.height+50>shortcut.viewPortHeight()){$DOMWindow.css('left',Math.round(shortcut.viewPortWidth()/2)+shortcut.scrollOffsetWidth()-Math.round(($DOMWindow.outerWidth())/2));}else{$DOMWindow.css('left',Math.round(shortcut.viewPortWidth()/2)+shortcut.scrollOffsetWidth()-Math.round(($DOMWindow.outerWidth())/2));$DOMWindow.css('top',Math.round(shortcut.viewPortHeight()/2)+shortcut.scrollOffsetHeight()-Math.round(($DOMWindow.outerHeight())/2));}};var centerLoader=function(){var $DOMWindowLoader=$('#DOMWindowLoader');if(shortcut.isIE6){$DOMWindowLoader.css({'left':Math.round(shortcut.viewPortWidth()/2)+shortcut.scrollOffsetWidth()-Math.round(($DOMWindowLoader.innerWidth())/2),'position':'absolute'});$DOMWindowLoader.css({'top':Math.round(shortcut.viewPortHeight()/2)+shortcut.scrollOffsetHeight()-Math.round(($DOMWindowLoader.innerHeight())/2),'position':'absolute'});}else{$DOMWindowLoader.css({'left':'50%','top':'50%','position':'fixed'});}};var fixedDOMWindow=function(){var $DOMWindow=$('#DOMWindow');$DOMWindow.css('left',settings.positionLeft+shortcut.scrollOffsetWidth());$DOMWindow.css('top',+settings.positionTop+shortcut.scrollOffsetHeight());};var showDOMWindow=function(instance){if(arguments[0]){$('.'+instance+' #DOMWindowLoader').remove();$('.'+instance+' #DOMWindowContent').fadeIn('fast',function(){if(settings.functionCallOnOpen){settings.functionCallOnOpen();}});$('.'+instance+'.closeDOMWindow').click(function(){$.closeDOMWindow();return false;});}else{$('#DOMWindowLoader').remove();$('#DOMWindow').fadeIn('fast',function(){if(settings.functionCallOnOpen){settings.functionCallOnOpen();}});$('#DOMWindow .closeDOMWindow').click(function(){$.closeDOMWindow();return false;});}};var urlQueryToObject=function(s){var query={};s.replace(/b([^&=]*)=([^&=]*)b/g,function(m,a,d){if(typeof query[a]!='undefined'){query[a]+=','+d;}else{query[a]=d;}});return query;};var run=function(passingThis){settings.windowSourceID=$(passingThis).attr('href')||settings.windowSourceID;settings.windowSourceURL=$(passingThis).attr(settings.windowSourceAttrURL)||settings.windowSourceURL;settings.windowBGImage=settings.windowBGImage?'background-image:url('+settings.windowBGImage+')':'';var urlOnly,urlQueryObject;if(settings.positionType=='anchored'){var anchoredPositions=$(settings.anchoredSelector).position();var anchoredPositionX=anchoredPositions.left+settings.positionLeft;var anchoredPositionY=anchoredPositions.top+settings.positionTop;$('body').append('<div class="'+settings.anchoredClassName+'" style="'+settings.windowBGImage+';background-repeat:no-repeat;padding:'+settings.windowPadding+'px;overflow:auto;position:absolute;top:'+anchoredPositionY+'px;left:'+anchoredPositionX+'px;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+';z-index:10001"><div id="DOMWindowContent" style="display:none"></div></div>');if(settings.loader&&settings.loaderImagePath!==''){$('.'+settings.anchoredClassName).append('<div id="DOMWindowLoader" style="width:'+settings.loaderWidth+'px;height:'+settings.loaderHeight+'px;"><img src="'+settings.loaderImagePath+'" /></div>');}
if($.fn.draggable){if(settings.draggable){$('.'+settings.anchoredClassName).draggable({cursor:'move'});}}
switch(settings.windowSource){case'inline':$('.'+settings.anchoredClassName+" #DOMWindowContent").append($(settings.windowSourceID).children());$('.'+settings.anchoredClassName).unload(function(){$('.'+settings.windowSourceID).append($('.'+settings.anchoredClassName+" #DOMWindowContent").children());});showDOMWindow(settings.anchoredClassName);break;case'iframe':$('.'+settings.anchoredClassName+" #DOMWindowContent").append('<iframe frameborder="0" hspace="0" wspace="0" src="'+settings.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1000)+'" style="width:100%;height:100%;border:none;background-color:#fff;" class="'+settings.anchoredClassName+'Iframe" ></iframe>');$('.'+settings.anchoredClassName+'Iframe').load(showDOMWindow(settings.anchoredClassName));break;case'ajax':if(settings.windowHTTPType=='post'){if(settings.windowSourceURL.indexOf("?")!==-1){urlOnly=settings.windowSourceURL.substr(0,settings.windowSourceURL.indexOf("?"));urlQueryObject=urlQueryToObject(settings.windowSourceURL);}else{urlOnly=settings.windowSourceURL;urlQueryObject={};}
$('.'+settings.anchoredClassName+" #DOMWindowContent").load(urlOnly,urlQueryObject,function(){showDOMWindow(settings.anchoredClassName);});}else{if(settings.windowSourceURL.indexOf("?")==-1){settings.windowSourceURL+='?';}
$('.'+settings.anchoredClassName+" #DOMWindowContent").load(settings.windowSourceURL+'&random='+(new Date().getTime()),function(){showDOMWindow(settings.anchoredClassName);});}
break;}}else{if(settings.overlay){$('body').append('<div id="DOMWindowOverlay" style="z-index:10000;display:none;position:absolute;top:0;left:0;background-color:'+settings.overlayColor+';filter:alpha(opacity='+settings.overlayOpacity+');-moz-opacity: 0.'+settings.overlayOpacity+';opacity: 0.'+settings.overlayOpacity+';"></div>');if(shortcut.isIE6){$('body').append('<iframe id="DOMWindowIE6FixIframe"  src="blank.html"  style="width:100%;height:100%;z-index:9999;position:absolute;top:0;left:0;filter:alpha(opacity=0);"></iframe>');sizeIE6Iframe();}
sizeOverlay();var $DOMWindowOverlay=$('#DOMWindowOverlay');$DOMWindowOverlay.fadeIn('fast');if(!settings.modal){$DOMWindowOverlay.click(function(){$.closeDOMWindow();});}}
if(settings.loader&&settings.loaderImagePath!==''){$('body').append('<div id="DOMWindowLoader" style="z-index:10002;width:'+settings.loaderWidth+'px;height:'+settings.loaderHeight+'px;"><img src="'+settings.loaderImagePath+'" /></div>');centerLoader();}
$('body').append('<div id="DOMWindow" style="background-repeat:no-repeat;'+settings.windowBGImage+';overflow:auto;padding:'+settings.windowPadding+'px;display:none;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+'; position:absolute;z-index:10001"></div>');var $DOMWindow=$('#DOMWindow');switch(settings.positionType){case'centered':centerDOMWindow();if(settings.height+50>shortcut.viewPortHeight()){$DOMWindow.css('top',(settings.fixedWindowY+shortcut.scrollOffsetHeight())+'px');}
break;case'absolute':$DOMWindow.css({'top':(settings.positionTop+shortcut.scrollOffsetHeight())+'px','left':(settings.positionLeft+shortcut.scrollOffsetWidth())+'px'});if($.fn.draggable){if(settings.draggable){$DOMWindow.draggable({cursor:'move'});}}
break;case'fixed':fixedDOMWindow();break;case'anchoredSingleWindow':var anchoredPositions=$(settings.anchoredSelector).position();var anchoredPositionX=anchoredPositions.left+settings.positionLeft;var anchoredPositionY=anchoredPositions.top+settings.positionTop;$DOMWindow.css({'top':anchoredPositionY+'px','left':anchoredPositionX+'px'});break;}
$(window).bind('scroll.DOMWindow',function(){if(settings.overlay){sizeOverlay();}
if(shortcut.isIE6){sizeIE6Iframe();}
if(settings.positionType=='centered'){centerDOMWindow();}
if(settings.positionType=='fixed'){fixedDOMWindow();}});$(window).bind('resize.DOMWindow',function(){if(shortcut.isIE6){sizeIE6Iframe();}
if(settings.overlay){sizeOverlay();}
if(settings.positionType=='centered'){centerDOMWindow();}});switch(settings.windowSource){case'inline':$DOMWindow.append($(settings.windowSourceID).children());$DOMWindow.unload(function(){$(settings.windowSourceID).append($DOMWindow.children());});showDOMWindow();break;case'iframe':$DOMWindow.append('<iframe frameborder="0" hspace="0" wspace="0" src="'+settings.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1000)+'" style="width:100%;height:100%;border:none;background-color:#fff;" id="DOMWindowIframe" ></iframe>');$('#DOMWindowIframe').load(showDOMWindow());break;case'ajax':if(settings.windowHTTPType=='post'){if(settings.windowSourceURL.indexOf("?")!==-1){urlOnly=settings.windowSourceURL.substr(0,settings.windowSourceURL.indexOf("?"));urlQueryObject=urlQueryToObject(settings.windowSourceURL);}else{urlOnly=settings.windowSourceURL;urlQueryObject={};}
$DOMWindow.load(urlOnly,urlQueryObject,function(){showDOMWindow();});}else{if(settings.windowSourceURL.indexOf("?")==-1){settings.windowSourceURL+='?';}
$DOMWindow.load(settings.windowSourceURL+'&random='+(new Date().getTime()),function(){showDOMWindow();});}
break;}}};if(settings.eventType){return this.each(function(index){$(this).bind(settings.eventType,function(){run(this);return false;});});}else{run();}};$.openDOMWindow=function(s){$.fn.openDOMWindow(s);};})(jQuery);jQuery.fn.extend({getUrlParam:function(strParamName){strParamName=escape(unescape(strParamName));var returnVal=new Array();var qString=null;if($(this).attr("nodeName")=="#document"){if(window.location.search.search(strParamName)>-1){qString=window.location.search.substr(1,window.location.search.length).split("&");}}else if($(this).attr("src")!="undefined"){var strHref=$(this).attr("src")
if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")+1);qString=strQueryString.split("&");}}else if($(this).attr("href")!="undefined"){var strHref=$(this).attr("href")
if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")+1);qString=strQueryString.split("&");}}else{return null;}
if(qString==null)return null;for(var i=0;i<qString.length;i++){if(escape(unescape(qString[i].split("=")[0]))==strParamName){returnVal.push(qString[i].split("=")[1]);}}
if(returnVal.length==0)return null;else if(returnVal.length==1)return returnVal[0];else return returnVal;}});var batangaLoginDebug=0;var rememberMe=$("#rememberme:checked").length>0;if(typeof wwwSiteRoot=="undefined")
wwwSiteRoot="http://www.batanga.com";UrlRegistrationHelper=wwwSiteRoot+"/login/registrationhelper.aspx";UrlSecRegistrationHelper=wwwSiteRoot+"/login/reghelperjs.aspx";if(wwwSiteRoot.indexOf("http://localhost")==-1&&wwwSiteRoot.indexOf("http://staging")==-1)
UrlSecRegistrationHelper=UrlSecRegistrationHelper.replace(/http/,"https")
UrlExternalLogin=wwwSiteRoot+"/login/externalLoginOp.aspx";UrlExternalRegLogout=wwwSiteRoot+"/login/externalRegLogoutOp.aspx";UrlProgressImage=wwwSiteRoot+"/images/indicator.gif";var topWindow=top;function showMsg(msg){$(".error_msg").show();$(".error_msg").css("visibility","visible");$(".error_msg").text(msg);}
function clearPassword(){$("#password").val("");$("#loginpassword").val("");$("#password_again").val("");}
function welcome2share(){if(top!=self)
return;$=window.parent.$;if(typeof($)=='undefined'&&window.parent.$)
{$=window.parent.$;}
$("#DOMWindow").animate({width:380,height:480,left:parseInt($("#DOMWindow").css('left'))-20,top:parseInt($("#DOMWindow").css('top'))-60});window.location="share.aspx";}
function ShowSuccessMessage()
{if(true){welcome2share();}else{$("#reg").hide();$("#regokbox").show();reg2log('self');}}
function signup2welcome(){$=window.parent.$;if(typeof($)=='undefined'&&window.parent.$)
{$=window.parent.$;}
$("#DOMWindow").animate({width:380,height:360});window.location="welcome-2.aspx";}
function executeLogin(email,password,fromsignup){if(!email)
return;rememberMe=$("#rememberme:checked").length>0;parameters="email="+email;parameters=parameters+"&password="+password;if(typeof fromsignup!="undefined"&&fromsignup)
parameters=parameters+"&fromsignup="+fromsignup;parameters=parameters+"&op=loginuser&nocache="+Math.random();var callingError=!areWeSameDomain();try{if(typeof UrlSecRegistrationHelper!="undefined"&&UrlSecRegistrationHelper.length>0){var loginJS=document.createElement("script");loginJS.src=UrlSecRegistrationHelper+"?"+parameters;loginJS.setAttribute('type','text/javascript');document.getElementsByTagName("head")[0].appendChild(loginJS);callingError=false;}else
if(!callingError){jQuery(function($){$.post(UrlRegistrationHelper,parameters,function(data,textstatus){RetrieveLoginCallBack(data,textstatus,email,password);},"xml");});}}catch(loginException){callingError=true;}
if(callingError&&top==self)
dropIframeForExternalOperation(UrlExternalLogin+"?email="+email+"&password="+password);}
function doLogin(idEmail,idPassword)
{if(idEmail==null)idEmail="loginemail";if(idPassword==null)idPassword="loginpassword";if($("#"+idEmail).length==0)idEmail="email";if($("#"+idPassword).length==0)idPassword="password";var email=$("#"+idEmail).val();email=$.trim(email);var password=$("#"+idPassword).val();var parameters;executeLogin(email,password);}
function RetrieveLoginCallBack(data,textstatus,email,password)
{if(textstatus=="success"){if(batangaLoginDebug==1)
console.log(data);var status=$("status",data).text();if(status=="1")
{try{top.OmnitureLoginEvent();}catch(ologEC){}
showMsg("");FinalizeLogin(data);}
else if(top==self){showLoginDialog(email,password);}else{clearPassword();if(status=="-1")
{}
else if(status=="-2")
{}
else if(status=="-3x")
{showMsg(wrongC);}
else
{var message=$("errormessage",data).text();if($(".error_msg").html().indexOf("Email exis")>=0)
message=$("error_msg").html()+" "+message;showMsg(message);}}}}
function doForgotPassword(){var email=$("#email").val();parameters="email="+email;parameters=parameters+"&op=forgotpassword";if(typeof UrlSecRegistrationHelper!="undefined"&&UrlSecRegistrationHelper.length>0){var operJS=document.createElement("script");operJS.src=UrlSecRegistrationHelper+"?"+parameters;operJS.setAttribute('type','text/javascript');document.getElementsByTagName("head")[0].appendChild(operJS);}else
jQuery(function($){$.post(UrlRegistrationHelper,parameters,function(data,textstatus){ForgotPasswordCallBack(data,textstatus);},"xml");});}
function ForgotPasswordCallBack(data,textstatus){if(textstatus=="success"){if(batangaLoginDebug==1)
console.log(data);var status=$("status",data).text();if(status=="1")
{ShowPasswordSent();}else{if(status=="-1")
{}
else if(status=="-2")
{showMsg(noUser);}
else if(status=="-3")
{showMsg(wrongC);}
else
{var message=$("errormessage",data).text();showMsg(message);}}}}
function ShowPasswordSent(){$("#forgot_p").hide("fast",function(){$("#sent_ok").show();});}
var keepWindowOpenAfterLogin=false;if(topWindow!=self&&typeof topWindow.keepWindowOpenAfterLogin!='undefined'&&topWindow.keepWindowOpenAfterLogin)
keepWindowOpenAfterLogin=true;function FinalizeLogin(data)
{if(batangaLoginDebug==1)
console.log(data);var nDays=0;if(rememberMe)nDays=360;setCookieD("batangacom",$("email",data).text(),nDays);setCookieD("batangakey",$("batangakey",data).text(),nDays);setCookieD("mcim",$("mcim",data).text(),nDays);setCookieD("DJScreenName",$("displayname",data).text(),nDays);setCookieD("batangausername",$("username",data).text(),nDays);setCookieD("batangauserid",$("userid",data).text(),nDays);setCookieD("avatarurl",$("avatarurl",data).text(),nDays);setCookieD("hd",$("hd",data).text(),nDays);if(typeof listenerDJID!="undefined"&&listenerDJID<0)
listenerDJID=$("userid",data).text();userName=$("username",data).text();email=$("email",data).text();displayName=$("displayname",data).text();var re=/(<!\[CDATA\[)(.+)(\]\]>)/;displayName=displayName.replace(re,"$2");plckHdCookie=escape(userName)+"|"+escape(displayName)+"|1|"+escape(email);setCookieD("hd",plckHdCookie,null,nDays);try{topWindow.updateNewMenuTopBar2008();}catch(exLCB){}
try{topWindow.loginCallBack(data);}catch(exLCB2){}
if(batangaLoginDebug==1)
{console.log("no login callback defined");}
if(topWindow!=self&&!keepWindowOpenAfterLogin)
parent.closeLogin();}
function doNewUserSignup(){var email=$("#email").val();var password=$("#password").val();var year=$("#yearofb").val();var gender=$("input:radio[name=sex]:checked").val();if(typeof gender=="undefined")
gender="";var newsLetterSignup="0";if($("#newsletter").is(":checked"))newsLetterSignup="1";var parameters;parameters="email="+email;parameters=parameters+"&password="+password;parameters=parameters+"&gender="+gender;parameters=parameters+"&year="+year;parameters=parameters+"&signupReferrer="+escape(top.location.href);parameters=parameters+"&newslettersignup="+newsLetterSignup;parameters=parameters+"&op=signupuser";if(batangaLoginDebug==1)
alert("UrlRegistrationHelper = "+UrlRegistrationHelper+", parameters = "+parameters);if(typeof UrlSecRegistrationHelper!="undefined"&&UrlSecRegistrationHelper.length>0){var operJS=document.createElement("script");operJS.id='signupcode';operJS.setAttribute('type','text/javascript');operJS.src=UrlSecRegistrationHelper+"?"+parameters;document.getElementsByTagName("head")[0].appendChild(operJS);}else
jQuery(function($){$.post(UrlRegistrationHelper,parameters,function(data,textstatus){SignupUserCallback(data,textstatus,email,password);},"xml");});}
function SignupUserCallback(data,textstatus,email,password){if(batangaLoginDebug==1){console.log(data);}
if(textstatus=="success"||textstatus=="success-missing-info"||textstatus=="success-missing-info-password"){var status=$("status",data).text();if(status=="1"){try{top.OmnitureSignUpStart("MyBatangaRegistrationCompleted");}catch(OmnE){}
keepWindowOpenAfterLogin=true;if(textstatus=="success")
executeLogin(email,password,"true");else
executeLogin(email,password,"getMissingInformation()");}else if(status=="-10"){$("#DOMWindow").animate({width:400,height:250,left:parseInt($("#DOMWindow").css('left'))-35,top:parseInt($("#DOMWindow").css('top'))});if(top!=self)
window.location=wwwSiteRoot+'/login/conf-batanga-acc.aspx';else
openBox(wwwSiteRoot+'/login/conf-batanga-acc.aspx',325,250,0);}else{var reason=$("errormessage",data).text();if(textstatus=="success-missing-info"&&(reason.indexOf("ya registrada")>0||reason.indexOf("already registered")>0)){if(reason.indexOf("ya registrada")>0)
showMsg("Email existente!... entrando...");if(reason.indexOf("already registered")>0)
showMsg("Email exists!... logging you in...");executeLogin(email,password);}else{showMsg(reason);}
if(batangaLoginDebug==1)alert("failed reason = "+reason);}}}
function UpdateGenderAndYear(){var year=$("#yearofb").val();var gender=$("input:radio[name=sex]:checked").val();if(typeof gender=="undefined")
gender="";var parameters="";parameters=parameters+"&gender="+gender;parameters=parameters+"&year="+year;parameters=parameters+"&op=updategenderyear";if(batangaLoginDebug==1)
alert("UrlRegistrationHelper = "+UrlRegistrationHelper+", parameters = "+parameters);if(typeof UrlSecRegistrationHelper!="undefined"&&UrlSecRegistrationHelper.length>0){var operJS=document.createElement("script");operJS.id='signupcode';operJS.setAttribute('type','text/javascript');operJS.src=UrlSecRegistrationHelper+"?"+parameters;document.getElementsByTagName("head")[0].appendChild(operJS);}else
jQuery(function($){$.post(UrlRegistrationHelper,parameters,function(data,textstatus){UpdateGenderAndYearCallback(data,textstatus);},"xml");});}
function UpdateGenderAndYearCallback(){signup2welcome();}
function openBox(url,DMWboxW,DMWboxH,pageModal){if(typeof(pageModal)=="undefined"||!pageModal)pageModal=0;else{if(url.indexOf("?")>=0)
url=url+"&modal=1";else
url=url+"?modal=1";}
$.openDOMWindow({overlayOpacity:'65',borderColor:'#AEAF49',windowPadding:5,height:DMWboxH,width:DMWboxW,loaderImagePath:wwwSiteRoot+'/images/loading.gif',windowSource:'iframe',windowSourceURL:url,modal:pageModal,functionCallOnOpen:function(){$("#DOMWindow").css('overflow','hidden');$("DOMWindowIframe").css('overflow','hidden');$("#DOMWindowOverlay").css('zIndex','100000000');$("#DOMWindow").css('zIndex','100000001');}});}
function showLoginDialog(email,password,pageModal){var loginUrl=wwwSiteRoot+'/login/reg-3.aspx';if(email)loginUrl+="?email="+escape(email)+"&password="+escape(password);openBox(loginUrl,325,265,pageModal);}
function showLoginDialogSmall(pageModal){var loginUrl=wwwSiteRoot+'/login/login.aspx?smallversion=true';openBox(loginUrl,290,240,pageModal);}
function signupUser(pageModal,messageId){var sUPars="";var h=265;if(typeof messageId!="undefined"&&messageId.length>0){sUPars="?messageid="+messageId;h=315;}
openBox(wwwSiteRoot+'/login/reg-3.aspx'+sUPars,330,h,pageModal);}
function ShowActivatedConfirmation(pageModal){openBox(wwwSiteRoot+'/login/welcome.aspx?userid='+getCookie("batangausername"),300,150,pageModal);}
function ShowForgotPassword(pageModal){openBox(wwwSiteRoot+'/login/remember_pass-2.aspx',330,235,0);}
function ShowOptedOutMessage(pageModal){openBox(wwwSiteRoot+'/login/optedoutmessage.aspx?userid='+getCookie("batangausername"),300,250,pageModal);}
function ShowWrongTerritory(){openBox(wwwSiteRoot+'/login/wrongterritory.aspx',600,500,1);}
function signupUserSmall(pageModal){openBox(wwwSiteRoot+'/login/reg.aspx?smallversion=true',340,400,pageModal);}
var recheckBouncing=true;function isUserEmailBouncing(){if(typeof Bouncing=="undefined"||Bouncing||recheckBouncing){parameters="op=isemailunverifiedandbouncing&nc="+Math.random();recheckBouncing=false;if(typeof UrlSecRegistrationHelper!="undefined"&&UrlSecRegistrationHelper.length>0){var operJS=document.createElement("script");operJS.src=UrlSecRegistrationHelper+"?"+parameters;operJS.setAttribute('type','text/javascript');document.getElementsByTagName("head")[0].appendChild(operJS);}}}
function showVerifDialog(pageModal){openBox(wwwSiteRoot+'/login/verify-2.aspx',340,280,pageModal);}
function showMessage(id,width,height){var url=wwwSiteRoot+'/login/messages.aspx?id='+id;try{url+='&servername='+escape(top.wsname);}catch(exMe){}
try{url+='&flashinfo='+escape(top.FlashDetect.installed+','+top.FlashDetect.major);}catch(exMe2){}
openBox(url,width,height);}
function closeLogin(){$.closeDOMWindow();}
function SubmitForLogin(evt,id)
{if(evt.keyCode==13)
{if(batangaLoginDebug==1)
alert("SubmitForLogin:id="+id);if(id==1)
doLogin();else if(id==2)
doForgotPassword();else if(id==3)
doNewUserSignup();else if(id==4)
doUpdateUserProfile();else if(id==5)
ConfirmAccountPassword();}
else
{}
tryToForceRememberMe();}
var rememberAlreadyForced=false;function tryToForceRememberMe(){if(!rememberAlreadyForced){rememberAlreadyForced=true;$('input[name=rememberme]').attr('checked',true);}}
function basicLogout()
{var email=getCookie("batangacom");setCookieD("batangakey","",-1);setCookieD("mcim","",-1);setCookieD("batangacom","",-1);setCookieD("imageUrl","",-1);setCookieD("fbConnectStatus","",-1);fbConnectStatus="";setCookieD("DJScreenName","",-1);setCookieD("batangausername","",-1);setCookieD("batangauserid","",-1);setCookieD("avatarurl","",-1);setCookieD("SongsRotationChangeNotif","",-1);setCookieD("DontShowAlertOnNegativeVotes","",-1);setCookieD("hd","",-1);setCookieD("fbIsAlreadyLoggedin","",-1);if(typeof FB!="undefined")
{FB.logout();}
registerLogOut(email);}
function registerLogOut(email){var parameters;parameters="email="+email;parameters=parameters+"&op=logoutuser";var callingError=!areWeSameDomain();try{if(typeof UrlSecRegistrationHelper!="undefined"&&UrlSecRegistrationHelper.length>0){var loginJS=document.createElement("script");loginJS.src=UrlSecRegistrationHelper+"?"+parameters;loginJS.setAttribute('type','text/javascript');document.getElementsByTagName("head")[0].appendChild(loginJS);callingError=false;}else
if(!callingError){jQuery(function($){$.post(UrlRegistrationHelper,parameters,logoutCallBack);});}}catch(loginException){callingError=true;}
if(callingError&&top==self)
dropIframeForExternalOperation(UrlExternalRegLogout+"?email="+email);}
var logoutCallBack=function(){}
function Logout()
{logoutCallBack=reloadThePage;basicLogout();}
if(typeof localLogout=="undefined")
localLogout=Logout;if(typeof loginCallBack=="undefined")
loginCallBack=reloadThePage;function reloadThePage(){var currentLoc=document.location.href.split("#")[0];document.location.href=currentLoc;}
function areWeSameDomain(){if(UrlRegistrationHelper.indexOf("/")==0)
return true;var hostName=UrlRegistrationHelper.substr(0,UrlRegistrationHelper.indexOf("/",10));var currentLoc=location.href;return hostName.length>0&&currentLoc.indexOf(hostName)>=0;}
function dropIframeForExternalOperation(url){var c=document.getElementById("loginExOperDiv");if(!c){var c=document.createElement("div");c.id="loginExOperDiv";c.style.width="0px";c.style.height="0px";c.style.overflow="hidden";top.document.body.appendChild(c);}
frameContainer=document.createElement("iframe");frameContainer.width=1;frameContainer.height=1;frameContainer.src=url;if(c)
c.appendChild(frameContainer);}
function IsUserLoggedIn()
{var batangacom=getCookie("batangacom");if(batangacom==null||batangacom.length==0)
return false;var batangakey=getCookie("batangakey");if(batangakey==null||batangakey.length==0)
return false;return true;}
function getUserId(){if(IsUserLoggedIn())
return getCookie("batangauserid");else if(getCookie("tmplistenerdjid"))
return getCookie("tmplistenerdjid");else
return-1;}
function getXMLfromString(data){if(window.DOMParser)
{parser=new DOMParser();xmlDoc=parser.parseFromString(data,"text/xml");}
else
{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.loadXML(data);}
return xmlDoc;}
function isEmailAvailable(email){parameters="email="+email;parameters=parameters+"&op=checkemail&nocache="+Math.random();var loginJS=document.createElement("script");loginJS.src=UrlSecRegistrationHelper+"?"+parameters;loginJS.setAttribute('type','text/javascript');document.getElementsByTagName("head")[0].appendChild(loginJS);}
function RetrieveIsEmailAvailable(data,textstatus){if(textstatus=="success"){var status=$("availability",data).text();if(status=="1")
{}}}
function getCookie(Name)
{var search=Name+"=";document.cookie.setDomain="batanga.com";if(document.cookie.length>0)
{offset=document.cookie.indexOf(search)
if(offset!=-1&&offset!=null){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)
end=document.cookie.length;return unescape(document.cookie.substring(offset,end));}}
else
{return null;}}
$(document).ready(function(){try
{if(typeof parent.topWindow!='undefined'&&parent.topWindow!=null)
topWindow=parent.topWindow;}catch(ex)
{topWindow=self;}
try{var emailid=$(document).getUrlParam("clickedemailid");if(emailid){if(typeof wwwSiteRoot=="undefined")
wwwSiteRoot="http://www.batanga.com";var actionIF=document.createElement("iframe");actionIF.src=wwwSiteRoot+"/widgets/emailClicked.aspx?emailid="+emailid;actionIF.setAttribute("width","0");actionIF.setAttribute("height","0");actionIF.setAttribute("style","display:none;");document.getElementsByTagName("body")[0].appendChild(actionIF);}}catch(emailidEx){}});function XMLWriter()
{this.XML=[];this.Nodes=[];this.State="";this.FormatXML=function(Str)
{if(Str)
return Str.replace(/&/g,"&amp;").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return""}
this.BeginNode=function(Name)
{if(!Name)return;if(this.State=="beg")this.XML.push(">");this.State="beg";this.Nodes.push(Name);this.XML.push("<"+Name);}
this.EndNode=function()
{if(this.State=="beg")
{this.XML.push("/>");this.Nodes.pop();}
else if(this.Nodes.length>0)
this.XML.push("</"+this.Nodes.pop()+">");this.State="";}
this.Attrib=function(Name,Value)
{if(this.State!="beg"||!Name)return;this.XML.push(" "+Name+"=\""+this.FormatXML(Value)+"\"");}
this.WriteString=function(Value)
{if(this.State=="beg")this.XML.push(">");this.XML.push(this.FormatXML(Value));this.State="";}
this.Node=function(Name,Value)
{if(!Name)return;if(this.State=="beg")this.XML.push(">");this.XML.push((Value==""||!Value)?"<"+Name+"/>":"<"+Name+">"+this.FormatXML(Value)+"</"+Name+">");this.State="";}
this.Close=function()
{while(this.Nodes.length>0)
this.EndNode();this.State="closed";}
this.ToString=function(){return this.XML.join("");}}
var offsetFromTop=10;document.write("<div id=\"widgetModal-Background\" class=\"widgetModalBackground\" style=\"display:none;\"></div>");document.write("<div id=\"modal-widgetBox\" class=\"widgetBox\" style=\"display:none;\"></div>");var widgetsImagesDomain;widgetsImagesDomain="http://widgets.batanga.com";var widgetsCode=new Array();var widgetsTitle=new Array();var widgetsImageName=new Array();function PadDigits(n,totalDigits)
{n=n.toString();var pd='';if(totalDigits>n.length)
{for(i=0;i<(totalDigits-n.length);i++)
{pd+='0';}}
return pd+n.toString();}
function getRandom()
{var ranNum=Math.floor(Math.random()*1000000);return ranNum;}
function populateWidgetsArray()
{var now=new Date();var uniqueID=new String();uniqueID=PadDigits(now.getMonth()+1,2).toString()+PadDigits(now.getDate(),2).toString()+now.getFullYear().toString()+PadDigits(now.getHours(),2).toString()+PadDigits(now.getMinutes(),2).toString()+PadDigits(now.getSeconds(),2).toString()+PadDigits(getRandom(),6).toString();widgetsCode[0]='<div style="width:150px; height:150px; background-image:url('+widgetsImagesDomain+'/stations/en/reggaeton.widget?uid='+uniqueID+'); overflow:hidden">';widgetsCode[0]=widgetsCode[0]+'<a target="_blank" href=http://myradio.batanga.com/Player/player.aspx?PlaylistID=63228&promo=100000 style="display:block; height:125px; padding-left:150px; overflow:hidden">Batanga Reggaeton Radio</a>';widgetsCode[0]=widgetsCode[0]+'<a target="_blank" href=http://www.batanga.com style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga.com</a>';widgetsCode[0]=widgetsCode[0]+'<a target="_blank" href=http://widgets.batanga.com/default.aspx?id=0 style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga Widgets - Share Me</a>';widgetsCode[0]=widgetsCode[0]+'</div>'
widgetsTitle[0]="Reggaeton";widgetsImageName[0]="reggaeton.gif";widgetsCode[1]='<div style="width:150px; height:150px; background-image:url('+widgetsImagesDomain+'/stations/en/top40.widget?uid='+uniqueID+'); overflow:hidden">';widgetsCode[1]=widgetsCode[1]+'<a target="_blank" href=http://myradio.batanga.com/Player/player.aspx?PlaylistID=63845&promo=100001 style="display:block; height:125px; padding-left:150px; overflow:hidden">Batanga Top40 Radio</a>';widgetsCode[1]=widgetsCode[1]+'<a target="_blank" href=http://www.batanga.com style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga.com</a>';widgetsCode[1]=widgetsCode[1]+'<a target="_blank" href=http://widgets.batanga.com/default.aspx?id=1 style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga Widgets - Share Me</a>';widgetsCode[1]=widgetsCode[1]+'</div>'
widgetsTitle[1]="Top 40";widgetsImageName[1]="top40.gif";widgetsCode[2]='<div style="width:150px; height:150px; background-image:url('+widgetsImagesDomain+'/stations/en/pop.widget?uid='+uniqueID+'); overflow:hidden">';widgetsCode[2]=widgetsCode[2]+'<a target="_blank" href=http://myradio.batanga.com/Player/player.aspx?PlaylistID=63839&promo=100002 style="display:block; height:125px; padding-left:150px; overflow:hidden">Batanga Pop Radio</a>';widgetsCode[2]=widgetsCode[2]+'<a target="_blank" href=http://www.batanga.com style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga.com</a>';widgetsCode[2]=widgetsCode[2]+'<a target="_blank" href=http://widgets.batanga.com/default.aspx?id=2 style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga Widgets - Share Me</a>';widgetsCode[2]=widgetsCode[2]+'</div>'
widgetsTitle[2]="Pop";widgetsImageName[2]="pop.gif";widgetsCode[3]='<div style="width:150px; height:150px; background-image:url('+widgetsImagesDomain+'/stations/en/iluvbatanga.widget?uid='+uniqueID+'); overflow:hidden">';widgetsCode[3]=widgetsCode[3]+'<a target="_blank" href=http://myradio.batanga.com/Player/player.aspx?PlaylistID=63839&promo=100003 style="display:block; height:125px; padding-left:150px; overflow:hidden">Batanga Pop Radio</a>';widgetsCode[3]=widgetsCode[3]+'<a target="_blank" href=http://www.batanga.com style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga.com</a>';widgetsCode[3]=widgetsCode[3]+'<a target="_blank" href=http://widgets.batanga.com/default.aspx?id=3 style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga Widgets - Share Me</a>';widgetsCode[3]=widgetsCode[3]+'</div>'
widgetsTitle[3]="I Love Batanga!";widgetsImageName[3]="iluvbatanga.gif";widgetsCode[4]='<div style="width:150px; height:150px; background-image:url('+widgetsImagesDomain+'/stations/en/batanguero.widget?uid='+uniqueID+'); overflow:hidden">';widgetsCode[4]=widgetsCode[4]+'<a target="_blank" href=http://myradio.batanga.com/Player/player.aspx?PlaylistID=63845&promo=100004 style="display:block; height:125px; padding-left:150px; overflow:hidden">Batanga Top40 Radio</a>';widgetsCode[4]=widgetsCode[4]+'<a target="_blank" href=http://www.batanga.com style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga.com</a>';widgetsCode[4]=widgetsCode[4]+'<a target="_blank" href=http://widgets.batanga.com/default.aspx?id=4 style="display:block; float:left; padding-top:25px; width:75px; overflow:hidden">Batanga Widgets - Share Me</a>';widgetsCode[4]=widgetsCode[4]+'</div>'
widgetsTitle[4]="I am Batanguero!";widgetsImageName[4]="batanguero.gif";}
function showwidgets(width)
{ShowHideObjects("hidden");var dlg_background=document.getElementById("widgetModal-Background");dlg_background.style.width=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth)+"px";dlg_background.style.height=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)+"px";dlg_background.style.display="";var widgetBox=document.getElementById("modal-widgetBox");widgetBox.style.width=width+"px";widgetBox.innerHTML=getwidgetscode(true);widgetBox.style.top=document.body.scrollTop+offsetFromTop+"px";widgetBox.style.left=(document.body.clientWidth/2)-(width/2)+"px";widgetBox.style.display="";}
function PickThisWidget(widgetIndex)
{if(widgetIndex>=widgetsCode.length)return;var pickedWidget=document.getElementById("pickawidget");pickedWidget.src=widgetsImagesDomain+"/stations/en/"+widgetsImageName[widgetIndex];var widgetCodeTextArea=document.getElementById("widgetCodeTextArea");if(document.all)
widgetCodeTextArea.innerText=widgetsCode[widgetIndex];else
widgetCodeTextArea.textContent=widgetsCode[widgetIndex];var widgetTitle=document.getElementById("widgetTitle");widgetTitle.value=widgetsTitle[widgetIndex];}
function closeWidgets()
{ShowHideObjects("visible");closeTag("widgetModal-Background");closeTag("modal-widgetBox");}
function getwidgetscode(showclose)
{var widgetHTML;populateWidgetsArray();widgetHTML="<div class=\"widgetBoxContentFrame\" style=\"background-image:url("+widgetsImagesDomain+"/images/background.jpg"+");\">";if(showclose)
widgetHTML=widgetHTML+"<a style=\"float:right;font-size:10px;\" href=# onclick=\"closeWidgets();\"><span class=\"widgetFont\">close</span></a>";widgetHTML=widgetHTML+"<div style=\"text-align:left;padding-top:95px;padding-bottom:10px;padding-left:35px;padding-right:30px\">";widgetHTML=widgetHTML+"<table border=0  cellpadding=0>";widgetHTML=widgetHTML+"<tr>";widgetHTML=widgetHTML+"<td valign=top>";widgetHTML=widgetHTML+"<table valign=top border=0 cellpadding=0 cellspacing=5 >";widgetHTML=widgetHTML+"<tr valign=top>";widgetHTML=widgetHTML+"<td colspan=3 valign=top>";widgetHTML=widgetHTML+"<span class=\"widgetFont\">1. Pick a widget.</span>";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"</tr>";widgetHTML=widgetHTML+"<tr>";widgetHTML=widgetHTML+"<td>";widgetHTML=widgetHTML+"<a href=\"#\" onclick=\"PickThisWidget(0);\"><img border=0  valign=top height=50 width=50 src="+widgetsImagesDomain+"/stations/en/reggaeton.gif></a>";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"<td>";widgetHTML=widgetHTML+"<a href=\"#\" onclick=\"PickThisWidget(1);\"><img border=0 valign=top height=50 width=50 src="+widgetsImagesDomain+"/stations/en/top40.gif></a>";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"<td>";widgetHTML=widgetHTML+"<a href=\"#\" onclick=\"PickThisWidget(2);\"><img border=0 valign=top height=50 width=50 src="+widgetsImagesDomain+"/stations/en/pop.gif></a>";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"</tr>";widgetHTML=widgetHTML+"<tr>";widgetHTML=widgetHTML+"<td>";widgetHTML=widgetHTML+"<a href=\"#\" onclick=\"PickThisWidget(3);\"><img border=0 valign=top height=50 width=50 src="+widgetsImagesDomain+"/stations/en/iluvbatanga.gif></a>";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"<td>";widgetHTML=widgetHTML+"<a href=\"#\" onclick=\"PickThisWidget(4);\"><img border=0 valign=top height=50 width=50 src="+widgetsImagesDomain+"/stations/en/batanguero.gif></a>";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"</tr>";widgetHTML=widgetHTML+"<tr>";widgetHTML=widgetHTML+"<td colspan=3>";widgetHTML=widgetHTML+"<input id=widgetTitle style=\"font-size:11px;\" readonly value=\"-----------------------------------------\">";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"</tr>";widgetHTML=widgetHTML+"</table>";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"<td>";widgetHTML=widgetHTML+"<img border=0 id=pickawidget valign=top src="+widgetsImagesDomain+"/stations/en/pickawidget.jpg />";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"</tr>";widgetHTML=widgetHTML+"<tr>";widgetHTML=widgetHTML+"<td colspan=3>";widgetHTML=widgetHTML+"<span class=\"widgetFont\">2. Copy this code into your blog, myspace or myBatanga page to share your favorite music with your friends!</span>";widgetHTML=widgetHTML+"<br><textarea onclick=\"javascript:copyToClipboard('widgetCodeTextArea'); return false;\" readonly rows=3 cols=50 id=widgetCodeTextArea style=\"font-size:11px;overflow: scroll;overflow-y: scroll;overflow-x: hidden;overflow:-moz-scrollbars-vertical;\"></textarea>";widgetHTML=widgetHTML+"</td>";widgetHTML=widgetHTML+"</tr>";widgetHTML=widgetHTML+"</table>";widgetHTML=widgetHTML+"</div>";widgetHTML=widgetHTML+"</div>";return widgetHTML;}
var newMenuhideMaliciousObjectsTimer;function hideWindowsMediaPlayer(){try{var browserName=navigator.appName;if(browserName=="Microsoft Internet Explorer"&&document.getElementById("WMPlayer")!=null)
{document.getElementById("playerdiv").style.visibility="hidden";}}
catch(err){}}
function showWindowsMediaPlayer(){try{document.getElementById("playerdiv").style.visibility="visible";}catch(err){}}
var newMenuobjectsToHide=new Array();function newMenuhideMaliciousObjects()
{newMenuShowHideAllTags("object","hidden");var browserName=navigator.appName;if(browserName!="Microsoft Internet Explorer")
newMenuShowHideAllTags("embed","hidden");clearTimeout(newMenuhideMaliciousObjectsTimer);}
function newMenuShowHideObjects(displayStyle,position)
{if(displayStyle=="hidden")
{}
if(displayStyle=="visible")
{}
var browserName=navigator.appName;if(browserName!="Microsoft Internet Explorer")
newMenuShowHideAllTags("embed",displayStyle,position);newMenuShowHideAllTags("object",displayStyle,position);newMenuShowHideAllTags("iframe",displayStyle,position);}
function newMenuIsHiddenByMeObject(id)
{try{for(var i=0;i<newMenuobjectsToHide.length;i++)
{if(newMenuobjectsToHide[i]==id)
return true;}}catch(e){}
return false;}
function newMenuShowHideAllTags(objectType,displayStyle,position)
{var objects=document.getElementsByTagName(objectType);for(var i=0;i<objects.length;i++)
{if(displayStyle=="hidden"&&objects[i].getAttribute('wmode')!="opaque"&&isAdInDangerousPosition(objects[i],position)&&objects[i].style.visibility!="hidden")
{newMenuobjectsToHide[newMenuobjectsToHide.length]=objects[i].getAttribute('id')+"_"+objectType;objects[i].style.visibility=displayStyle;}
else if(displayStyle=="visible"&&newMenuIsHiddenByMeObject(objects[i].getAttribute('id')+"_"+objectType))
{objects[i].style.visibility=displayStyle;}}}
function isAdInDangerousPosition(object,position){var i=0;var parent=object.parentNode;try{while(i<6&&parent!=null&&parent.getAttribute("id")!="ad-"+position)
{i++;parent=parent.parentNode;}
return(parent.getAttribute("id")=="ad-"+position);}catch(e){return false;}}
var sshow=false;var stimeout;function showRadioMenu()
{if(document.getElementById('pos-Middle1')==null){newMenuShowHideObjects("hidden","Right");}else{newMenuShowHideObjects("hidden","Middle1");}
if(isTheHomePage)
newMenuShowHideObjects("hidden","Middle");try{window.clearTimeout(stimeout);if(sshow)return;document.getElementById('radio_box').style.visibility='visible'
sshow=true;}catch(e){}}
function hideRadioMenu()
{if(document.getElementById('pos-Middle1')==null){newMenuShowHideObjects("visible","Right");}else{newMenuShowHideObjects("visible","Middle1");}
if(isTheHomePage)
newMenuShowHideObjects("visible","Middle");try{window.clearTimeout(stimeout);document.getElementById('radio_box').style.visibility='hidden'
sshow=false;}catch(e){}}
function localLogout()
{Logout();}
function addToFavorites()
{window.external.AddFavorite(document.title,document.location.href);}
function setLinkCookie(linkID){if(getCookie("auxiliary")==null||getCookie("auxiliary")==""){document.cookie="auxiliary="+escape(linkID)+";path=/;domain=batanga.com";}
return true;}
function doSearch(){return doSearch2('Buscar','Error en la b&uacute;squeda');}
function doSearch2(defaultString,errorMessage){mensaje='';querySearch='';querySearch=trim(document.getElementById('q').value);if((querySearch=='')||(querySearch==defaultString)){mensaje+=errorMessage;}
if(mensaje==''){var linkID="LinkTrack_Search_";var menu=getCookie('menu');if(menu==null||menu=="")
linkID+="O";else
linkID+=menu;setLinkCookie(linkID);return true;}
else
{mensaje=mensaje;alert(mensaje);return false;}}
function doSearchNew(defaultString,errorMessage){mensaje='';querySearch='';querySearch=trim(document.getElementById('q').value);if((querySearch=='')||(querySearch==defaultString)){mensaje+=errorMessage;}
if(mensaje==''){var linkID="LinkTrack_Search_";var menu=getCookie('menu');if(menu==null||menu=="")
linkID+="O";else
linkID+=menu;setLinkCookie(linkID);return true;}
else
{mensaje=mensaje;alert(mensaje);return false;}}
function trim(s)
{while((s.substring(0,1)==' ')||(s.substring(0,1)=='\n')||(s.substring(0,1)=='\r'))
{s=s.substring(1,s.length);}
while((s.substring(s.length-1,s.length)==' ')||(s.substring(s.length-1,s.length)=='\n')||(s.substring(s.length-1,s.length)=='\r'))
{s=s.substring(0,s.length-1);}
return s;}
function getProfileUrl()
{var idioma=unescape(getCookie("idioma"));var username=unescape(getCookie("batangausername"));var sid="sitelife.es.batanga.com";if(idioma=="EN"||idioma=="en")
sid="sitelife.en.batanga.com";else
sid="sitelife.es.batanga.com";profileUrl='http://www.batanga.com/community/Persona.aspx?plckUserId='+username+'&userid='+username+'&sid='+sid;if(location.href.match(/\/staging/))
profileUrl=profileUrl.replace(/www/i,'stagingwww');return profileUrl;}
function getSettingsUrl()
{var idioma=unescape(getCookie("idioma"));var username=unescape(getCookie("batangausername"));var sid="sitelife.es.batanga.com";if(idioma=="EN"||idioma=="en")
sid="sitelife.en.batanga.com";else
sid="sitelife.es.batanga.com";settingsUrl='http://www.batanga.com/community/Persona.aspx?plckPersonaPage=PersonaSettings&plckUserId='+username+'&userid='+username+'&sid='+sid;if(location.href.match(/\/staging/))
settingsUrl=settingsUrl.replace(/www/i,'stagingwww');return settingsUrl;}
function updateNewMenuTopBar(){var batanga_key=getCookie("batangakey");var idioma=getCookie("idioma");var usuario=unescape(getCookie("DJScreenName"));var username=unescape(getCookie("batangausername"));try{if(!(batanga_key==null||batanga_key=="")){document.getElementById("newMenuLoggedBox").style.paddingTop='55px';if(idioma=="ES"){document.getElementById("newMenuLoggedBox").innerHTML='Bienvenido <a href="http://my.batanga.com/'+username+'">'+usuario+'<'+'/a>'+'&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onclick="localLogout();return false;">Salir</a>';}else
document.getElementById("newMenuLoggedBox").innerHTML='Welcome <a href="http://my.batanga.com/'+username+'">'+usuario+'<'+'/a>'+'&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onclick="localLogout();return false;">Logout</a>';document.getElementById("newMenuLoginBox").style.display="none";document.getElementById("newMenuLoggedBox").style.display="";}else{document.getElementById("loginpassword").value="";document.getElementById("newMenuLoginBox").style.display="";document.getElementById("newMenuLoggedBox").style.display="none";}}catch(ex){}}
function updateNewMenuTopBar2008(){var batanga_key=getCookie("batangakey");try{if(!(batanga_key==null||batanga_key=="")){var idioma=unescape(getCookie("idioma"));var usuario=unescape(getCookie("DJScreenName"));var username=unescape(getCookie("batangausername"));document.getElementById("after_login").style.display="block";document.getElementById("before_login").style.display="none";profileUrl=getProfileUrl();document.getElementById("batangueroLink").href=profileUrl;document.getElementById("batangueroLink").innerHTML=usuario;document.getElementById("batangueroProfile").href=profileUrl;document.getElementById("batangueroSettings").href=getSettingsUrl();if(getCookie("avatarurl")!=null&&getCookie("avatarurl")!='undefined'&&getCookie("avatarurl")!=""){setUserImage();}else
try{GetUserImage(setUserImage);}catch(imageExc){}}else{document.getElementById("after_login").style.display="none";document.getElementById("before_login").style.display="block";}}catch(up2008exc){}}
function setUserImage(){try
{document.getElementById("batangueroImage").src=getCookie("avatarurl");}catch(setUserExc){}}
try
{var anchor=document.getElementById("externalLinkAutos");if(anchor)
anchor.target="_blank";}catch(selExternalLinksTarget){}
function changeLanguage(aux)
{if(aux=="EN"||aux=="en")
myLanguage="ES";else if(aux=="ES"||aux=="es")
myLanguage="EN";else
myLanguage="ES";setCookieD("idioma",myLanguage,10,"batanga.com");var browserName=navigator.appName;var browserVersion=new String(navigator.appVersion);if(navigator.appName=='Netscape'&&browserVersion.lastIndexOf('Safari')!=-1){var url=new String(document.location.href);if(url.lastIndexOf('slang=')!=-1)
{var url_part=url.split('slang=');var num=parseInt(url_part[1].toString())+1
document.location=url_part[0]+'slang='+num.toString();}
else
{if(url.lastIndexOf("?")==-1){document.location=document.location.href+'?slang=1';}
else
{document.location=document.location.href+'&slang=1';}}}
else
{var url=new String(document.location.href);if(url.lastIndexOf('&sid=')!=-1||url.lastIndexOf('&SID=')!=-1){if(myLanguage=="EN"){url=url.replace("sitelife.es.batanga.com","sitelife.en.batanga.com");url=url.replace("sitelifestage.es.batanga.com","sitelifestage.en.batanga.com");}
else if(myLanguage=="ES"){url=url.replace("sitelife.en.batanga.com","sitelife.es.batanga.com");url=url.replace("sitelifestage.en.batanga.com","sitelifestage.es.batanga.com");}
document.location=url;}
else
{document.location.reload();}}}
function utf8encode2(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;};function utf8encode(s)
{return unescape(encodeURIComponent(s));}
document.domain="batanga.com";function getLanguage()
{var language=getCookie("idioma");if(language!=null)
language=language.toUpperCase();return language;}
function openiPhoneBox(){if(typeof msmodal=="undefined")msmodal=0;url=wwwSiteRoot+'/player3/phone-app.aspx?phonetype=iphone';$.openDOMWindow({overlayOpacity:'65',borderColor:'#AEAF49',windowPadding:5,height:750,width:700,loaderImagePath:wwwSiteRoot+'/images/loading.gif',windowSource:'iframe',windowSourceURL:url,modal:msmodal,functionCallOnOpen:function(){$("#DOMWindow").css('overflow','hidden');$("DOMWindowIframe").css('overflow','hidden');$("#DOMWindowOverlay").css('zIndex','100000000');$("#DOMWindow").css('zIndex','100000001');}});}
function openAndroidBox(){if(typeof msmodal=="undefined")msmodal=0;url=wwwSiteRoot+'/player3/phone-app.aspx?phonetype=android';$.openDOMWindow({overlayOpacity:'65',borderColor:'#AEAF49',windowPadding:5,height:730,width:700,loaderImagePath:wwwSiteRoot+'/images/loading.gif',windowSource:'iframe',windowSourceURL:url,modal:msmodal,functionCallOnOpen:function(){$("#DOMWindow").css('overflow','hidden');$("DOMWindowIframe").css('overflow','hidden');$("#DOMWindowOverlay").css('zIndex','100000000');$("#DOMWindow").css('zIndex','100000001');}});}
function openBlackberryBox(){if(typeof msmodal=="undefined")msmodal=0;url=wwwSiteRoot+'/player3/phone-app.aspx?phonetype=blackberry';$.openDOMWindow({overlayOpacity:'65',borderColor:'#AEAF49',windowPadding:5,height:660,width:700,loaderImagePath:wwwSiteRoot+'/images/loading.gif',windowSource:'iframe',windowSourceURL:url,modal:msmodal,functionCallOnOpen:function(){$("#DOMWindow").css('overflow','hidden');$("DOMWindowIframe").css('overflow','hidden');$("#DOMWindowOverlay").css('zIndex','100000000');$("#DOMWindow").css('zIndex','100000001');}});}
function openChromeBox(){if(typeof msmodal=="undefined")msmodal=0;url=wwwSiteRoot+'/player3/chrome-ext-app.aspx';$.openDOMWindow({overlayOpacity:'65',borderColor:'#AEAF49',windowPadding:5,height:465,width:660,loaderImagePath:wwwSiteRoot+'/images/loading.gif',windowSource:'iframe',windowSourceURL:url,modal:msmodal,functionCallOnOpen:function(){$("#DOMWindow").css('overflow','hidden');$("DOMWindowIframe").css('overflow','hidden');$("#DOMWindowOverlay").css('zIndex','100000000');$("#DOMWindow").css('zIndex','100000001');}});}
function openLatamOverLay(){if(typeof msmodal=="undefined")msmodal=0;url=wwwSiteRoot+'/player3/latin-ext-app.aspx';$.openDOMWindow({overlayOpacity:'65',borderColor:'#D65456',windowPadding:0,height:520,width:780,loaderImagePath:wwwSiteRoot+'/images/loading.gif',windowSource:'iframe',windowSourceURL:url,modal:msmodal,functionCallOnOpen:function(){$("#DOMWindow").css('overflow','hidden');$("DOMWindowIframe").css('overflow','hidden');$("#DOMWindowOverlay").css('zIndex','100000000');$("#DOMWindow").css('zIndex','100000001');}});}
function openNotificationBox(msmodal){if($("#DOMWindow").is(':visible')){$("#DOMWindow").animate({height:235,width:325});$("#DOMWindowIframe").attr("src",wwwSiteRoot+'/player3/notifications/suggestions.aspx');}else{if(typeof msmodal=="undefined")msmodal=0;url=wwwSiteRoot+'/player3/notifications/suggestions.aspx';$.openDOMWindow({overlayOpacity:'65',borderColor:'#AEAF49',windowPadding:5,height:235,width:325,loaderImagePath:wwwSiteRoot+'/images/loading.gif',windowSource:'iframe',windowSourceURL:url,modal:msmodal,functionCallOnOpen:function(){$("#DOMWindow").css('overflow','hidden');$("DOMWindowIframe").css('overflow','hidden');$("#DOMWindowOverlay").css('zIndex','100000000');$("#DOMWindow").css('zIndex','100000001');}});}}
var notificationMessageTitle="";var notificationMessageBody="";var notificationMessageID="";var notificationMatchID="";function initNotifications(){var url=restBaseURL+"/users/getpendingpopupnotification/?listenerdjid="+getUserId();url+="&jsoncallback=initNotifications_CB";$.ajax({url:url,dataType:'script',timeout:30000});$("#loader").show();}
function initNotifications_CB(data){if(data.status){var objMessage=jQuery.parseJSON(data.body.notificationmessage);notificationMessageTitle=objMessage.MessageSubject;notificationMessageBody=objMessage.MessageBodyHTML;notificationMessageID=data.body.notificationid;notificationMatchID=objMessage.NotificationMatchID;openNotificationBox(false);}
setTimeout(function(){initNotifications();},3600000);}
$(document).ready(function()
{var uA=navigator.userAgent.toLowerCase();var IsMatch=false;function is(arrCountry,uCountry){for(var i=0;i<arrCountry.length;i++){if(arrCountry[i]==uCountry){IsMatch=true;}}
return false;}
if((typeof getCookie("LatamMsgPopup")=='undefined'||getCookie("LatamMsgPopup")==null)&&(typeof getCookie("lastStationPlayed")=='undefined'||getCookie("lastStationPlayed")==null)){arrCountry=new Array('VE','CO','DO','AR','UY','PY','CL','CR','PA','BO','NI','GT','HN','EC','SV','PE','CU','HT','JM','TT','GP','MQ','BS','AN','LC','VC','VI','GD','AW','AG','DM','KY','BM','KN','TC','VG','AI','MS');var uCountry=unescape(getCookie("location")).substring(0,2);is(arrCountry,uCountry)
if(IsMatch==true){if(!document.getElementById("DOMWindow")){setTimeout('openLatamOverLay()',5000);setCookieD("LatamMsgPopup","true",360);}}}
if(uA.indexOf("chrome")>-1&&(typeof getCookie("chromeMsgPopup")=='undefined'||getCookie("chromeMsgPopup")==null)){if(!document.getElementById("DOMWindow")){setTimeout('openChromeBox()',5000);setCookieD("chromeMsgPopup","true",360);}}
var mobile=getCookie("mobilemessage");if(typeof mobile!="undefined"&&mobile=="true")
return;if(!document.getElementById("DOMWindow")){if(uA.indexOf("safari")>-1&&(uA.indexOf("iphone")>-1||uA.indexOf("ipad")>-1||uA.indexOf("ipod")>-1)){openiPhoneBox();setCookieD("mobilemessage","true")}else if(uA.indexOf("android")>-1){openAndroidBox();setCookieD("mobilemessage","true")}
else if(uA.indexOf("blackberry")>-1){openBlackberryBox();setCookieD("mobilemessage","true");}}
setTimeout(function(){initNotifications();},60000);});if(typeof addLoadEvent=="undefined"){if(typeof $!="undefined")
addLoadEvent=function(func){$(document).ready(func);}
else
addLoadEvent=function(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}}}
function setCookieD(cookieName,cookieValue,nDays,Domain)
{var expString="";if(nDays){var today=new Date();var expire=new Date();if(nDays==null||nDays==0)
nDays=1;expire.setTime(today.getTime()+3600000*24*nDays);expString=";expires="+expire.toGMTString();}
if(!Domain)
Domain="batanga.com";var theCookie=cookieName+"="+escape(cookieValue)+expString+";path=/;domain="+Domain+";";document.cookie=theCookie;}
function getCookie(Name)
{var search=Name+"=";document.cookie.setDomain="batanga.com"
if(document.cookie.length>0)
{offset=document.cookie.indexOf(search)
if(offset!=-1&&offset!=null){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)
end=document.cookie.length;return unescape(document.cookie.substring(offset,end));}}
else
{return null;}}
function openMyRadioAndLink(PlaylistID,link,q)
{if(q!=null)
window.open('http://myradio.batanga.com/Player/player.aspx?PlaylistID='+PlaylistID+"&q="+q,'LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=430,height=745');else
window.open('http://myradio.batanga.com/Player/player.aspx?PlaylistID='+PlaylistID,'LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=430,height=745');window.location=link;return false;}
function openMyRadioAndArtist(PlaylistID,q)
{if(q!=null)
window.open('http://radio.batanga.com/Player/player.aspx?PlaylistID='+PlaylistID+"&q="+q,'LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=430,height=745');else
window.open('http://radio.batanga.com/Player/player.aspx?PlaylistID='+PlaylistID,'LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=430,height=745');}
function openBatangaRadioPlayer(stationID,artist){var myRadioStationID=63839;if(stationID==4)myRadioStationID=63839;if(stationID==2)myRadioStationID=63228;if(stationID==3)myRadioStationID=63826;if(stationID==7)myRadioStationID=63820;if(stationID==9)myRadioStationID=63843;if(stationID==16)myRadioStationID=59195;if(stationID==27)myRadioStationID=63849;if(stationID==5)myRadioStationID=63852;if(stationID==6)myRadioStationID=63837;if(stationID==8)myRadioStationID=63719;if(stationID==10)myRadioStationID=63855;if(stationID==11)myRadioStationID=63838;if(stationID==12)myRadioStationID=63831;if(stationID==13)myRadioStationID=63834;if(stationID==14)myRadioStationID=63821;if(stationID==15)myRadioStationID=63829;if(stationID==17)myRadioStationID=63844;if(stationID==18)myRadioStationID=63833;if(stationID==19)myRadioStationID=63724;if(stationID==24)myRadioStationID=63845;if(stationID==25)myRadioStationID=58404;if(stationID==26)myRadioStationID=63842;if(stationID==28)myRadioStationID=63854;if(stationID==29)myRadioStationID=40527;if(stationID==30)myRadioStationID=270192;if(stationID==31)myRadioStationID=18710;if(stationID==32)myRadioStationID=404679;openMyRadioAndArtist(myRadioStationID,artist);}
function CallMyRadioPlayListByURL(url){window.open(url,'LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=430,height=745');}
function findPosX(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}else if(obj.x)curleft+=obj.x;return curleft;}
function findPosY(obj){var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}else if(obj.y)curtop+=obj.y;return curtop;}
var windowW=800,windowH=600;var adPerct=0.25;if(typeof(window.innerWidth)!="undefined"){windowW=window.innerWidth;windowH=window.innerHeight;}else{windowW=document.documentElement.clientWidth;windowH=document.documentElement.clientHeight;}
function expansionAllowance(position){try{adplaceholder=document.getElementById(position);var btgsize=position.replace(/_[0-9]/gi,'').replace(/ad\-/gi,'').replace(/pos\-/gi,'');var btgszW=parseInt(btgsize.split("x")[0]);var btgszH=parseInt(btgsize.split("x")[1]);var btgdisexpansion="";if((findPosX(adplaceholder)>btgszW*adPerct)&&(findPosX(adplaceholder)+btgszW<windowW-btgszW*adPerct))
btgdisexpansion=";exp=both";else if(findPosX(adplaceholder)>btgszW*adPerct)
btgdisexpansion=";exp=left";else
btgdisexpansion=";exp=right";}catch(btge2){}
return btgdisexpansion;}
function foldPositioning(position){try{adplaceholder=document.getElementById(position);var btgsize=position.replace(/_[0-9]/gi,'').replace(/ad\-/gi,'').replace(/pos\-/gi,'');var btgszW=parseInt(btgsize.split("x")[0]);var btgszH=parseInt(btgsize.split("x")[1]);var btginfold="";if((findPosX(adplaceholder)<windowW-btgszW*adPerct)&&(findPosY(adplaceholder)<windowH-btgszH*adPerct)){btginfold=";loc=af"}
else{btginfold=";loc=bf"}}catch(btge3){}
return btginfold;}
function insertIntoPlaceHolder(obj,lyr)
{try{var moveFunc=function(){var allscripts=document.getElementById(lyr).getElementsByTagName("script");for(var i=allscripts.length-1;i>=0;i--)
{if(allscripts[i].src.match(/adj\/btg/gi)||allscripts[i].src.match(/1x1/gi)){allscripts[i].parentNode.removeChild(allscripts[i]);}}
document.getElementById(obj).appendChild(document.getElementById(lyr));};moveFunc();}catch(setLyrnewerr){}}
if(typeof(setLyr)=="undefined")
setLyr=function(a,b,c){insertIntoPlaceHolder(a,b);};function isThereACrawlerInThePage(){try{return(document.getElementById("catfish")||document.getElementById("crawler")||document.getElementById("crawler_cont")||bnParsArray['bnsm_name']=="crawler");}catch(istc){return false;}}
function wall_get_WindowWidth(){var myWidth=0;if(typeof(window.innerWidth)=='number'){myWidth=window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){myWidth=document.documentElement.clientWidth;}else if(document.body&&document.body.clientWidth){myWidth=document.body.clientWidth;}
return myWidth;}
function wallpaper_bg(bg_image,bg_attach,bg_color){document.write("<style type='text/css'>body {background-color:"+bg_color+";background-image:url("+bg_image+");background-position:center top;background-repeat:no-repeat;background-attachment:"+bg_attach+";_background-attachment: scroll;}#container2{background-color: #FFFFFF;}</style>");}
var linkContainerArray=new Array();var linkContainersInserted=false;var linkContainersScheduled=false;function wallpaper_btn(b_pos,b_img,b_link,b_hor,b_vert,b_attach){try{if(wall_get_WindowWidth()>=1220){if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var ieversion=new Number(RegExp.$1)
if(ieversion<=6){b_attach="absolute";}}
var insert_buttons_html="<div style='position:"+b_attach+"; bottom:"+b_vert+"px; "+b_pos+":"+b_hor+"px'><a href='"+b_link+"' target='_blank'><img src='"+b_img+"'/></div>";var div_name="insert_buttons_"+b_pos+""
var link_container=document.createElement('div');link_container.setAttribute('id',div_name);link_container.innerHTML=insert_buttons_html;linkContainerArray[linkContainerArray.length]=link_container;genAttachListenerToOnLoadEvent(insertLinkContainer);}}catch(GarE){}}
function insertLinkContainer(){try{if(!linkContainersInserted){linkContainersInserted=true;for(var i=0;i<linkContainerArray.length;i++)
document.body.appendChild(linkContainerArray[i]);}}catch(insertLinkEx){linkContainersInserted=false;setTimeout('insertLinkContainer()',5000);}
return!linkContainersInserted;}
function genAttachListenerToOnLoadEvent(functionRef){if(window.addEventListener){window.addEventListener('load',functionRef,false);}else if(document.addEventListener){document.addEventListener('load',functionRef,false);}else if(window.attachEvent){window.attachEvent('onload',functionRef);}}
function setLyrvOff(obj,lyr,container,voffset)
{try{var o=document.getElementById(obj);var newX=findPosX(o);var newY=findPosY(o);var leftcontainer1=findPosX(document.getElementById(container));var x=document.getElementById(lyr);x.style.top=(newY+voffset)+'px';newX=newX-leftcontainer1;x.style.margin='0 0'+newX+'px 0';}catch(sLP){}}
function hideVideoOverlay(){document.getElementById("v-overlay").style.display="none";}
function showVideoOverlay(objid,option,var1,var2){if(option==0){try{$(document).ready(function(){$("#"+objid).fadeIn(var2);});}catch(jqerrorbat){}}
if(option==1){try{$(document).ready(function(){$("#"+objid).animate({"height":"-=80px"},0);$("#"+objid).animate({"height":"+=80px"},var2);document.getElementById(objid).style.display="";});}catch(jqerrorbat){}}
if(option==2){try{$(document).ready(function(){$("#"+objid).animate({"top":"+="+var1+"px"},0);document.getElementById(objid).style.display="";$("#"+objid).animate({"top":"-="+var1+"px"},var2);});}catch(jqerrorbat){}}
if(option==3){try{$(document).ready(function(){$("#"+objid).animate({"height":"=0px"},0);$("#"+objid).animate({"height":"=80px"},var2);document.getElementById(objid).style.display="";});}catch(jqerrorbat){}}}
function overLayTestSimulateDART(option,var1,var2){showOverLay('http://batanga.http.internapcdn.net/batanga_vitalstream_com/traffic/2009/absolut/mango.swf',0,0,5000,5000,20000);}
function showOverLay(flashUrl,option,var1,var2,showtime,hidetime){document.write('<'+'div id="v-overlay-c" style="width:440px;height:80px;overflow:hidden">');document.write('<'+'div id="v-overlay" style="position:absolute; z-index:10001; width:440px; height:80px; padding-top:0px; overflow:hidden;display:none;border">');document.write('<'+'embed src="'+flashUrl+'" quality="high" width="440px" height="80px" name="miciudad" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"><'+'/embed>');document.write('<'+'/div>');document.write('<'+'/div>');document.write('<'+'script>');document.write('setLyrvOff("playerdiv","v-overlay","v-overlay-c",250);');document.write('setTimeout(\'showVideoOverlay("v-overlay",'+option+','+var1+','+var2+')\','+showtime+');');if(hidetime>0)
document.write('setTimeout(\'hideVideoOverlay()\','+(showtime+hidetime)+');');document.write('<'+'/script>');}
function b_ad_timer(time,src)
{setTimeout("insert_pixel_by_time('"+src+"');",time*1000);}
function insert_pixel_by_time(src){pixel_image=document.createElement("img");pixel_image.width=1;pixel_image.height=1;var random_src=src.replace("b_random",Math.random());pixel_image.src=random_src;document.body.appendChild(pixel_image);}
var commentsDebug=0;var commentsTeaserDebug=0;var commentOptionalMessageEN="Enter an optional message here.";var commentOptionalMessageES="Escribe un mensaje adicional.";var commentMessageEN="Enter your comment here.";var commentMessageES="Escribe tus comentarios aquí.";var UrlProcessComment="/CommentsHelper.aspx";var previousAbuseId=null;var commentTagsList=null;var xmlObjAddComment=null;var xmlObjGetComments=null;var xmlObjSubmitAbuse=null;var xmlObjGetCommentsTeaser=null;var commentTagId="";var commentTeaserTagId="";var commentsCountToShow=0;if(typeof siteRootFolder!='undefined'&&siteRootFolder!=null)
UrlProcessComment=siteRootFolder+"/commentsHelper.aspx";var commentsSupported=new Array("artist","video","radio","album","song");var language=getCookie("idioma");function GetLoggedInUserID()
{var userId=getCookie("batangauserid");return userId;}
function IsUserLoggedIn()
{var batangacom=getCookie("batangacom");if(batangacom==null||batangacom.length==0)
return false;var batangakey=getCookie("batangakey");if(batangakey==null||batangakey.length==0)
return false;return true;}
function GetXmlDoc(text)
{if(typeof(text)!="undefined")
{var xmlDoc;if(window.ActiveXObject)
{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.loadXML(text);}
else
{var parser=new DOMParser();var xmlDoc=parser.parseFromString(text,"text/xml");}}
return xmlDoc;}
function CreateAJAXRequest()
{var http_request=null;if(window.XMLHttpRequest)
{http_request=new XMLHttpRequest();if(http_request.overrideMimeType)
{http_request.overrideMimeType('text/html');}}
else if(window.ActiveXObject)
{try
{http_request=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{http_request=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){}}}
if(!http_request)
{alert('Cannot create XMLHTTP instance');}
return http_request;}
function GetCommentEntityTypeIndex(tagId)
{for(var j=0;j<commentsSupported.length;j++)
{if(tagId.match(commentsSupported[j]))
{return j;}}
return-1;}
function GetCommentType(tagName)
{for(var j=0;j<commentsSupported.length;j++)
if(tagName.match(commentsSupported[j]))
return commentsSupported[j];return null;}
function GetCommentId(tagName)
{var commentTag="comment-"+GetCommentType(tagName)+"-";var id=tagName.substr(tagName.indexOf(commentTag)+commentTag.length);return id;}
function GetCommentTeaserId(tagName)
{var commentTag="commentteaser-"+GetCommentType(tagName)+"-";var id=tagName.substr(tagName.indexOf(commentTag)+commentTag.length);if(commentsTeaserDebug==1)
{alert("GetCommentTeaserId:commentTag = "+commentTag+", id = "+id);}
return id;}
function ShowCommentsTeaser()
{var commenEntityTypeId=-1;var idValue=-1;var alldivs=document.getElementsByTagName("div");for(var i=0;i<alldivs.length;i++)
{if(alldivs[i].getAttribute('id')!=null&&alldivs[i].getAttribute('id').match('commentteaser-'))
{commentTeaserTagId=alldivs[i].getAttribute('id');commenEntityTypeId=GetCommentEntityTypeIndex(commentTeaserTagId)+1;idValue=GetCommentTeaserId(commentTeaserTagId);if(commentsTeaserDebug==1)
alert("ShowCommentsTeaser:comment div tag found, id = "+commentTeaserTagId+", commenEntityTypeId = "+commenEntityTypeId+", id = "+idValue);break;}}
if(idValue!=-1)
{xmlObjGetCommentsTeaser=CreateAJAXRequest();var parameters="entityid="+idValue+"&commententitytypeid="+commenEntityTypeId+"&op=getcommentsteaser"+"&idioma="+language;if(commentsTeaserDebug==1)
alert("ShowComments:UrlProcessComment = "+UrlProcessComment+", parameters = "+parameters);xmlObjGetCommentsTeaser=CreateAJAXRequest();xmlObjGetCommentsTeaser.open("POST",UrlProcessComment,true);xmlObjGetCommentsTeaser.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlObjGetCommentsTeaser.setRequestHeader("Content-length",parameters.length);xmlObjGetCommentsTeaser.onreadystatechange=RetrieveGetCommentsTeaserData;xmlObjGetCommentsTeaser.send(parameters);}
else
{if(commentsTeaserDebug==1)
alert("ShowCommentsTeaser:No comment div tag found");}}
function RetrieveGetCommentsTeaserData()
{var outputText;if(commentsTeaserDebug==1)
{alert("RetrieveGetCommentsTeaserData:responseText = "+xmlObjGetCommentsTeaser.responseText);}
if((xmlObjGetCommentsTeaser!=null)&&(xmlObjGetCommentsTeaser.readyState==4)&&(xmlObjGetCommentsTeaser.status==200))
{document.getElementById(commentTeaserTagId).innerHTML=xmlObjGetCommentsTeaser.responseText;xmlObjGetCommentsTeaser=null;try{afterresize();}catch(adresizeteasercomment){}}}
function ShowComments(count)
{commentsCountToShow=count;var commenEntityTypeId=-1;var idValue=-1;var alldivs=document.getElementsByTagName("div");for(var i=0;i<alldivs.length;i++)
{if(alldivs[i].getAttribute('id')!=null&&alldivs[i].getAttribute('id').match('comment-'))
{commentTagId=alldivs[i].getAttribute('id');commenEntityTypeId=GetCommentEntityTypeIndex(commentTagId)+1;idValue=GetCommentId(commentTagId);if(commentsDebug==1)
alert("ShowComments:comment div tag found, id = "+commentTagId+", commenEntityTypeId = "+commenEntityTypeId+", id = "+idValue);break;}}
if(idValue!=-1)
{xmlObjGetComments=CreateAJAXRequest();var parameters="entityid="+idValue+"&commententitytypeid="+commenEntityTypeId+"&count="+count+"&op=getcomments"+"&idioma="+language;if(commentsDebug==1)
alert("ShowComments:UrlProcessComment = "+UrlProcessComment+", parameters = "+parameters);xmlObjGetComments=CreateAJAXRequest();xmlObjGetComments.open("POST",UrlProcessComment,true);xmlObjGetComments.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlObjGetComments.setRequestHeader("Content-length",parameters.length);xmlObjGetComments.onreadystatechange=RetrieveGetCommentsData;xmlObjGetComments.send(parameters);}
else
{if(commentsDebug==1)
alert("ShowComments:No comment div tag found");}}
function RetrieveGetCommentsData()
{var outputText;if(commentsDebug==1)
{alert("RetrieveGetCommentsData:responseText = "+xmlObjGetComments.responseText);}
if((xmlObjGetComments!=null)&&(xmlObjGetComments.readyState==4)&&(xmlObjGetComments.status==200))
{if(document.getElementById("div-commentsloadingindicator"))
document.getElementById("div-commentsloadingindicator").style.display="none";document.getElementById(commentTagId).innerHTML=xmlObjGetComments.responseText;xmlObjGetComments=null;}}
function ShowPostComment()
{var loggedIn=IsUserLoggedIn();if(!loggedIn)
{loginCallBack=function(){document.location.reload();};signupCallBack=function(){document.location.reload();};showLoginDialog();return;}
CloseAnyPreviousMessageBox();FocusOnCommentBox();}
function FocusOnCommentBox()
{var divId="div-post-comment";if(document.getElementById(divId))
{document.getElementById(divId).style.display="";document.getElementById("textarea-postcomment").value=GetDefaultCommentMessage();document.getElementById("textarea-postcomment").focus();}}
function GetDefaultCommentMessage()
{if(language=="EN")return commentMessageEN;return commentMessageES;}
function getLanguage()
{var lang=getCookie("idioma");if(lang!=null)
lang=lang.toUpperCase();return lang;}
function getCookie(Name)
{var search=Name+"=";document.cookie.setDomain="batanga.com";if(document.cookie.length>0)
{offset=document.cookie.indexOf(search)
if(offset!=-1&&offset!=null){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)
end=document.cookie.length;return unescape(document.cookie.substring(offset,end));}}
else
{return null;}}
function PostComment(entityId,commentEntityTypeId)
{var commentText=document.getElementById("textarea-postcomment").value;commentText=GetMessageText(commentText);if(commentText.length==0)
{ShowMissingPostErrorMessage();return;}
var userId=GetLoggedInUserID();var parameters="userid="+userId+"&entityid="+entityId+"&commententitytypeid="+commentEntityTypeId+"&commenttext="+escape(commentText)+"&op=postcomment"+"&idioma="+language;if(commentsDebug==1)
alert("PostComment:UrlProcessComment = "+UrlProcessComment+", parameters = "+parameters);xmlObjAddComment=CreateAJAXRequest();xmlObjAddComment.open("POST",UrlProcessComment,false);xmlObjAddComment.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlObjAddComment.setRequestHeader("Content-length",parameters.length);xmlObjAddComment.send(parameters);if(commentsDebug==1)
alert("PostComment:responseText= "+xmlObjAddComment.responseText);outputText=xmlObjAddComment.responseText;outputText=decode(outputText);var status=getTagValue(outputText,"status");if(status!="-1")
{ShowComments(commentsCountToShow);ShowCommentsTeaser();}
else
{var reason=getTagValue(outputText,"errormessage");alert(reason);}
xmlObjAddComment=null;}
function ShowMissingPostErrorMessage()
{document.getElementById("div-comment-missingpost-error").style.display="";}
function HideMissingPostErrorMessage()
{document.getElementById("div-comment-missingpost-error").style.display="none";}
function GetAddCommentStatusCode()
{if(language=="EN")
return"Saving...";else
return"Guardando...";}
function GetLoggedInUserID()
{var userId=getCookie("batangauserid");return userId;}
function IsUserLoggedIn()
{var batangacom=getCookie("batangacom");if(batangacom==null||batangacom.length==0)
return false;var batangakey=getCookie("batangakey");if(batangakey==null||batangakey.length==0)
return false;return true;}
function CloseAnyPreviousMessageBox()
{if(previousAbuseId!=null&&document.getElementById(previousAbuseId))
{document.getElementById(previousAbuseId).style.display="none";}
ClosePostComment();}
function ReportAbuse(commentId)
{var loggedIn=IsUserLoggedIn();if(!loggedIn)
{loginCallBack=function(){document.location.reload();};signupCallBack=function(){document.location.reload();};showLoginDialog();return;}
var divId="div-reportabuse-"+commentId;CloseAnyPreviousMessageBox();document.getElementById(divId).style.display="";previousAbuseId=divId;abuseSubmitId="abuseSubmit-"+commentId;document.getElementById(abuseSubmitId).focus();}
function ClearDefaultMessage(divId)
{if(document.getElementById(divId))
{value=document.getElementById(divId).value;if(value==commentOptionalMessageEN||value==commentOptionalMessageES||value==commentMessageEN||value==commentMessageES)
{document.getElementById(divId).value="";document.getElementById(divId).style.color="black";}}}
function ResetPostCommentDefaultMessage()
{divId="textarea-postcomment";if(document.getElementById(divId))
{value=document.getElementById(divId).value;if(value=="")
{if(language=="EN")
document.getElementById(divId).value=commentMessageEN;else
document.getElementById(divId).value=commentMessageES;}}}
function ResetDefaultMessage(divId)
{if(document.getElementById(divId))
{value=document.getElementById(divId).value;if(value=="")
{if(language=="EN")
document.getElementById(divId).value=commentOptionalMessageEN;else
document.getElementById(divId).value=commentOptionalMessageES;}}}
function GetAbuseReasonId_Old(commentId)
{var abuseReasonTag="radio-abusereason-"+commentId;for(i=1;i<=5;i++)
{var abuseRadioId=document.getElementById(abuseReasonTag+"-"+i);if(abuseRadioId.checked)
return abuseRadioId.value;}
return 0;}
function GetAbuseReasonId(commentId)
{var abuseReasonTag="radio-abusereason-"+commentId;var allInputs=document.getElementsByTagName("input");for(var i=0;i<allInputs.length;i++)
{if(allInputs[i].getAttribute('id')!=null&&allInputs[i].getAttribute('id').match(abuseReasonTag))
{if(allInputs[i].checked)
{return allInputs[i].value;}}}
return 0;}
function GetMessageText(text)
{if(text==commentOptionalMessageEN||text==commentOptionalMessageES||text==commentMessageEN||text==commentMessageES)
return"";else
return text;}
function SubmitAbuse(commentId)
{xmlObjSubmitAbuse=CreateAJAXRequest();if(xmlObjSubmitAbuse==null)
return;var abuseReasonText=document.getElementById("reportabuse-textarea-"+commentId).value;abuseReasonText=GetMessageText(abuseReasonText);var abuseReasonId=GetAbuseReasonId(commentId);var userId=GetLoggedInUserID();var parameters;parameters="userid="+userId;parameters=parameters+"&commentid="+commentId;parameters=parameters+"&abusereasonid="+abuseReasonId;parameters=parameters+"&abusereasontext="+abuseReasonText;parameters=parameters+"&op=reportabuse";parameters=parameters+"&idioma="+language;if(commentsDebug==1)
alert("SubmitAbuse: url = "+UrlProcessComment+", parm = "+parameters);xmlObjSubmitAbuse.open("POST",UrlProcessComment,false);xmlObjSubmitAbuse.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlObjSubmitAbuse.setRequestHeader("Content-length",parameters.length);xmlObjSubmitAbuse.send(parameters);if(commentsDebug==1)
alert("SubmitAbuse:responseText= "+xmlObjSubmitAbuse.responseText);outputText=xmlObjSubmitAbuse.responseText;outputText=decode(outputText);var commentId=getTagValue(outputText,"status");if(commentId!="-1")
{AbuseCompleted(commentId);}
else
{var reason=getTagValue(outputText,"errormessage");alert(reason);}
xmlObjSubmitAbuse=null;}
function decode(str)
{var textToWork=str;textToWork=textToWork.replace(/&lt;/g,"<");textToWork=textToWork.replace(/&gt;/g,">");textToWork=textToWork.replace(/&quot;/g,"\"");textToWork=textToWork.replace(/&amp;/g,"&");textToWork=textToWork.replace(/&nbsp;/g," ");return textToWork;}
function getTagValue(data,tag)
{var returnValue=null;var startTag="<"+tag+">";var endTag="</"+tag+">";var startPos=data.indexOf(startTag);if(startPos>=0)
{returnValue=data.substr(startPos+startTag.length);returnValue=returnValue.substr(0,returnValue.indexOf(endTag));}
return returnValue;}
function SubmitAbuseCallback()
{var outputText;if(commentsDebug==1)
{alert("SignupUserCallback:responseText="+xmlObjSubmitAbuse.responseText);}
if((xmlObjSubmitAbuse!=null)&&(xmlObjSubmitAbuse.readyState==4)&&(xmlObjSubmitAbuse.status==200))
{outputText=xmlObjSubmitAbuse.responseText;outputText=decode(outputText);var commentId=getTagValue(outputText,"status");if(commentId!="-1")
{AbuseCompleted(commentId);}
else
{var reason=getTagValue(outputText,"errormessage");alert(reason);}}}
function AbuseCompleted(commentId)
{CloseReportAbuse(commentId);var reportedDivId="abusereported-"+commentId;document.getElementById(reportedDivId).style.display="";var linkReportAbuse="linkReportAbuse-"+commentId;document.getElementById(linkReportAbuse).style.display="none";}
function CloseReportAbuse(commentId)
{var divId="div-reportabuse-"+commentId;if(document.getElementById(divId))
{document.getElementById(divId).style.display="none";previousAbuseId=null;}}
function ClosePostComment()
{var divId="div-post-comment";if(document.getElementById(divId))
{document.getElementById(divId).style.display="none";}}
function UpdateCharsLeft()
{var commentTextToLookFor;if(language=="EN")
{commentTextToLookFor=commentMessageEN;}
else
{commentTextToLookFor=commentMessageES;}
var commetTextArea=document.getElementById("textarea-postcomment");var commentTextValue=commetTextArea.value;if(commentTextValue.indexOf(commentTextToLookFor)!=-1)
{commetTextArea.value=commentTextValue.replace(commentTextToLookFor,"");}
commetTextArea.style.color="black";var textLength=800-commetTextArea.value.length;var remainingCharsTag=document.getElementById("span-remaining-chars");var message;if(language=="EN")
{message="You have "+textLength+" characters left.";}
else
{message="Te quedan "+textLength+" caracteres restantes.";}
remainingCharsTag.innerHTML=message;HideMissingPostErrorMessage();}
function limitText(limitField,limitNum)
{if(limitField.value.length>=limitNum)
{limitField.value=limitField.value.substring(0,limitNum-1);}}
function GetXmlHttpObject(handler)
{var objXmlHttp=null
if(navigator.userAgent.indexOf("Opera")>=0)
{alert("This example doesn't work in Opera")
return}
if(navigator.userAgent.indexOf("MSIE")>=0)
{var strName="Msxml2.XMLHTTP"
if(navigator.appVersion.indexOf("MSIE 5.5")>=0)
{strName="Microsoft.XMLHTTP"}
try
{objXmlHttp=new ActiveXObject(strName)
objXmlHttp.onreadystatechange=handler
return objXmlHttp}
catch(e)
{alert("Error. Scripting for ActiveX might be disabled")
return}}
if(navigator.userAgent.indexOf("Mozilla")>=0)
{objXmlHttp=new XMLHttpRequest()
objXmlHttp.onload=handler
objXmlHttp.onerror=handler
return objXmlHttp}}
function launchJavascriptFromXML(responseXML){var scripts=responseXML.getElementsByTagName('script');var js='';for(var s=0;s<scripts.length;s++){if(scripts[s].childNodes[0].nodeValue==null)continue;js+=scripts[s].childNodes[0].nodeValue;}
eval(js);}
function launchJavascript(responseText){var ScriptFragment='(?:<script.*?>)((\n|.)*?)(?:</script>)';var match=new RegExp(ScriptFragment,'img');var scripts=responseText.match(match);if(scripts){var js='';for(var s=0;s<scripts.length;s++){var match=new RegExp(ScriptFragment,'im');js+=scripts[s].match(match)[1];}
eval(js);}}
var useNewFavoritesButton=false;var oldLoginCallBack=null;var oldSignupCallBack=null;var favoritesDebug=0;var OneClickLinksNotBold=false;var OneClickImageLinks=false;var UrlProcessFavorite="processfavorite.aspx";var UrlRemoveFromFavoritesImage="/images/addtofavorites.gif";var UrlAddToFavoritesImage="/images/removefromfavorites.gif";var ImAFanOff="http://radio.batanga.com/images/favorites/Fan_off.gif";var ImAFanOn="http://radio.batanga.com/images/favorites/Fan_on.gif";var ImAFanOver="http://radio.batanga.com/images/favorites/Fan_over.gif";var FanImages=new Array();FanImages[0]=new Image();FanImages[0].src=ImAFanOff;FanImages[1]=new Image();FanImages[1].src=ImAFanOn;FanImages[2]=new Image();FanImages[2].src=ImAFanOver;var favoriteTagsList=null;var oneClickTagsList=null;var xmlObjCheckFavorites=null;var xmlObjAddFavorite=null;var xmlObjGetFavorites=null;var xmlObjRemoveFavorite=null;var favoritesSupported=new Array("station","video","artist","song");var language=getCookie("idioma");var removeFavoriteText;var addToFavoriteText;var removeFanText;var addFanText;var addedFanText;var removeFavoriteTip;var addToFavoriteTip;var removeFanTip;var addFanTip;var favoriteTextCss="";if(language=="EN")
{removeFavoriteText="Remove";removeFavoriteTip="Remove from Favorites";addToFavoriteText="Save";addToFavoriteTip="Save to Favorites";addFanText="I'm a Fan &gt;&nbsp;";addedFanText="I'm a Fan&nbsp;";addFanTip="";removeFanText="Remove&nbsp;";removeFanTip="";}
else
{addToFavoriteTip="Guardar como Favorito";addToFavoriteText="Guardar";removeFavoriteTip="Eliminar de Favoritos";removeFavoriteText="Eliminar";addFanText="Soy Fan &gt;&nbsp;";addedFanText="Soy Fan&nbsp;";addFanTip="";removeFanText="Eliminar&nbsp;";removeFanTip="";}
if(document.getElementById("ImAFanActive")!=null)
{if(document.getElementById("ImAFanActive").value=="1")
{useNewFavoritesButton=true;}}
function GetFavoriteType(tagName)
{for(var j=0;j<favoritesSupported.length;j++)
if(tagName.match(favoritesSupported[j]))
return favoritesSupported[j];return null;}
function GetFavoriteId(tagName,favoriteType)
{var favTag="fav-"+favoriteType+"-";var id=tagName.substr(tagName.indexOf(favTag)+favTag.length);return id;}
function GetOneClickId(tagName,favoriteType)
{var oneClickTag="oneclick-";var id=tagName.substr(tagName.indexOf(oneClickTag)+oneClickTag.length);return id;}
function GetLoggedInUserID()
{var userID=getCookie("batangauserid");return userID;}
function IsUserLoggedIn()
{var batangacom=getCookie("batangacom");if(batangacom==null||batangacom.length==0)
return false;var batangakey=getCookie("batangakey");if(batangakey==null||batangakey.length==0)
return false;return true;}
function GetXmlDoc(text)
{if(typeof(text)!="undefined")
{var xmlDoc;if(window.ActiveXObject)
{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.loadXML(text);}
else
{if(favoritesDebug==1){alert("Dom Text: "+text);}
var parser=new DOMParser();var xmlDoc=parser.parseFromString(text,"text/xml");}}
return xmlDoc;}
function ResetAllFavoriteTags()
{for(var i=0;i<favoriteTagsList.length;i++)
{var favoriteTag=favoriteTagsList[i];var favoriteTagId=favoriteTag.getAttribute('id');var favoriteType=GetFavoriteType(favoriteTagId);var favoriteID=GetFavoriteId(favoriteTagId,favoriteType);favoriteTag.innerHTML=GetAddToFavoriteCode(favoriteID,favoriteType);favoriteTag.style.display="";}}
function ProcessFavorites()
{if(favoritesDebug==1)
alert("ProcessFavorites()");ProcessCheckFavorites();}
function FavoriteElementAlreadyAdded(id,addedFavoriteTagsList)
{for(var i=0;i<addedFavoriteTagsList.length;i++)
{if(addedFavoriteTagsList[i]==id)
return true;}
return false;}
function OneClickElementAlreadyAdded(id,addedOneClickTagsList)
{for(var i=0;i<addedOneClickTagsList.length;i++)
{if(addedOneClickTagsList[i]==id)
return true;}
return false;}
function ProcessCheckFavorites()
{favoriteTagsList=new Array();oneClickTagsList=new Array();var alldivs=document.getElementsByTagName("div");for(var i=0;i<alldivs.length;i++)
{if(alldivs[i].getAttribute('id')!=null&&alldivs[i].getAttribute('id').match('fav-'))
{favoriteTagsList[favoriteTagsList.length]=alldivs[i];}
else if(alldivs[i].getAttribute('id')!=null&&alldivs[i].getAttribute('id').match('oneclick-'))
{oneClickTagsList[oneClickTagsList.length]=alldivs[i];}}
var loggedIn=IsUserLoggedIn();var addedFavoriteTagsList=new Array();var addedOneClickTagsList=new Array();var userID=GetLoggedInUserID();if(!loggedIn){userID=0;}
var XML=new XMLWriter();XML.BeginNode("OneClickFavorites");XML.BeginNode("Favorites");if(loggedIn)
{XML.BeginNode("checkfavorites");XML.Node("userid",userID);for(var i=0;i<favoriteTagsList.length;i++)
{var tagObj=favoriteTagsList[i];var tagName=tagObj.getAttribute('id');if(!FavoriteElementAlreadyAdded(tagName,addedFavoriteTagsList))
{var idValue=-1;for(var j=0;j<favoritesSupported.length;j++)
{if(tagName.match(favoritesSupported[j]))
{XML.BeginNode(favoritesSupported[j]);idValue=GetFavoriteId(tagName,favoritesSupported[j]);XML.Node("id",idValue);addedFavoriteTagsList[addedFavoriteTagsList.length]=tagName;XML.EndNode();break;}}}
else
{if(favoritesDebug==1)
alert("ProcessCheckFavorites: id "+tagName+" already added. Not added again to the check favorites xml");}}
XML.EndNode();}
else
{ResetAllFavoriteTags();}
XML.EndNode();XML.BeginNode("OneClick");XML.BeginNode("artists");for(var i=0;i<oneClickTagsList.length;i++)
{var tagObj=oneClickTagsList[i];var tagName=tagObj.getAttribute('id');if(!OneClickElementAlreadyAdded(tagName,addedOneClickTagsList))
{var idValue=-1;XML.BeginNode("artist");idValue=GetOneClickId(tagName,favoritesSupported[j]);XML.Node("id",idValue);addedOneClickTagsList[addedOneClickTagsList.length]=tagName;XML.EndNode();}
else
{if(favoritesDebug==1)
alert("ProcessCheckFavorites: artist one-click id "+tagName+" already added. Not added again to the check favorites xml");}}
XML.EndNode();XML.EndNode();XML.EndNode();var xmlQueryData=XML.ToString();xmlObjCheckFavorites=CreateFavoritesAJAXRequest();var parameters=xmlQueryData;if(favoritesDebug==1)
alert("ProcessCheckFavorites:UrlProcessFavorite = "+UrlProcessFavorite+", parameters = "+parameters);xmlObjCheckFavorites.open("POST",UrlProcessFavorite,true);xmlObjCheckFavorites.setRequestHeader("Content-Type","text/xml");xmlObjCheckFavorites.setRequestHeader("Content-length",parameters.length);xmlObjCheckFavorites.onreadystatechange=RetrieveCheckFavoritesData;xmlObjCheckFavorites.send(parameters);}
function RetrieveCheckFavoritesData()
{var outputText;if(favoritesDebug==1)
{alert("RetrieveCheckFavoritesData:responseText = "+xmlObjCheckFavorites.responseText);}
if((xmlObjCheckFavorites!=null)&&(xmlObjCheckFavorites.readyState==4)&&(xmlObjCheckFavorites.status==200))
{try
{var xmlDoc=GetXmlDoc(xmlObjCheckFavorites.responseText);var FavoritesXML=xmlDoc.childNodes[0].firstChild;var OneClickXML=xmlDoc.childNodes[0].lastChild;UpdateCheckFavoritesTags(FavoritesXML);UpdateCheckOneClickTags(OneClickXML);}
catch(err)
{return;}
xmlObjCheckFavorites=null;}
var loggedIn=IsUserLoggedIn();if(!loggedIn)
{ResetAllFavoriteTags();if(favoritesDebug==1)
alert("ProcessFavorites():User not logged in, returning...");return;}}
function UpdateCheckFavoritesTags(xmlDoc)
{var favoriteText;var id;var isFavorite;var favTagName;var favoriteTag;if(typeof(xmlDoc)=="undefined")
{if(favoritesDebug==1)
alert("UpdateCheckFavoritesTags:xmlDoc is undefined");return;}
for(var j=0;j<favoritesSupported.length;j++)
{try
{myNodes=xmlDoc.getElementsByTagName(favoritesSupported[j]);}
catch(err)
{return;}
for(var k=0;k<myNodes.length;k++)
{id=myNodes[k].getElementsByTagName('id')[0].firstChild.data;isFavorite=myNodes[k].getElementsByTagName('isfavorite')[0].firstChild.data;favTagName="fav-"+favoritesSupported[j]+"-"+id;if(isFavorite=="1")
{favoriteText=GetRemoveFavoriteCode(id,favoritesSupported[j]);}
else
{favoriteText=GetAddToFavoriteCode(id,favoritesSupported[j]);}
UpdateFavoriteElemets(favTagName,favoriteText);}}}
function UpdateCheckOneClickTags(xmlDoc)
{var OneClickText;var id;var PlaylistID;var OneClickTagName;var OneClickTag;var RelatedArtists;myNodes=xmlDoc.getElementsByTagName("artist");for(var k=0;k<myNodes.length;k++)
{id=myNodes[k].getElementsByTagName('id')[0].firstChild.data;PlaylistID=myNodes[k].getElementsByTagName("PlaylistID")[0].firstChild.data;FeaturedArtistNames=new Array();FeaturedArtistIds=new Array();if(PlaylistID>0)
{OneClickTagName="oneclick-"+id;var RelatedArtistsNodes=myNodes[k].getElementsByTagName("FeaturedArtists")[0].getElementsByTagName("FeaturedArtist");for(var i=0;i<RelatedArtistsNodes.length;i++)
{var fa_id=RelatedArtistsNodes[i].getElementsByTagName("id")[0].firstChild.data;var fa_name=RelatedArtistsNodes[i].getElementsByTagName("name")[0].firstChild.data;FeaturedArtistNames[FeaturedArtistNames.length]=fa_name;FeaturedArtistIds[FeaturedArtistIds.length]=fa_id;}
if(OneClickImageLinks)
{OneClickText='<a target="batangaplayer2010" href="http://www.batanga.com/?playlistid='+PlaylistID+'"><img src="http://www.batanga.com/images/playl.gif" alt="play it" border="0" style="border:0px"></a>';}
else if(OneClickLinksNotBold)
if(language=='EN')
{OneClickText='<a href="#" onclick="OpenArtistRadio(\''+PlaylistID+'\',\''+FeaturedArtistNames[0]+'\');">'+FeaturedArtistNames[0]+' Radio</a> - Featuring Artists like: ';}
else
{OneClickText='<a href="#" onclick="OpenArtistRadio(\''+PlaylistID+'\',\''+FeaturedArtistNames[0]+'\');"> Radio '+FeaturedArtistNames[0]+'</a> - Destacando artistas como: ';}
else
if(language=='EN')
{OneClickText='<a href="#" onclick="OpenArtistRadio(\''+PlaylistID+'\',\''+FeaturedArtistNames[0]+'\');">'+FeaturedArtistNames[0]+' Radio</a> - Featuring Artists like: ';}
else
{OneClickText='<a href="#" onclick="OpenArtistRadio(\''+PlaylistID+'\',\''+FeaturedArtistNames[0]+'\');"> Radio '+FeaturedArtistNames[0]+'</a> - Destacando artistas como: ';}
if(!OneClickImageLinks)
for(var x=0;x<FeaturedArtistNames.length;x++)
{if(x==FeaturedArtistNames.length-2)
{if(language=='EN')
{OneClickText+=BuildArtistLink(FeaturedArtistIds[x],FeaturedArtistNames[x])+', and ';}
else
{OneClickText+=BuildArtistLink(FeaturedArtistIds[x],FeaturedArtistNames[x])+', y ';}}
else if(x==FeaturedArtistNames.length-1)
{OneClickText+=BuildArtistLink(FeaturedArtistIds[x],FeaturedArtistNames[x]);}
else
{OneClickText+=BuildArtistLink(FeaturedArtistIds[x],FeaturedArtistNames[x])+', ';}}
UpdateOneClickElemets(OneClickTagName,OneClickText);}}}
function BuildArtistLink(ArtistID,ArtistName)
{return ArtistName;}
function CreateFavoritesAJAXRequest()
{var http_request=null;if(window.XMLHttpRequest)
{http_request=new XMLHttpRequest();if(http_request.overrideMimeType)
{http_request.overrideMimeType('text/xml');}}
else if(window.ActiveXObject)
{http_request=new ActiveXObject("Microsoft.XMLHTTP");}
if(!http_request)
{alert("CreateFavoritesAJAXRequest:Cannot create XMLHTTP instance");}
return http_request;}
function GetRemoveFavoriteCode(id,favoriteType)
{if(document.getElementById("ImAFanActive")!=null)
{if(document.getElementById("ImAFanActive").value=="1")
{useNewFavoritesButton=true;}}
var removeFavoriteCode;if(useNewFavoritesButton==false)
{removeFavoriteCode="<img style=\"border:0px none;\" border=\"0\" src=\""+UrlAddToFavoritesImage+"\" /> <a href=\"#\" title=\""+removeFavoriteTip+"\" onclick=\"javascript:RemoveFromFavorites('"+id+"', '"+favoriteType+"'); return false;\"> <span class="+favoriteTextCss+">"+removeFavoriteText+"</span></a>";}
else
{removeFavoriteCode="<div onclick='javascript:RemoveFromFavorites(\""+id+"\", \""+favoriteType+"\");' style='padding-left:19px;color: #000000; overflow:hidden;height:20px; line-height:20px; cursor: pointer; cursor: hand; font-size: 10px; background-image: url("+FanImages[1].src+");background-repeat:no-repeat' onmouseover='this.style.color=\"#FFFFFF\"; this.style.background=\"url("+FanImages[2].src+")\";this.innerHTML=removeFanText;' onmouseout='this.style.color=\"#000000\"; this.style.background=\"url("+FanImages[1].src+")\";this.innerHTML=addedFanText'>"+addedFanText+"</div>";}
return removeFavoriteCode;}
function GetAddToFavoriteCode(id,favoriteType)
{if(document.getElementById("ImAFanActive")!=null)
{if(document.getElementById("ImAFanActive").value=="1")
{useNewFavoritesButton=true;}}
var addToFavoriteCode;if(useNewFavoritesButton==false)
{addToFavoriteCode="<img style=\"border:0px none;\" border=\"0\" src=\""+UrlRemoveFromFavoritesImage+"\" /> <a href=\"#\" title=\""+addToFavoriteTip+"\" onclick=\"javascript:AddToFavorites('"+id+"', '"+favoriteType+"'); return false;\"> <span class="+favoriteTextCss+">"+addToFavoriteText+"</span></a>";}
else
{addToFavoriteCode="<div onclick='javascript:AddToFavorites(\""+id+"\", \""+favoriteType+"\");' style='padding-left:19px; color: #336698; overflow:hidden; height:20px;line-height:21px; font-size: 10px; cursor: pointer; cursor: hand;background-repeat:no-repeat; background-image: url("+FanImages[0].src+");'>"+addFanText+"</div>";}
return addToFavoriteCode;}
function CheckAndAddToFavorites(id,favoriteType,loginType)
{var loggedIn=IsUserLoggedIn();if(!loggedIn)
return;var userID=GetLoggedInUserID();if(!IsFavorite(userID,id,favoriteType))
AddToFavorites(id,favoriteType);if(oldLoginCallBack&&loginType==1)
{loginCallBack=oldLoginCallBack;oldLoginCallBack=null;loginCallBack();}
if(oldSignupCallBack&&loginType==2)
{signupCallBack=oldSignupCallBack;oldSignupCallBack=null;signupCallBack();}}
function IsFavorite(userID,id,favoriteType)
{xmlObjIsFavorite=CreateFavoritesAJAXRequest();if(xmlObjIsFavorite==null)
return;var parameters="userid="+userID+"&id="+id+"&op=isfavorite"+"&favoritetype="+favoriteType;if(favoritesDebug==1)
alert("IsFavorite:UrlProcessFavorite = "+UrlProcessFavorite+", parameters = "+parameters);xmlObjIsFavorite.open("POST",UrlProcessFavorite,false);xmlObjIsFavorite.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlObjIsFavorite.setRequestHeader("Content-length",parameters.length);xmlObjIsFavorite.send(parameters);if(favoritesDebug==1)
alert("IsFavorite:responseText="+xmlObjIsFavorite.responseText);var xmlDoc=GetXmlDoc(xmlObjIsFavorite.responseText);var isFavorite=xmlDoc.getElementsByTagName('isfavorite')[0].firstChild.data;xmlObjIsFavorite=null;return(isFavorite=="1");}
function UpdateFavoriteElemets(id,htmlCode)
{for(var i=0;i<favoriteTagsList.length;i++)
{var tagObj=favoriteTagsList[i];var tagName=tagObj.getAttribute('id');if(tagName==id)
{if(favoritesDebug==1)
alert("UpdateFavoriteElemets:Updating code for id="+id);tagObj.innerHTML=htmlCode;tagObj.style.display="";}}}
function UpdateOneClickElemets(id,htmlCode)
{for(var i=0;i<oneClickTagsList.length;i++)
{var tagObj=oneClickTagsList[i];var tagName=tagObj.getAttribute('id');if(tagName==id)
{if(favoritesDebug==1)
alert("UpdateFavoriteElemets:Updating code for id="+id);tagObj.innerHTML=htmlCode;tagObj.style.display="";}}}
function RemoveFromFavorites(id,favoriteType)
{var loggedIn=IsUserLoggedIn();if(!loggedIn)
return;var userID=GetLoggedInUserID();if(userID==null)
return;xmlObjRemoveFavorite=CreateFavoritesAJAXRequest();var favoriteElementID="fav-"+favoriteType+"-"+id;UpdateFavoriteElemets(favoriteElementID,GetRemoveFromFavoriteStatusCode());var parameters="userid="+userID+"&id="+id+"&favoritetype="+favoriteType+"&op=removefavorite";if(favoritesDebug==1)
alert("RemoveFromFavorites:UrlProcessFavorite = "+UrlProcessFavorite+", parameters = "+parameters);xmlObjRemoveFavorite.open("POST",UrlProcessFavorite,false);xmlObjRemoveFavorite.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlObjRemoveFavorite.setRequestHeader("Content-length",parameters.length);xmlObjRemoveFavorite.send(parameters);if(favoritesDebug==1)
alert("RemoveFromFavorites:responseText="+xmlObjRemoveFavorite.responseText);var xmlDoc=GetXmlDoc(xmlObjRemoveFavorite.responseText);var status=xmlDoc.getElementsByTagName('status')[0].firstChild.data;if(status=="0")
{UpdateFavoriteElemets(favoriteElementID,GetAddToFavoriteCode(id,favoriteType));}
else
{var error=xmlDoc.getElementsByTagName('error')[0].firstChild.data;alert(error);UpdateFavoriteElemets(favoriteElementID,GetRemoveFavoriteCode(id,favoriteType));}
xmlObjRemoveFavorite=null;}
function AddToFavorites(id,favoriteType)
{var loggedIn=IsUserLoggedIn();if(!loggedIn)
{if(loginCallBack)
oldLoginCallBack=loginCallBack;if(signupCallBack)
oldSignupCallBack=signupCallBack;loginCallBack=function(){CheckAndAddToFavorites(id,favoriteType,1);};signupCallBack=function(){CheckAndAddToFavorites(id,favoriteType,2);};showLoginDialog();return;}
var userID=GetLoggedInUserID();xmlObjAddFavorite=CreateFavoritesAJAXRequest();var favoriteElementID="fav-"+favoriteType+"-"+id;UpdateFavoriteElemets(favoriteElementID,GetAddToFavoriteStatusCode());var parameters="userid="+userID+"&id="+id+"&favoritetype="+favoriteType+"&op=addfavorite";if(favoritesDebug==1)
alert("AddToFavorites:UrlProcessFavorite = "+UrlProcessFavorite+", parameters = "+parameters);xmlObjAddFavorite.open("POST",UrlProcessFavorite,false);xmlObjAddFavorite.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlObjAddFavorite.setRequestHeader("Content-length",parameters.length);xmlObjAddFavorite.send(parameters);if(favoritesDebug==1)
alert("AddToFavorites:responseText= "+xmlObjAddFavorite.responseText);var xmlDoc=GetXmlDoc(xmlObjAddFavorite.responseText);var status=xmlDoc.getElementsByTagName('status')[0].firstChild.data;if(status=="0")
{UpdateFavoriteElemets(favoriteElementID,GetRemoveFavoriteCode(id,favoriteType));}
else if(status=="2")
{UpdateFavoriteElemets(favoriteElementID,GetAddToFavoriteCode(id,favoriteType));var errorText="No puedes a&ntilde;adir tu propia estaci&otilde;n de radio como tu favorita.";if(language=="EN")
errorText="You cannot add your own radio station as your favorite.";alert(errorText);}
else
{var error=xmlDoc.getElementsByTagName('error')[0].firstChild.data;alert(error);UpdateFavoriteElemets(favoriteElementID,GetAddToFavoriteCode(id,favoriteType));}
xmlObjAddFavorite=null;}
function GetAddToFavoriteStatusCode()
{if(language=="EN")
return"Saving...";else
return"Guardando...";}
function GetRemoveFromFavoriteStatusCode()
{if(language=="EN")
return"Removing...";else
return"Eliminando...";}
function OpenArtistRadio(PlaylistID,ArtistName)
{window.open('http://myradio.batanga.com/Player/player.aspx?PlaylistID='+PlaylistID+'&q='+ArtistName,'LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=650,height=600');}
function loginCompleted(linkID)
{}
loginCallBack=function(){loginCompleted("LinkTrack_Login_");}
signupCallBack=function(){loginCompleted("LinkTrack_Signup_");}
UrlProcessFavorite="/favoriteshelper/processfavorite.aspx";UrlRemoveFromFavoritesImage=siteRootFolder+"/images/addtofavorites.gif";UrlAddToFavoritesImage=siteRootFolder+"/images/removefromfavorites.gif";function CallPlayListWM(StationID,idioma){var Format='wm';Speed="2";window.open('http://radio.batanga.com/'+idioma+'/LaunchPlaylistEM.asp?StationID='+StationID+'&Format='+Format+'&Speed='+Speed+'&context=','LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=430,height=745');}
function OpenMyRadioURL(URL)
{window.open(URL,'LaunchPlayerAndPlaylist','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=430,height=745');}
function OpenMyRadio(PlaylistID)
{OpenMyRadioURL('./Player/player.aspx?PlaylistID='+PlaylistID);}
var pluckLoginOverrideCompleted=false;var pluckLoginOverrideAttempts=0;var pluckLoginOverrideMaxAttempts=30;var pluckLoginOverrideTimer=null;var enableConsoleLog=false;if(enableConsoleLog)
window.document.title=window.document.title+" - WARNING!!! console log is enabled.";function ExtractPluckContent(content)
{alert("ExtractPluckContent");var tagDelimiter='/script>';var index=content.lastIndexOf(tagDelimiter);content=content.substr(index+tagDelimiter.length);return content;}
function Batanga_ShowReportAbuse(e,docUrl,sitelifePostUrl)
{alert("Batanga_ShowReportAbuse");if(!IsUserLoggedIn())
{showLoginDialog();return false;}
return ShowReportAbuse(e,docUrl,sitelifePostUrl);}
function GetElementsByClassName(classname,node){if(!node)
{log('node is null. using body');node=document.getElementsByTagName("body")[0];}
var a=[];var re=new RegExp('\\b'+classname+'\\b');var els=node.getElementsByTagName("*");for(var i=0,j=els.length;i<j;i++)
if(re.test(els[i].className))a.push(els[i]);log('a.length = '+a.length);return a;}
function getIframe(frameId)
{var myTop;if(window.frameElement){myTop=window.frameElement;}else if(window.top){myTop=window.top;}
var iFs=myTop.document.getElementsByTagName('iframe');var x,i=iFs.length;while(i--){x=iFs[i];if(x.id==frameId)
return x;}
return null;}
function log(str)
{if(enableConsoleLog)
console.log(str);}
function logobj(obj)
{if(enableConsoleLog)
console.dir(obj);}
function PluckLoginOverride(frameId,classIdToLookFor){alert("PluckLoginOverride");log('In PluckLoginOverride');if(IsUserLoggedIn())
{log('user already logged in..returning...');return;}
if(pluckLoginOverrideCompleted||pluckLoginOverrideAttempts++>pluckLoginOverrideMaxAttempts)
{if(pluckLoginOverrideTimer!=null)
clearTimeout(pluckLoginOverrideTimer);log('PluckLoginOverride:done with no changes');return;}
var ele=null;log('calling GetElementsByClassName without iframe first');var eleLogin=GetElementsByClassName('SiteLife_Login',null);try{if(eleLogin!=null&&eleLogin.length>0)
{log('ele FOUND! without iframe');ele=eleLogin[0];}
else
{frameId=frameId||'commentsiframe';log('frameId = '+frameId);classIdToLookFor=classIdToLookFor||'SiteLife_Login';log('classIdToLookFor = '+classIdToLookFor);var iframeElem=parent.document.getElementById(frameId);if(iframeElem!=null){var doc;if(iframeElem.contentDocument&&iframeElem.contentDocument!='undefined')
{log('using contentDocument = '+iframeElem.contentDocument);doc=iframeElem.contentDocument;}
else
{log('using contentWindow = '+iframeElem.contentWindow);doc=iframeElem.contentWindow.document;}
logobj(doc);eleLogin=GetElementsByClassName(classIdToLookFor,doc);log('eleLogin.length  = '+eleLogin.length);if(eleLogin.length>0)
{ele=eleLogin[0];log('ele found USING iframe');}}}}catch(eleExcept){}
if(ele==null){log('PluckLoginOverride:setting timer again...');if(pluckLoginOverrideTimer!=null)
clearTimeout(pluckLoginOverrideTimer);pluckLoginOverrideTimer=setTimeout("PluckLoginOverride('"+frameId+"', '"+classIdToLookFor+"')",2000);return;}
log('login div tag is '+ele);logobj(ele);pluckLoginOverrideCompleted=true;var loginHtml;var language=getLanguage();if(language=="ES")
loginHtml="Debes entrar para poder hacer un comentario. ";else
loginHtml="You must be logged in to leave a comment. ";loginHtml+="<a onclick=\" parent.showLoginDialog(); return false;\" href=\"#\">";if(language=="ES")
loginHtml+="Entrar";else
loginHtml+="Log In";loginHtml+="</a>";loginHtml+=" | ";loginHtml+="<a onclick=\" parent.signupUser(470, 470); return false;\" href=\"#\">";if(language=="ES")
loginHtml+="Regístrate GRATIS >";else
loginHtml+="Join for FREE >";loginHtml+="</a>";ele.innerHTML=loginHtml;if(pluckLoginOverrideTimer!=null)
clearTimeout(pluckLoginOverrideTimer);}
function GetLanguageStrippedUrl()
{var pageUrl=window.location.href;pageUrl=pageUrl.toLowerCase();pageUrl=pageUrl.replace('/es/','/');pageUrl=pageUrl.replace('/en/','/');log('GetLanguageStrippedUrl :'+pageUrl);return pageUrl;}
function Review(parentKeyType,parentKey,reviewedTitle,reviewCategory,pageSize,sort,currentPage){alert("Review");log("Review");var divId="Reviews_Container";gSiteLife.WriteDiv(divId);return GetReviews(parentKeyType,parentKey,reviewedTitle,reviewCategory,pageSize,sort,currentPage);}
function GetReviews(parentKeyType,parentKey,reviewedTitle,reviewCategory,pageSize,sort,currentPage){alert("GetReviews");parentKeyType=parentKeyType||"ExternalResource";parentKey=gSiteLife.EscapeValue(parentKey)||gSiteLife.EscapeValue(gSiteLife.__StripAnchorFromUrl(window.location.href));reviewedTitle=gSiteLife.EscapeValue(reviewedTitle)||gSiteLife.EscapeValue(document.title);reviewCategory=reviewCategory||"Uncategorized";pageSize=pageSize||10;sort=sort||"TimeStampAscending";currentPage=currentPage||0;var url=gSiteLife.__baseUrl+'/Review/Reviews?plckElementId=Reviews_Container'+'&plckTargetKey='+parentKey+'&plckTargetKeyType='+parentKeyType+'&plckReviewedTitle='+reviewedTitle+'&plckReviewCategory='+reviewCategory+'&plckSort='+sort+'&plckParentUrl='+gSiteLife.EscapeValue(gSiteLife.__StripAnchorFromUrl(GetLanguageStrippedUrl()))+'&plckParentTitle='+gSiteLife.EscapeValue(document.title)+'&plckCurrentPage='+currentPage+'&plckPageSize='+pageSize;log(url);gSiteLife.__Send(url);return false;}
