// JavaScript Document

function js_GetDetails(FormId)
{ document.getElementById(FormId).submit();
  return true;
}
function js_DoBlink()
{ var x = 0;
  while (document.getElementById("blinkthis"+x))
  { varName = eval("blinkthis"+x);
		varName.style.visibility = varName.style.visibility == "visible" ? "hidden" : "visible";
		x++;
	}
}

function js_StartBlink()
{ if(document.getElementById("blinkthis0"))
  { setInterval("js_DoBlink()", 500);
	}
}
function js_ChangeCursor(PicElem,State)
{  if(State=="on")
  { prevcursor=PicElem.style.cursor;
    PicElem.style.cursor="pointer";
  }
  else
  { PicElem.style.cursor=prevcursor;
  }
}

function js_UnityWorksPopUp(cid,ww,wh)
{ cwin=window.open(cid.href,'_blank','width='+ww+',height='+wh+',resizable=0,scrollbars=0,left=400,top=200');
  if(cwin!=null){ return false;}else{ return true;}
}

function js_SortCheck()
{ for(i=1;i<=3;i++)
  { s=document.getElementById("sortopt"+i);
    ix=s.selectedIndex;
    sval=s.options[ix].text;
    switch (i)
    { case 1:
        document.forms['br1'].sort1.value=sval;
        break;
      case 2:
        document.forms['br1'].sort2.value=sval;
        break;
      case 3:
        document.forms['br1'].sort3.value=sval;
        break;
    }
  }
  document.forms['br1'].submit();
}

function js_SortUD(sid,sadname)
{ 
  /* SortUD
  alert ("This is a Javascript Alert")
  document.getElementById("page3").style.display = "block";
  document.getElementById("page2").style.display = "none";
  */
  
  if(sid % 2 == 0)
  { sid2=sid+1;
    sd="desc";
    var sval=sid/2;
  }
  else
  { sid2=sid-1;
    sd="asc";
    var sval=sid2/2;
  }
  document.getElementById("SortUD"+sid).style.display = "none";
  document.getElementById("SortUD"+sid2).style.display = "inline";
  
  
  switch (sval)
  { case 1:
      document.forms['br1'].sort1ad.value=sd;
      break;
    case 2:
      document.forms['br1'].sort2ad.value=sd;
      break;
    case 3:
      document.forms['br1'].sort3ad.value=sd;
      break;
  }
}
function js_DoSubmit(frm,slv,lppv)
{ frm.sl.value=slv;
  frm.lpp.value=lppv;
  frm.submit();
  return true;
}
function js_Initialize()
{
}
