var fadeballot;
var fadetip;
var fadeouttip;
var pollid;
var fullboxID;
var onpage="remota";
var onpage2="remoto";
function clicktab(element){
elementtab=element+"tab";
ontab=onpage+"tab";
if(ontab!=elementtab){
toggleme(onpage);
if(document.getElementById(element).style.display=="none"){
toggleme(element);
}
document.getElementById(elementtab).className="ontab";
document.getElementById(ontab).className='';
onpage=element;
}
}
;
function clicktab2(element){
elementtab=element+"tab";
ontab=onpage2+"tab";
if(ontab!=elementtab){
toggleme(onpage2);
if(document.getElementById(element).style.display=="none"){
toggleme(element);
}
document.getElementById(elementtab).className="ontab";
document.getElementById(ontab).className='';
onpage2=element;
}
}
;
function stripHTML(text){
var re=/<\S[^><]*>/g;
return text.value.replace(re,"");
}
;
function showadvsearch(){
if(document.getElementById("advsearch").style.display=="none"){
document.getElementById("advsearch").style.display='';
fademein("advsearch");
}
}
;
function togglehintpop(){
var arrayPageSize=getPageSize();
var arrayPageScroll=getPageScroll();
hintboxID="hintpop";
hintbox=document.getElementById(hintboxID);
hintbox.style.top=(arrayPageScroll[(0x1b00+1752-0x21d7)]+((arrayPageSize[(0x1c9c+2509-0x2666)]-(0x864+3997-0x160d))/(0x89f+3560-0x1685))+"px");
hintbox.style.left=(((arrayPageSize[(0xfb2+3388-0x1cee)]-(0x1d37+931-0x1ee6))/(0x1c12+2455-0x25a7))+"px");
toggleme("opacitize","0");
document.getElementById("opacitize").style.height=(arrayPageSize[(0x7d3+927-0xb71)]+"px");
toggleme(hintboxID);
}
;
function togglefull(imgUrl){
var arrayPageSize=getPageSize();
var arrayPageScroll=getPageScroll();
fullboxID="fullimagebox";
fulllnkID="fullimglnk";
fullimgID="fullimg";
fullbox=document.getElementById(fullboxID);
fullbox.style.top=(arrayPageScroll[(0xc25+6485-0x2579)]+((arrayPageSize[(0x17d+5706-0x17c4)]-(0xf26+4256-0x1dd2))/(0x13fd+674-0x169d))+"px");
fullbox.style.left=(((arrayPageSize[(0x9df+3080-0x15e7)]-(0x22d2+1424-0x266e))/(0x52c+6844-0x1fe6))+"px");
toggleme("opacitize","0");
document.getElementById("opacitize").style.height=(arrayPageSize[(0x10ad+2894-0x1bfa)]+"px");
toggleme(fullboxID);
oldimgID=document.getElementById(fullimgID);
var fullimage=document.createElement("img");
fullimage.src=imgUrl;
fullimage.id=fullimgID;
document.getElementById(fulllnkID).replaceChild(fullimage,oldimgID);
}
;
function closefull(){
if(typeof fullbox!="undefined"){
if(fullbox.style.display==''){
toggleme(fullboxID);
}
;
}
if(typeof hintbox!="undefined"){
if(hintbox.style.display==''){
toggleme(hintboxID);
}
;
}
toggleme("opacitize","0");
}
;
function closefulldontremind(){
var votebox=el("votebox");
votebox.setAttribute("dontshoworderhint","1");
closefull();
var ajaxurl="/ajaxserver/dontremindpollorderhint.php\x35";
var d=new Date();
var t=d.getTime();
ajaxurl+="?TIME="+t;
loadXMLDoc(ajaxurl);
}
;
function delay(){
return true;
}
;
function toggleme(element,fade){
if(document.getElementById(element).style.display=="none"){
document.getElementById(element).style.display='';
if(fade!=(0xd26+3302-0x1a0c))fademein(element);
}
else{
document.getElementById(element).style.display="none";
}
}
;
function toggleme2(element){
if(document.getElementById(element).style.visibility=="hidden"){
document.getElementById(element).style.visibility='';
}
else{
document.getElementById(element).style.visibility="hidden";
}
}
;
function showme(element){
if(document.getElementById(element).style.display=="none"){
document.getElementById(element).style.display='';
fademein(element);
}
}
;
function hideme(element){
if(document.getElementById(element).style.display==''){
document.getElementById(element).style.display="none";
}
}
;
function fademein(element){
var e=document.getElementById(element);
fadesomething=new Fadomatic(e,(0xa3a+7170-0x2628),(0xcbc+2544-0x16ab));
fadesomething.fadeIn();
}
;
function fademeout(element){
var e=document.getElementById(element);
fadesomething=new Fadomatic(e,(0xb0f+6574-0x24a9),(0xfd7+3269-0x1c38));
fadesomething.fadeOut();
}
;
function removetip(){
var e=document.getElementById("tip");
if(window.fadeouttip)fadeouttip.haltFade();
fadeouttip=new Fadomatic(e,(0xe4d+4954-0x218e),(0x1fb+4013-0x1144));
clearTimeout(tipTimer);
fadeouttip.fadeOut();
}
;
function getPosition(element){
alert(document.getElementById(element).style.left);
}
;
function el(name){
return document.getElementById(name);
}
;
function changedisplay(element,display){
if(display=="on"){
document.getElementById(element).style.display='';
}
else{
document.getElementById(element).style.display="none";
}
}
;
function highlight(itemid){
rowid="row"+itemid;
row=document.getElementById(rowid);
if(row.className!="marked"){
row.className="highlighted";
}
}
;
function dehighlight(itemid){
rowid="row"+itemid;
if(document.getElementById(rowid).className!="marked"){
row.className='';
}
}
;
function changeclass(id,newClass){
identity=document.getElementById(id);
identity.className=newClass;
}
;
function errorfade(itemid){
var fade=new Fade(itemid,"#FFCCCC","#ffffff",(0x2130+889-0x2413),(0x2d2+2369-0xc04),(0x1e97+1706-0x2479));
fade.init();
}
;
function successfade(itemid){
var fade=new Fade(itemid,"#CEE178","#ffffff",(0x965+6065-0x20e4),(0x1ea8+1990-0x265f),(0x1582+273-0x162f));
fade.init();
}
;
function newitemfade(itemid){
var row=document.getElementById("row"+itemid);
var fade=new Fade(row,"#c8e9f1","#e4f4ba",(0x24c+952-0x56e),(0x52f+6965-0x2055),(0x6d+8506-0x21a7));
fade.init();
}
;
Fadomatic.INTERVAL_MILLIS=(0x43a+7570-0x219a);
function Fadomatic(element,rate,initialOpacity,minOpacity,maxOpacity){
this._element=element;
this._intervalId=null;
this._rate=rate;
this._isFadeOut=true;
this._minOpacity=(0x162b+4079-0x261a);
this._maxOpacity=(0xda+9335-0x24ee);
this._opacity=(0x56f+2201-0xda5);
if(typeof minOpacity!="undefined"){
if(minOpacity<(0x1b94+442-0x1d4e)){
this._minOpacity=(0x304+1690-0x99e);
}
else if(minOpacity>(0x156a+428-0x16b3)){
this._minOpacity=(0x2296+825-0x256c);
}
else{
this._minOpacity=minOpacity;
}
;
}
if(typeof maxOpacity!="undefined"){
if(maxOpacity<(0x5f+5353-0x1548)){
this._maxOpacity=(0x44b+2402-0xdad);
}
else if(maxOpacity>(0x175+1365-0x667)){
this._maxOpacity=(0x7e7+5820-0x1e40);
}
else{
this._maxOpacity=maxOpacity;
}
if(this._maxOpacity<this._minOpacity){
this._maxOpacity=this._minOpacity;
}
;
}
if(typeof initialOpacity!="undefined"){
if(initialOpacity>this._maxOpacity){
this._opacity=this._maxOpacity;
}
else if(initialOpacity<this._minOpacity){
this._opacity=this._minOpacity;
}
else{
this._opacity=initialOpacity;
}
;
}
if(typeof element.style.opacity!="undefined"){
this._updateOpacity=this._updateOpacityW3c;
}
else if(typeof element.style.filter!="undefined"){
if(element.style.filter.indexOf("alpha")==-(0xe1d+37-0xe41)){
var existingFilters="";
if(element.style.filter){
existingFilters=element.style.filter+" ";
}
element.style.filter=existingFilters+"alpha(opacity="+this._opacity+")";
}
this._updateOpacity=this._updateOpacityMSIE;
}
else{
this._updateOpacity=this._updateVisibility;
}
this._updateOpacity();
}
;
Fadomatic.prototype.fadeOut=function(){
this._isFadeOut=true;
this._beginFade();
}
;
Fadomatic.prototype.fadeIn=function(){
this._isFadeOut=false;
this._beginFade();
}
;
Fadomatic.prototype.show=function(){
this.haltFade();
this._opacity=this._maxOpacity;
this._updateOpacity();
}
;
Fadomatic.prototype.hide=function(){
this.haltFade();
this._opacity=(0xb68+3279-0x1837);
this._updateOpacity();
}
;
Fadomatic.prototype.haltFade=function(){
clearInterval(this._intervalId);
}
;
Fadomatic.prototype.resumeFade=function(){
this._beginFade();
}
;
Fadomatic.prototype._beginFade=function(){
this.haltFade();
var objref=this;
this._intervalId=setInterval(function(){
objref._tickFade();
}
,Fadomatic.INTERVAL_MILLIS);
}
;
Fadomatic.prototype._tickFade=function(){
if(this._isFadeOut){
this._opacity-=this._rate;
if(this._opacity<this._minOpacity){
this._opacity=this._minOpacity;
this.haltFade();
}
;
}
else{
this._opacity+=this._rate;
if(this._opacity>this._maxOpacity){
this._opacity=this._maxOpacity;
this.haltFade();
}
;
}
this._updateOpacity();
}
;
Fadomatic.prototype._updateVisibility=function(){
if(this._opacity>(0x1497+3579-0x2292)){
this._element.style.visibility="visible";
}
else{
this._element.style.visibility="hidden";
}
}
;
Fadomatic.prototype._updateOpacityW3c=function(){
this._element.style.opacity=this._opacity/(0x18ef+3006-0x2449);
this._updateVisibility();
}
;
Fadomatic.prototype._updateOpacityMSIE=function(){
this._element.filters.alpha.opacity=this._opacity;
this._updateVisibility();
}
;
Fadomatic.prototype._updateOpacity=null;
function Fade(id,startColour,endColour,count,speed,delay){
this.id=id;
this.startColour=startColour;
this.endColour=endColour;
this.count=count;
this.speed=speed;
this.delay=delay;
if(typeof this.id=="string"){
this.obj=document.getElementById(id);
}
else{
this.obj=this.id;
}
this.colour=new Array();
this.steps=(0xdd9+3373-0x1b06);

this.init=init;
this.fade=fade;
this.parseColour=parseColour;
function init(){
first=this.parseColour(this.startColour,"hex");
last=this.parseColour(this.endColour,"hex");
this.colour=new Array();
this.colour[this.count]=this.startColour;
for(i=(0x293+3893-0x11c8);
i<this.count;
i++){
temp="rgb(";
temp+=parseInt(first[(0x1755+938-0x1aff)]+(last[(0x66a+888-0x9e2)]-first[(0xa5f+6162-0x2271)])/this.count*i);
temp+=",";
temp+=parseInt(first[(0xd0b+1496-0x12e2)]+(last[(0x13f9+3712-0x2278)]-first[(0x641+3103-0x125f)])/this.count*i);
temp+=",";
temp+=parseInt(first[(0x18+1072-0x446)]+(last[(0x88+760-0x37e)]-first[(0x113c+374-0x12b0)])/this.count*i);
temp+=")";
this.colour[this.count-i]=temp;
}
this.colour[(0x1453+4239-0x24e2)]=this.endColour;
var thisObj=this;
setTimeout(function(){
thisObj.fade()}
,this.delay);
}
;
function fade(){
if(this.count>=(0x1568+206-0x1636)){
this.obj.style.backgroundColor=this.colour[this.count--];
var thisObj=this;
setTimeout(function(){
thisObj.fade()}
,this.speed);
}
}
;
function parseColour(colour,t){
var m=(0xc31+1038-0x103e);
col=colour.replace(/[\#rgb\(]*/,'');
if(t=="hex"){
if(col.length==(0x5d5+3387-0x130d)){
a=col.substr((0x1ee5+1136-0x2355),(0x470+6297-0x1d08));
b=col.substr((0x13c4+1627-0x1a1e),(0xba0+3751-0x1a46));
c=col.substr((0x19b3+89-0x1a0a),(0x644+4200-0x16ab));
col=a+a+b+b+c+c;
}
var num=new Array(col.substr((0x49d+3083-0x10a8),(0x173c+539-0x1955)),col.substr((0x92b+4462-0x1a97),(0x2d2+5888-0x19d0)),col.substr((0x387+4848-0x1673),(0xad2+3626-0x18fa)));
var base=(0xf77+1157-0x13ec);
}
else{
var num=col.split(",");
var base=(0x1d66+1500-0x2338);
}
if(t=="rgbp"){
m=2.55}
var ret=new Array(parseInt(num[(0xa1c+2509-0x13e9)],base)*m,parseInt(num[(0x595+6107-0x1d6f)],base)*m,parseInt(num[(0xbc8+6712-0x25fe)],base)*m);
return(ret);
}
;
}
;
var showTp=(0x23d5+323-0x2518);
function showToolTip(id){
showTp=(0x506+8107-0x24b0);
var d=new Date();
var t=d.getTime();
var ajaxurl="/ajaxserver/tooltips.php5?tooltip_id="+id+"&time="+t;
loadXMLDoc(ajaxurl);
}
;
function setToolTip(input,results,success){
if(success==(0x84c+2793-0x1334)){
var szText=results[(0xb7+2264-0x98f)].getElementsByTagName("tooltip")[(0x2064+1598-0x26a2)].firstChild.data;
if(showTp==(0x1095+3148-0x1ce0))overlib(szText,LEFT);
}
}
;
function getPolls(search,searchdisp,userid){
document.mysearch.advsearchoptions.value=search;
document.mysearch.searchtxt.value=searchdisp;
if(document.mysearch.userid)document.mysearch.userid.value=userid;
document.mysearch.submit();
}
;
function addToNotify(pollid,userid){
var ajaxurl="/ajaxserver/addtonotify.php5?pollid="+pollid+"&userid="+userid;
var d=new Date();
var t=d.getTime();
ajaxurl+="&TIME="+t;
loadXMLDoc(ajaxurl);
}
;
function addNotifyDone(input,results,success){
var modmsg=document.getElementById("commentremovenotifymsg");
modmsg.style.display="none";
var modmsg=document.getElementById("commentnotifymsg");
modmsg.style.display="none";
var modmsg=document.getElementById("answernotifymsg");
modmsg.style.display='';
var modmsg=document.getElementById("answerremovenotifymsg");
modmsg.style.display="none";
var notify=document.getElementById("notifymeanswers");
notify.style.display="none";
var notifyoff=document.getElementById("notifymeanswersoff");
notifyoff.style.display='';
}
;
function removeFromNotify(pollid,userid){
var ajaxurl="/ajaxserver/removefromnotify.php5?pollid="+pollid+"&userid="+userid;
var d=new Date();
var t=d.getTime();
ajaxurl+="&TIME="+t;
loadXMLDoc(ajaxurl);
}
;
function removeFromNotifyDone(input,results,success){
var modmsg=document.getElementById("commentremovenotifymsg");
modmsg.style.display="none";
var modmsg=document.getElementById("commentnotifymsg");
modmsg.style.display="none";
var modmsg=document.getElementById("answerremovenotifymsg");
modmsg.style.display='';
var modmsg=document.getElementById("answernotifymsg");
modmsg.style.display="none";
var notify=document.getElementById("notifymeanswers");
notify.style.display='';
var notifyoff=document.getElementById("notifymeanswersoff");
notifyoff.style.display="none";
}
;
function commentNotify(id,userid,itemtype,remove){
var ajaxurl="/ajaxserver/commentnotify.php5?id="+id+"&userid="+userid+"&itemtype="+itemtype+"&remove="+remove;
var d=new Date();
var t=d.getTime();
ajaxurl+="&TIME="+t;
loadXMLDoc(ajaxurl);
}
;
function commentNotifyDone(input,results,success){
var removeaction=results[(0x1eb+4421-0x1330)].getElementsByTagName("actionremove")[(0x194a+25-0x1963)].firstChild.data;
var modmsg=document.getElementById("answerremovenotifymsg");
if(modmsg!=undefined)modmsg.style.display="none";
var modmsg=document.getElementById("answernotifymsg");
if(modmsg!=undefined)modmsg.style.display="none";
if(removeaction=="0"){
var modmsg=document.getElementById("commentremovenotifymsg");
modmsg.style.display="none";
var modmsg=document.getElementById("commentnotifymsg");
modmsg.style.display='';
var notify=document.getElementById("notifymecomment");
notify.style.display="none";
var notifyoff=document.getElementById("notifymecommentoff");
notifyoff.style.display='';
}
else{
var modmsg=document.getElementById("commentremovenotifymsg");
modmsg.style.display='';
var modmsg=document.getElementById("commentnotifymsg");
modmsg.style.display="none";
var notify=document.getElementById("notifymecomment");
notify.style.display='';
var notifyoff=document.getElementById("notifymecommentoff");
notifyoff.style.display="none";
}
}
;
function modComment(id,mod){
var ajaxurl="/ajaxserver/modcomment.php5?id="+id+"&mod="+mod;
loadXMLDoc(ajaxurl);
}
;
function modCommentDone(input,results,success){
var id=results[(0xb1c+5332-0x1ff0)].getElementsByTagName("commentid")[(0xbab+1758-0x1289)].firstChild.data;
id=parseInt(id,(0xafa+2131-0x1343));
var mod=results[(0x17bf+2056-0x1fc7)].getElementsByTagName("moderation")[(0x79a+7395-0x247d)].firstChild.data;
document.getElementById("modhelpful"+id).className='';
document.getElementById("modunhelpful"+id).className='';
document.getElementById("modinappropriate"+id).className='';
document.getElementById("mod"+mod+id).className="disabled";
var modmsg=document.getElementById("commentmodmsg"+id);
modmsg.style.display='';
}
;
function modAnswer(id,mod,deleteme){
var ajaxurl="/ajaxserver/modanswer.php5?id="+id+"&mod="+mod;
if(deleteme)ajaxurl+="&delete=1";
var d=new Date();
var t=d.getTime();
ajaxurl+="&TIME="+t;
loadXMLDoc(ajaxurl);
}
;
function modAnswerDone(input,results,success){
var id=results[(0x1462+3051-0x204d)].getElementsByTagName("answerid")[(0x6b1+4675-0x18f4)].firstChild.data;
id=parseInt(id,(0x104f+3831-0x1f3c));
var mod=results[(0xe37+90-0xe91)].getElementsByTagName("moderation")[(0x816+199-0x8dd)].firstChild.data;
var on=results[(0xa56+1749-0x112b)].getElementsByTagName("on")[(0x1133+3410-0x1e85)].firstChild.data;
if(mod=="adult"){
var modadult=document.getElementById("modadult"+id);
if(on=="1"){
modadult.firstChild.data="Not Adult";
modadulton=true;
}
else{
modadult.firstChild.data="Adult";
modadulton=false;
}
;
}
else if(mod=="inappropriate"){
var modinap=document.getElementById("modinappropriate"+id);
if(on=="1"){
modinap.firstChild.data="Relevant";
modinapon=true;
}
else{
modinap.firstChild.data="Not Relevant";
modinapon=false;
}
;
}
var modmsg=document.getElementById("answermodmsg"+id);
modmsg.style.display='';
}
;

function modPoll(id,mod,deleteme){
var ajaxurl="/ajaxserver/modpoll.php5?id="+id+"&mod="+mod;
if(deleteme)ajaxurl+="&delete=1";
var d=new Date();
var t=d.getTime();
ajaxurl+="&TIME="+t;
loadXMLDoc(ajaxurl);
}
;
function modPollDone(input,results,success){
var id=results[(0xd84+4563-0x1f57)].getElementsByTagName("pollid")[(0xd4c+4864-0x204c)].firstChild.data;
id=parseInt(id,(0x404+4769-0x169b));
var mod=results[(0x20db+1386-0x2645)].getElementsByTagName("moderation")[(0x1200+2811-0x1cfb)].firstChild.data;
var on=results[(0x92c+5495-0x1ea3)].getElementsByTagName("on")[(0xbf6+6902-0x26ec)].firstChild.data;
var pollmod=document.getElementById("pollmodadult"+id);
if(on=="1"){
pollmod.firstChild.data="Not Adult";
modadulton=true;
}
else{
pollmod.firstChild.data="Adult";
modadulton=false;
}
var modmsg=document.getElementById("pollmodmsg"+id);
modmsg.style.display='';
}
;
function addToSession(key,value){
var ajaxurl="/ajaxserver/addtosession.php5?key="+key+"&value="+value;
var d=new Date();
var t=d.getTime();
ajaxurl+="&TIME="+t;
loadXMLDoc(ajaxurl);
}
;
function genericAjaxSuccess(input,results,success){
if(self.genericOveride)genericOveride();
}
;
function getPageScroll(){
var yScroll;
if(self.pageYOffset){
yScroll=self.pageYOffset;
}
else if(document.documentElement&&document.documentElement.scrollTop){
yScroll=document.documentElement.scrollTop;
}
else if(document.body){
yScroll=document.body.scrollTop;
}
arrayPageScroll=new Array('',yScroll);
return arrayPageScroll;
}
;
function getPageSize(){
var xScroll,yScroll;
if(window.innerHeight&&window.scrollMaxY){
xScroll=document.body.scrollWidth;
yScroll=window.innerHeight+window.scrollMaxY;
}
else if(document.body.scrollHeight>document.body.offsetHeight){
xScroll=document.body.scrollWidth;
yScroll=document.body.scrollHeight;
}
else{
xScroll=document.body.offsetWidth;
yScroll=document.body.offsetHeight;
}
var windowWidth,windowHeight;
if(self.innerHeight){
windowWidth=self.innerWidth;
windowHeight=self.innerHeight;
}
else if(document.documentElement&&document.documentElement.clientHeight){
windowWidth=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;
}
else if(document.body){
windowWidth=document.body.clientWidth;
windowHeight=document.body.clientHeight;
}
if(yScroll<windowHeight){
pageHeight=windowHeight;
}
else{
pageHeight=yScroll;
}
if(xScroll<windowWidth){
pageWidth=windowWidth;
}
else{
pageWidth=xScroll;
}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);
return arrayPageSize;
}
;
function mi_alerta(redireccion){
confirmar=confirm("¿Está seguro de que desea eliminar estos datos?");
pagina = redireccion;
if (confirmar)
	document.location.href=pagina;
else
alert('Acción cancelada: el registro no se borrará')
}
;
;
