// Nap den blot - men skriv lige i din kode hvor du har den fra! t_contentW775:-)
t_browser=false
t_browserver=0
IE4=!!document.all
W3C=DOM=!!document.getElementById
NS4=!!document.layers
Mac=(navigator.appVersion.indexOf("Mac")!=-1)


m_xPos = 475;
m_yPos = (NS4)?117:109;
m_ok=true
t_frys=false
t_luktimer=null
t_aaben=0
topZ=0
t_antal=3
t_contentW=1075

function t_getelement(id){
	return W3C?document.getElementById(id):
		IE4?document.all[id]:
		NS4?document[id]:false;
}

function iknoget(){}

function t_offset(){
	var t_winW
	if(t_browser=='gecko')
		t_winW=document.body.offsetWidth
	else if(window.innerWidth)
		t_winW=window.innerWidth-(NS4&&!Mac?16:0)
	else if(document.body&&document.body.clientWidth)
		t_winW=document.body.clientWidth
	else
		t_winW=100
	
	return(t_winW<t_contentW)?0:Math.floor((t_winW-t_contentW)/2)
}


function t_over(){clearTimeout(t_luktimer)}

function t_ud(){
	if(!t_frys) {
		t_luktimer=setTimeout("t_luk("+t_aaben+")",500)
	}
}

function t_luk(id){
	clearTimeout(t_luktimer)
	t_flickmenu(1,false)
	t_flickmenu(2,false)
	t_flickmenu(3,false)
}

function t_flickmenu(id,vis){
	var submenuLeft=0;
	var submenuTop=0;
	var t_offsetW=t_offset()
	var m=t_getelement("m"+id)
	if(NS4){
		m.moveTo(m_xPos+t_offsetW,m_yPos)
		m.visibility=vis?"show":"hide"
		if(id==2)
		{
			var m=t_getelement("m"+3)
			m.visibility=false?"show":"hide"
		}
		else
		{
			var m=t_getelement("m"+2)
			m.visibility=false?"show":"hide"
		}
		
	}else{
		submenuLeft= (id!=1)?180:0;
		submenuTop= (id>2)?24:0;
		m.style.left=submenuLeft+m_xPos+t_offsetW+"px"
		m.style.top=submenuTop+m_yPos
		m.style.visibility=vis?"visible":"hidden"
		
		m.style.zIndex=10000
		
		if(id==2)
		{
			var m=t_getelement("m"+3)
			m.style.visibility=false?"visible":"hidden"
		}
		else
		{
			var m=t_getelement("m"+2)
			m.style.visibility=false?"visible":"hidden"
		}
	}
}

function t_popop(id){
	clearTimeout(t_luktimer)
	for(i=1;i<=t_antal;i++)
	{
		if(i==id)
		{
		
			t_flickmenu(i,i==id)
		}
	}
	t_aaben=id
	t_frys=false
}


function validEmail(email) {
invalidChars = " /:,;"
if (email == "") {
    return false
}

for (i=0; i<invalidChars.length; i++) {
    badChar = invalidChars.charAt(i)
    if (email.indexOf (badChar,0) != -1) {
        return false
    }
}  // for (i=o.. 

atPos = email.indexOf ("@",1)

if (atPos == -1) {
    return false
}

if ( email.indexOf ("@", atPos+1) != -1) {
    return false
}
periodPos = email.indexOf (".", atPos)

if ( periodPos == -1) {
    return false
}

if ( periodPos+3 > email.length)    {
    return false
}
return true
}  // validEmail 

function email_ons() {
	parent.location.href='mailto:info@thehouseofbeauty.be';
}

/*
function email_vriend(){
	who=prompt("Enter Friend's Email Address: ","");
	if(validEmail(who+'')) {
		if (confirm("Are you sure you want to mail "+who+" with the subject of www.thehouseofbeauty.be?")==true)
		{
			parent.location.href='mailto:'+who+'?subject=www.thehouseofbeauty.be';
		}
	} else {
		alert('Email Address is not a valid address')
	}
}
*/

function email_vriend(){
	parent.location.href='send2friend.php';
}

