
function focusInput(id) {
    document.getElementById(id).focus();
}
function selectInput(id) {
    document.getElementById(id).checked=true;
}



String.prototype.isEmail = function ()
{
  return (this.match(/^.+@\w{3,}\.\w{2,4}$/) != null);
}


String.prototype.isTagged = function ()
{
  return (this.match(/<.+>/) != null);
}


function popUpPic(adress,width,height)
{
  var properties = 'toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,menubar=no,height='+height+',width='+width+',top='+screen.height/8+',left='+screen.width/8;
  window.open('/popup/?pic='+adress,'',properties).focus();
}

function changeColor(id)
{
  var new_id = (id + 1) % 4;
  document.getElementById(colors[new_id]).style.visibility = 'visible';
	document.getElementById(colors[id]).style.visibility = 'hidden';
	window.setTimeout('changeColor('+new_id+')',10000);
}

var colors = new Array('red','blue','green','yellow');

/*

function init()
{

  //document.getElementsByTagName('body')[0].onload = function () {
  window.setTimeout('changeColor(0)',1000);

}

window.setTimeout('init',1000);
*/


