function tableruler()
{
 if (document.getElementById && document.createTextNode)
  {
   var tables=document.getElementsByTagName('table');
   for (var i=0;i<tables.length;i++)
   {
    if(tables[i].className=='beautytable')
    {
     var trs=tables[i].getElementsByTagName('tr');
     for(var j=0;j<trs.length;j++)
     {
      if(trs[j].parentNode.nodeName=='TBODY'&&trs[j].parentNode.nodeName!='TFOOT')
       {
       trs[j].onmouseover=function(){this.className='ruled';return false}
       trs[j].onmouseout=function(){this.className='';return false}
     }
    }
   }
  }
 }
}

// JavaScript Document
// ALISTAPART CSS ROLLOVERMENU
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
	if (node.nodeName=="LI") {
		node.onmouseover=function() {
	this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;

// IE HOVER TRANSISTION www.ssi-developer.net
function lite(obj) {
	if(document.all&&!window.opera) {
		obj.filters.blendTrans.apply();
		obj.filters.blendTrans.play();
	}
}

// ALISTAPART CSS GALLERY
function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('platzhalter').src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('beschr').childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('beschr').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}


// spam email encoder
function encodeMailto(form) {   //
	var ne=0;
	var re="";
	var fval="mailto:" + form.f.value;
	for(var i=0; i < fval.length; i++) {
		ne=fval.charCodeAt(i);
		if (ne>=8364) {ne = 128;}
		re += String.fromCharCode(ne+(4));
	}
	form.erg.value="<a href=\"javascript:showAndOpenDecodedMailAddress(\'" + re + "\');\">NAME</a>";
}

// spam protection
function decodeMailto(s) {	//
	var n=0;
	var r="";
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(4));
	}
	return r;
}

// open link of protected mail
function showAndOpenDecodedMailAddress(s) {	//
	location.href=decodeMailto(s);
}

 
// Macromedia MM_goToURL Function 
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

