function repos()
{
 var y = 0;
 if (window.pageYOffset)
 {
  y = window.pageYOffset;
 }
 else if (document.body && document.body.scrollTop)
 {
  y = document.body.scrollTop;
 }
 if (y < 580)
 {
  window.scrollBy(0, 10);
  setTimeout("repos()", 5);
 }
}

function init()
{
 if (navigator.appName.indexOf("Internet Explorer") == -1)
 {
  document.getElementById('clientcontent').height = document.getElementById('ref0').height + 80;
 }
 else
 {
  document.getElementById('clientcontent').height = document.getElementById('ref0').height + 100;
 }
 document.getElementById('stage').style.display='block';
 if (navigator.appName.indexOf("Internet Explorer") == -1)
 {
  repos();
 }
 BlurLinks();
}

function BlurLinks()
{
 lnks=document.getElementsByTagName('a');
 for(i=0;i<lnks.length;i++)
 {
  lnks[i].onfocus=new Function("this.blur()");
 }
}

onload = BlurLinks;

function checkForm()
{
 if (document.forms.contact.cname.value < 2 || !isNaN(document.forms.contact.cname.value))
 {
  document.forms.contact.cname.style.backgroundColor = "#ffaaaa";
  document.getElementById("l1").style.color = "#ff0000";
  nameError = true;
 }
 else
 {
  document.forms.contact.cname.style.backgroundColor = "#ffffff";
  document.getElementById("l1").style.color = "#646464";
  nameError = false;
 }
 if (document.forms.contact.cmail.value < 7 || !isNaN(document.forms.contact.cmail.value) || document.forms.contact.cmail.value.indexOf("@") == -1 || document.forms.contact.cmail.value.indexOf(".") == -1)
 {
  document.forms.contact.cmail.style.backgroundColor = "#ffaaaa";
  document.getElementById("l2").style.color = "#ff0000";
  mailError = true;
 }
 else
 {
  document.forms.contact.cmail.style.backgroundColor = "#ffffff";
  document.getElementById("l2").style.color = "#646464";
  mailError = false;
 }
 if (document.forms.contact.ctext.value < 2 || !isNaN(document.forms.contact.ctext.value))
 {
  document.forms.contact.ctext.style.backgroundColor = "#ffaaaa";
  document.getElementById("l3").style.color = "#ff0000";
  textError = true;
 }
 else
 {
  document.forms.contact.ctext.style.backgroundColor = "#ffffff";
  document.getElementById("l3").style.color = "#646464";
  textError = false;
 }

 if (nameError == false && mailError == false && textError == false)
 {
  document.forms.data.cname.value = document.forms.contact.cname.value;
  document.forms.data.cmail.value = document.forms.contact.cmail.value;
  document.forms.data.ctext.value = document.forms.contact.ctext.value;

  var exp = new Date();
  var block = exp.getTime() + (1 * 24 * 60 * 60 * 1000);
  exp.setTime(block);
  document.cookie = "token=" + document.forms.data.posted.value + "; expires=" + exp.toGMTString();

  document.forms.data.submit();
 }
}
