function sendsubmit(actrl,frm) {
 //frm.submit();
}

function checkPlugin(plgIn, theURL, altURL, autoGo) {
var ok=false;
document.MM_returnValue = false;
with (navigator)
 if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
  ok=(plugins && plugins[plgIn]);
 }
 else if (appVersion.indexOf('3.1')==-1) {
   if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null)
    ok=window.MM_flash;
   else 
    if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null)
     ok=window.MM_dir;
    else 
     ok=autoGo;
 }
 if (!ok) theURL=altURL;
 if (theURL) window.location=theURL;
}


function popup_pool(){
 window.open("modules/juegos_online/pool/index.php","Pool","width=608,height=395,outerwidth=608,outerheight=395,scrollbars=no,top=0,left=0");
}

function popup105() {
 window.open("modules/radio105/vivo.phtml","vivo","width=350,height=280,bgcolor='#000000',outerwidth=350,outerheight=280,scrollbars=no,top=0,left=0");
}


function verfoto(imagen){
base="modules/news/media/";
window.open(base+"popup.phtml?imagen="+imagen,"","width=511,height=385,outerwidth=511,outerheight=385,scrollbars=no,top=0,left=0");
}

function popupfoto(imagen){
base="modules/news/media/";
window.open(base+"popup.phtml?imagen="+imagen,"","width=511,height=385,outerwidth=511,outerheight=385,scrollbars=no,top=0,left=0");
}

function popup_rally(){
 window.open("modules/juegos_online/rally/index.php","rally","width=550,height=430,outerwidth=550,outerheight=430,scrollbars=no,top=0,left=0");
}

function popup_gomi(){
 window.open("modules/juegos_online/gomi/index.php","gomi","width=560,height=350,outerwidth=560,outerheight=350,scrollbars=no,top=0,left=0");
}

function popup_pacman(){
 window.open("modules/juegos_online/pacman/index.php","pacman","width=360,height=420,outerwidth=360,outerheight=420,scrollbars=no,top=0,left=0");
}

function popup_tetris(){
 window.open("modules/juegos_online/tetris/index.php","tetris","width=550,height=450,outerwidth=550,outerheight=450,scrollbars=no,top=0,left=0");
}

function popup_hex(){
 window.open("modules/juegos_online/hexagon/index.php","hex","width=375,height=285,outerwidth=375,outerheight=285,scrollbars=no,top=0,left=0");
}

function popup_survey(pollID,voteID,forwarder){
 hwin="http://www.infix.com.ar/modules/Surveys/security.phtml?pollID="+pollID+"&voteID="+voteID+"&forwarder="+forwarder;
 window.open(hwin,"encuesta","width=360,height=175,outerwidth=360,outerheight=175,scrollbars=no,top=200,left=200");
}

function valorRadio (radio) {
  for (i=0; i < radio.length; i++) {
    if (radio[i].checked)
      return radio[i].value
  }
  return ""
}

function indiceRadio (radio) {
  if (radio.length)
    for (i=0; i < radio.length; i++) {
      if (radio[i].checked)
        return i+1
    }
  else
    if (radio.checked)
      return 1
  return ""
}

function cerrarsesion (vinculo) {
delCookie('user');
window.location.href=vinculo;
}


function votar(pollID,voteID,forwarder){
 avalue=valorRadio(voteID);
 if (avalue != "")
  { swin="modules/Surveys/security.phtml?pollID="+pollID+"&voteID="+avalue+"&forwarder="+forwarder;
     hwin=window.open(swin,"Infix","width=360,height=175,outerwidth=360,outerheight=175,scrollbars=no,top=300,left=190");
  }
 else
  alert("Debe realizar una elección!");
 }

function delCookie (name) {
var expireNow = new Date();
document.cookie = name + "=" +
"; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
}

function getCookie(name){
    var cname = name + "=";
    var dc = document.cookie;
    if (dc.length > 0) {
        begin = dc.indexOf(cname);
        if (begin != -1) {
            begin += cname.length;
            end = dc.indexOf(";", begin);
            if (end == -1) end = dc.length;
            return unescape(dc.substring(begin, end));
        }
    }
return null;
}

// Use this function to save a cookie.

function setCookie(name, value, expires) {
    document.cookie = name + "=" + escape(value) + "; path=/" +
    ((expires == null) ? "" : "; expires=" + expires.toGMTString());
}


// FONT SIZE MANAGEMENT 

function FindObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=FindObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ChangeProp(objName,x,theProp,theValue) { //v6.0
var obj = FindObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
if (theValue == true || theValue == false)
eval("obj."+theProp+"="+theValue);
else eval("obj."+theProp+"='"+theValue+"'");
}
}

// FONT SIZE MANAGEMENT 

function LoadActualFontSize() {
tempArray = document.cookie.split(";");
for (tA = 0; tA < tempArray.length; tA++){
if (tempArray[tA].indexOf('fontSize') > -1){
fontSizeValue = tempArray[tA].split("=")
ACTUAL_FONTSIZE = parseInt(fontSizeValue[1]);
}
}
}

function SaveActualFontSize() {
var expire = new Date ();
expire.setTime (expire.getTime() + (6000 * 24 * 3600000));
expire = expire.toGMTString();
document.cookie="fontSize="+ACTUAL_FONTSIZE+"; path=/; expires="+expire;
}

function Mayor() {
ACTUAL_FONTSIZE = ACTUAL_FONTSIZE+1;
if (ACTUAL_FONTSIZE > LARGEST_FONTSIZE) { ACTUAL_FONTSIZE = LARGEST_FONTSIZE }
ChangeProp('texto','','style.fontSize',ACTUAL_FONTSIZE,'SPAN');
SaveActualFontSize();
}

function Menor() {
ACTUAL_FONTSIZE = ACTUAL_FONTSIZE-1
if (ACTUAL_FONTSIZE < SMALLEST_FONTSIZE) { ACTUAL_FONTSIZE = SMALLEST_FONTSIZE }
ChangeProp('texto','','style.fontSize',ACTUAL_FONTSIZE,'SPAN');
SaveActualFontSize();
}

ACTUAL_FONTSIZE = 14;
SMALLEST_FONTSIZE = 12;
LARGEST_FONTSIZE = 20;

function chat2m() {
window.open('http://www.infix.com.ar/chat/group.php?port=12000&showlang=en','boxname','width=685,height=535')
}


