document.getElementById('stylesheet').href = "js.css";var i=0,g=0,q=0,x=[],z = [-2,-1,1,2],on=false,wait=false,t=['"This is just what I\'ve been looking for."',
'"My website loads so much faster than before."','"Finally, a hassle free website that fits my budget."','"I love being able to make small changes myself."'];

function homeload(){cur = document.getElementById('home');
var n=document.getElementById("a"),m=document.getElementById("g");m.style.opacity=0;m.style.filter = 'alpha(opacity=0)';m.style.visibility= "visible";m.style.color="#ffffff";var s2=document.getElementById("s2");var s=document.getElementById("s");
for (var j=0; j<4; j++) {x[j] = n.cloneNode(true);x[j].style.position = "absolute";x[j].childNodes[0].style.background = "none";
x[j].style.visibility= "visible";x[j].style.left = 50*z[j]+'px';x[j].style.top = '15px';x[j].style.opacity = 0.6/Math.abs(z[j]);
x[j].style.filter = 'alpha(opacity=' + 0.6/Math.abs(z[j])*100 + ')';var top = document.getElementById("h");top.appendChild(x[j]);}
var int=self.setInterval(function () {for (var j=0; j<4; j++){var t = i/33;x[j].style.left = 50*z[j]*(1-t*t*t)+'px';}
i++;if (i == 28){n.style.visibility= "visible";}if (i >= 34) {clearInterval(int);i=0;s.style.visibility="visible";
for (var j=0; j<4; j++){x[j].style.display= "none";}
var int2=self.setInterval(function () {var t = i/20;m.style.opacity = t*t*t*t*t; m.style.filter = 'alpha(opacity=' + t*t*t*t*t*100 + ')';
i++;if (i == 5){}if (i >= 21) {clearInterval(int2);i=0;s2.style.visibility="visible";}},30);}},30);}


function testload() {test=self.setInterval("tload()",6000);}
function expload() {d=document.getElementById("hi");elo=d;window.onresize = function () {if (elo!=d) {elo.style.height = "auto";}}}



function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {alert(alerttxt);return false;}
else {return true}
}
}
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
  {alert(alerttxt);return false;}
else {return true;}
}
}

function checkForm(thisform)
{
with (thisform)
{
if (validate_required(name,"Please fill in your name.")==false)
  {name.focus();return false;}
if (validate_required(email,"Please fill in your email.")==false)
  {email.focus();return false;}
if (validate_email(email,"Please double check your email address.")==false)
  {email.focus();return false;}


}
}


function tload() {if (wait) {wait=!wait;  if (!on){q++};if(q==4){q=0};return;}
var te = document.getElementById("t");te.childNodes[0].innerHTML=t[q];var test2=self.setInterval(function () {var c = -0.5 * (Math.cos(Math.PI*g/50) - 1);
if (on) {te.style.opacity = (1-c)/2;te.style.filter = 'alpha(opacity=' + (1-c)/2*100 + ')';}
else {te.style.opacity = c/2;te.style.filter = 'alpha(opacity=' + c/2*100 + ')';}
g++;if (g >= 51) {clearInterval(test2);g=0;on=!on;wait=!wait;}},40);}


if (document.getElementById("e")) {document.getElementById("e").onkeypress = grow();}
function grow(dis) {
 if (dis.scrollHeight>dis.clientHeight)
 { //dis.rows=dis.rows +1;alert(dis.scrollHeight+ '   ' +dis.clientHeight);
  dis.style.height=(dis.scrollHeight+30)+"px";
 }
 else if (dis.scrollHeight==dis.clientHeight)
 { //dis.rows--; alert(dis.scrollHeight+ '   ' +dis.clientHeight);
  dis.style.height="auto";
  //dis.style.height=(dis.scrollHeight+20)+"px";
 }
}

function grow(txtBox)
{
nCols = txtBox.cols;
sVal = txtBox.value;
nVal = sVal.length;
nRowCnt = 1;

for (i=0;i<nVal;i++)
{ if (sVal.charAt(i).charCodeAt(0) == 13) { nRowCnt +=1; } }

if (nRowCnt < (nVal / nCols)) { nRowCnt = 1 + (nVal / nCols); }
txtBox.rows = nRowCnt;
}

function mover(e) {e.style.color='#a60000';e.style.textDecoration='underline';}
function mout(e) {e.style.color='#007fff';e.style.textDecoration='none';}
function chg()
{var s = document.getElementById('sc');var u = document.getElementById('uc');s.style.visibility= "visible";u.style.visibility= "visible"}
function sav()
{var s = document.getElementById('sc');var u = document.getElementById('uc');s.style.visibility= "hidden";u.style.visibility= "hidden"}
function und() {window.location.reload( true );}

function exp(q) { if (i!=0) {return;}
q.style.display = "none";var el = q.parentNode.nextSibling;
var hc=elo.offsetHeight-5;d.innerHTML=el.innerHTML;
d.style.height = "auto";var h=d.offsetHeight-5;var int=self.setInterval(function() {var c = -0.5 * (Math.cos(Math.PI*i/9) - 1);
el.style.opacity = c*c;el.style.filter = 'alpha(opacity=' + c*c*100 + ')';el.style.height = (c*h)+5+'px';
elo.style.opacity = 1-c;elo.style.filter = 'alpha(opacity=' + (1-c)*100 +')';elo.style.display = "block";elo.style.height = ((1-c)*hc)+5+'px';
i++; if (i >= 10) {clearInterval(int);if (elo!=d) {elo.previousSibling.lastChild.style.display = "inline"};elo=el;i=0;}},50);}

function switchMenu(obj) {//var el = document.getElementById(obj);cur.style.display = 'none';el.style.display = 'block';cur = el;
return true;}