﻿function chkField(p,l){if(p.value.length<l){alert(p.name+": not properly entered; input is mandatory!");p.focus();return false;};return true;};function chkEMail(p){if ((p.value.length<5)||(p.value.indexOf('@')==-1)||(p.value.indexOf('.')==-1)){alert(p.name+" not properly entered; input is mandatory!");p.focus();return false;}};function chkFormular(){with (document.EmailForm){if (chkField(Name,5)==false) {return false;};if (chkField(Subject,3)==false) {return false;};if (chkField(Message,10)==false) {return false;};if (chkEMail(Email)==false) {return false;};action='';submit();};return true;};var crossobj=(document.getElementById)?document.getElementById("content"):document.all.content;var contentheight=crossobj.offsetHeight;var chobj=(document.getElementById)?document.getElementById("contentwin"):document.all.contentwin;var CH=chobj.offsetHeight;var movedownvar;var moveupvar;var speed=5;function changeColor(o) {o.className="c"+Math.floor(Math.random()*8);};function movedown(){if (parseInt(crossobj.style.top)>=(CH-contentheight)) crossobj.style.top=parseInt(crossobj.style.top)-speed+"px";movedownvar=window.setTimeout("movedown()",20);};function moveup(){if (parseInt(crossobj.style.top)<=0) crossobj.style.top=parseInt(crossobj.style.top)+speed+"px";moveupvar=window.setTimeout("moveup()",20);};function getcontent_height(){contentheight=crossobj.offsetHeight;if(contentheight>CH) {document.write('<a id=up href="#" onMouseover="movedown()" onMouseout="window.clearTimeout(movedownvar)"><img src=down.gif border=0 alt="down"></a>');document.write('<a id=down href="#" onMouseover="moveup()" onMouseout="window.clearTimeout(moveupvar)"><img src=up.gif border=0 alt="up"></a>');}};getcontent_height();

