<!--

window.focus();

window.defaultStatus = "ERCOT - Texas ESI ID Lookup";

var childWindow;
var childWindow2;
var childWindow3;


function ss(cTxt){
   window.status = cTxt;
}


function targetopener(mylink, closeme, closeonly)
{
if (! (window.focus && window.opener))return true;
window.opener.focus();
if (! closeonly)window.opener.location.href=mylink.href;
if (closeme)window.close();
return false;
}



function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
   window.open(href, windowname, 'top=0,left=0,width=575,height=104,scrollbars=no');
return false;
}

function ss(cTxt){
   window.status = cTxt;
}


function whois_popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
   window.open(href, windowname, 'top=0,left=0,width=575,height=200,scrollbars=yesresizable=yes');
return false;
}

function ss(cTxt){
   window.status = cTxt;
}



function drnh(mylink, windowname)
{
  if (! window.focus)return true;
    var href;
    if (typeof(mylink) == 'string')
        href=mylink;
      else
        href=mylink.href;
        window.open(href, windowname, 'top=10,left=10,width=320,height=300,scrollbars=no,resizable=no');
     return false;
 }


function rkDemo(mylink, windowname)
{
    if (! window.focus)return true;
    var href;
    if (typeof(mylink) == 'string')
        href=mylink;
      else
        href=mylink.href;
        window.open(href, windowname, 'top=250,left=450,width=176,height=144,scrollbar=0');
     return false;
}

function sbDemo(mylink, windowname)
{
    if (! window.focus)return true;
    var href;
    if (typeof(mylink) == 'string')
        href=mylink;
      else
        href=mylink.href;
        window.open(href, windowname, 'top=250,left=450,width=176,height=144,scrollbar=0');
     return false;
}

function rkSS(mylink, windowname)
{
    if (! window.focus)return true;
    var href;
    if (typeof(mylink) == 'string')
        href=mylink;
      else
        href=mylink.href;
        window.open(href, windowname, 'top=250,left=450,width=176,height=144,scrollbar=0');
     return false;
}


function PM(mylink, windowname)
{
    if (! window.focus)return true;
    var href;
    if (typeof(mylink) == 'string')
        href=mylink;
      else
        href=mylink.href;
        window.open(href, windowname, 'top=250,left=300,width=422,height=278,scrollbar=0');
     return false;
}

function sb_popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
   window.open(href, windowname, 'top=0,left=0,width=575,height=94,scrollbars=no');
return false;
}


function swapImage(){
document.all.userImage.src=document.cgform.cgimage.options.value;
return;
}

function swapColors(){
document.all.vdtext1.vdtext2.fgColor.value=document.chgColor.chgColorSelect.options.value;
return;
}


function openChild(file,window,pWidth,pHeight,pTop,pLeft)
{
   var cParams = 'status=no,scrollbars=yes,resizable=yes,width='+pWidth+',height='+pHeight+',top='+pTop+',left='+pLeft+'';
   childWindow=open(file,window,cParams);
   if( childWindow.opener == null ){
     childWindow.opener = self;
   }
}

function openChild2(file,window,pWidth,pHeight,pTop,pLeft)
{
   var cParams = 'status=yes,scrollbars=no,resizable=no,width='+pWidth+',height='+pHeight+',top='+pTop+',left='+pLeft+'';
   childWindow2=open(file,window,cParams);
   if( childWindow2.opener == null ){
     childWindow2.opener = self;
   }
}


function openChild3(file,window,pWidth,pHeight,pTop,pLeft)
{
   var cParams = 'status=yes,scrollbars=yes,resizable=yes,width='+pWidth+',height='+pHeight+',top='+pTop+',left='+pLeft+'';
   childWindow3=open(file,window,cParams);
   if( childWindow3.opener == null ){
     childWindow3.opener = self;
   }
}

var openWins;

function openWin(url, window_name, pWidth, pHeight, pTop, pLeft)
{			
	var cParams = 'toolbar=no,location=no,directories=no,status=no,menubar=no, scrollbars=yes,resizable=yes,width='+pWidth+',height='+pHeight+',top='+pTop+',left='+pLeft+'';   	
		
   	openWins = window.open(url, window_name, cParams );   
	   	
   	if (window.focus) {openWins.focus()}
}


function refresh()
{
  location.reload()
}

function ViewData(user,ValueShow) {
var mousex = window.event.x;        // mouse location capture event
var mousey = window.event.y;        // mouse location capture event
user.style.visibility = ValueShow;  // show or hide respective Example
user.style.left = mousex + 3;       // place popup at the mouse X (left) location
user.style.top = mousey;            // place popup at the mouse Y (top) location
}


/***********************************************
* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
                
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      

/*
Submit Once form validation- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}


//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="lightyellow"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}

//-->


