function printpage() {
window.print();  
}

function mailpage(url)
{
docname = "emailtofriend.php?url=" + url;
MyWindow=window.open(docname,'MyWindowETF','toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=400,height=300,left=250,top=200');
}
function savetofolder(type, contentid, userid, lowdis)
{
docname = "savetofolder.php?type=" + type + "&contentid=" + contentid + "&userid=" + userid + "&lowdis=" + lowdis;
MyWindow=window.open(docname,'MyWindowMyF','toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=400,height=300,left=250,top=200');
}
function deletefromfolder(type, contentid){
	answer = confirm ("Delete this item?");
if (answer==true){
window.location.href="http://www.housekeepingchannel.com/myfolder.php?action=del&contentid=" + contentid + "&type=" + type;
}else{

}
}

function displayprodimg(imagefile, tname, iwidth, iheight){
document.getElementById('mainimage').innerHTML = "<img src=\"http://www.housekeepingchannel.com/objimages/" + imagefile + "\" title=\"" + tname + "\" alt=\"" + tname + "\" width=\"" + iwidth + "\" height=\"" + iheight + "\" />";
}

function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}

var searcher = createRequestObject();


ieMenu = function() {
if (document.all&&document.getElementById) {
categoriesRoot = document.getElementById("categories");
            var thelis=categoriesRoot.getElementsByTagName("LI");
            for(i=0;i<thelis.length;i++){
						   if(thelis[i].lastChild.tagName=="UL"){
               thelis[i].onmouseover=function(){
                    this.lastChild.style.display="block";
                    }
                    thelis[i].onmouseout=function(){
                        this.lastChild.style.display="none";
                    }
                }
            }
        }

}
function showpedia(id) {
docname = "smallpedia.php?id=" + id;
MyWindow=window.open(docname,'MyWindowPed','toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=400,height=300,left=250,top=200');
}
function addbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

window.onload = function () {
thispage = window.location.href;
if (!thispage.match("smallpedia") && !thispage.match("savetofolder") && !thispage.match("emailtofriend")){
	
	ieMenu ();

	}
}
function popitnorm(id) {
MyWindow=window.open(id,'MyWindowbio','toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=600,height=400,left=150,top=100');
}
function popitef(id) {
MyWindow=window.open(id,'MyWindowsm','toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=400,height=300,left=250,top=200');
}
$(document).ready(function(){

var emailaddress = $('#emaddress').html();
if (emailaddress != "" && emailaddress){
 	 		var targetaddress = emailaddress.split(" ");
 	 		var returnaddress = targetaddress[0]+'@'+targetaddress[2];
 	 		$("#emaddress").html('<a href="mailto:'+returnaddress+'">'+returnaddress+'</a>');
 	 		}
 	 		
 	 		
 	 		
 	 		

$("#humanregbutton").click(function() {
$("#register").submit();
});



 	 		});

