
var gCategories = "CatInspiration,CatDesign,CatSound,CatActor,CatPromo";
var gTooltip = "Tooltip1,Tooltip2,Tooltip3,Tooltip4";

function Mark(pThis)
{
  pThis.select();
}


function SetCategory(pPar)
{
  SetDisplayList(gCategories,pPar,"none");
}

function ShowTooltip(pPar)
{
  SetDisplayList(gTooltip,pPar,"none");
}

function HideTooltip()
{
  SetDisplayList(gTooltip,"","none");
}


function login(evt) {
  var key = evt.keyCode; 
  if (key == 13) {// ? I guess for Enter - you better check
    document.forms['loginform'].submit();
  }
}
function SetDisplayList(pList,pToggle,pValue)
{
  var pListArray = pList.split(",");
  for(i = 0; i < pListArray.length; i++)
  {
    if (pListArray[i] != "")
    {
      if (pListArray[i] != pToggle)
        SetDisplay(pListArray[i],pValue);
      else
      {
        if (pValue == "block")
          SetDisplay(pListArray[i],"none");
        else
          SetDisplay(pListArray[i],"block");
      }
    }
  }
}


function SetDisplay(pid,pvalue)
{
  document.getElementById(pid).style.display = pvalue;
}



function GoToTop(pPar)
{
  window.scroll(0,0);
}

function GoTo(pId)
{
  document.getElementById(pId).scrollIntoView(true);
}


function OpenDialog(purl,pname,pwidth,pheight)
{
  psize = "";
  if (pwidth > 0 && pheight > 0)
    psize = "height="+ pheight +",width="+ pwidth +",";
  dialog = window.open(purl,pname,psize + "resizable=yes,scrollbars=yes,status=no,location=no,toolbar=no,menubar=no",true);

  wScreenX = ((screen.width-(pwidth*1))/2);
  wScreenY = ((screen.height-(pheight*1))/2);

  if (navigator.appName != "Microsoft Internet Explorer")
    dialog.moveTo(wScreenX,wScreenY);
  dialog.focus();
}



  
 


