var delai, Theimage;
var SiteURL='http://www.marypauline.com';
//=========================
function fover(url){
clearTimeout(delai);
if(url!=null){
Theimage=document.getElementById('enlargement');
Theimage.innerHTML='<img src="'+url+'" hspace="0" vspace="0" border="0">';
Theimage.style.display="block";
   }
}

//========================
function fout(){
clearTimeout(delai);
delai=setTimeout(HideIt, 1000);
}

//===================
function HideIt(){
Theimage.innerHTML='';
Theimage.style.display="none";
clearTimeout(delai);
}

//=====================================
function ValidateContact(){
var Msge, tmp;
tmp=document.contactform.fullname;
Msge='Please provide your name';
if(!CheckField(tmp, Msge)){return false;}
tmp=document.contactform.email;
Msge='Please provide your email address';
if(!CheckEmail(tmp, Msge)){return false;}
tmp=document.contactform.message;
Msge='Please enter your message/comments';
if(!CheckField(tmp, Msge)){return false;}

document.contactform.submit();
return true;	
	
}


/*============================================================================================= */
/*============================================================================================= */

function AdjustCSS(){
var tmp1 = document.getElementById("homecontent");
var tmp2=document.getElementById("hometext");

if (screen.width <= 1024){
	if(tmp1!=null){tmp1.style.width = "500px"; }
}
else {
    if(tmp2!=null){tmp2.style.width = "700px"; }
}

return true;
}


//================================================
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("uleftnav");
if(navRoot!=undefined && navRoot!=null){ 
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", "");
   }
   }
  }
 }
 
AdjustCSS();
}

}

window.onload=startList;

/*============================================================================================= */
/*============================================================================================= */

function ShowChildContainer(pid, k){
var n=document.getElementById(pid).childNodes.length;
  for(i=0; i<n; i++){
  var tmp=document.getElementById(pid).childNodes[i];
  if(i!=k){tmp.style.display="none"; }
  else {tmp.style.display="block";}
  }

}


//===================================
function RedeemDiscount(theform){
if(!CheckEmail(theform.email, 'Your email address?')){return false; }
if(!CheckField(theform.certificate, 'Discount certificate ID?')){return false; }
return true;	
}

//===================================
function GetDiscount(theform){
if(!CheckField(theform.firstname, 'Your First Name?')){return false; }
else if(!CheckEmail(theform.email, 'Your email address?')){return false; }
return true;
}








