﻿// JScript File

//Fire specific button from selected form element
function clickButton(e, buttonid){ 
      var bt = document.getElementById(buttonid); 
      var btStr = bt.toString();
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ 
                  if (btStr.indexOf('doPostBack') > (-1)) {
                        eval(btStr)
                        }
                  else {
                     bt.click(); 
                     return false; 
                     }
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
      }   
} 

 function GoToPage(url)
 {
 
     if (url != "")
     {
     alert("here");
        window.location.href = url;
     }
 }

function blinkExecute(target,color)
{
document.getElementById(target).style.backgroundColor = color;
}

function flasher (target, color1, color2){
setTimeout('blinkExecute("'+target+'","'+color2+'")',0);
setTimeout('blinkExecute("'+target+'","'+color1+'")',500);
setTimeout('blinkExecute("'+target+'","'+color2+'")',1000);
}



function OpenLimitedWindow(url, name, w, h) {
  l = (screen.availWidth-10 - w) / 2;
  t = (screen.availHeight-20 - h) / 2;

  features = "width="+w+",height="+h+",left="+l+",top="+t;
  features += ",screenX="+l+",screenY="+t;
  features += ",scrollbars=1,resizable=1,location=0";
  features += ",menubar=1,toolbar=0,status=0";

  window.open(url, name, features);
}

function OpenPlayer(url, name, w, h) {
    features = "width=" + w + ",height=" + h;  
    features += ",scrollbars=0,resizable=1,location=0";
    features += ",menubar=0,toolbar=0,status=0";
    window.open(url, name, features);
}
