// menu script //

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

// about us
var menu1=new Array()
menu1[0]='<a href="http://'+window.location.hostname+'/intrinsic-id">Intrinsic-ID</a>'
menu1[1]='<a href="http://'+window.location.hostname+'/values">Values</a>'
menu1[2]='<a href="http://'+window.location.hostname+'/management_team">Management Team</a>'
menu1[3]='<a href="http://'+window.location.hostname+'/technology_advisory_board">Technology Advisory Board</a>'
menu1[4]='<a href="http://'+window.location.hostname+'/board_of_directors">Board of Directors</a>'
menu1[5]='<a href="http://'+window.location.hostname+'/investor_relations">Investor Relations</a>'
menu1[6]='<a href="http://'+window.location.hostname+'/contact">Contact</a>'

// news/events
var menu2=new Array()
menu2[0]='<a href="http://'+window.location.hostname+'/news">News</a>'
menu2[1]='<a href="http://'+window.location.hostname+'/events">Events</a>'

// products
var menu3=new Array()
menu3[0]='<a href="http://'+window.location.hostname+'/quiddikey">Quiddikey</a>'
menu3[1]='<a href="http://'+window.location.hostname+'/reporting_services">100% Reporting Services</a>'

// resources
var menu4=new Array()
menu4[0]='<a href="http://'+window.location.hostname+'/download">Podcast: Conquering Copycats</a>'
menu4[1]='<a href="http://'+window.location.hostname+'/download">Product Backgrounder</a>'
menu4[2]='<a href="http://'+window.location.hostname+'/download">Technology Backgrounder</a>'
menu4[3]='<a href="http://'+window.location.hostname+'/_lib/img/Investment relations.pdf" target="_blank">Investor Relations</a>'
menu4[4]='<a href="http://'+window.location.hostname+'/download">Conquering Copycats</a>'
menu4[5]='<a href="http://'+window.location.hostname+'/download">GSA Suppliers Forum</a>'

var menuwidth='158px' //default menu width
var menubgcolor='' //menu bgcolor
var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


function imeel(name,text,domain)
{
   var address = name + "\u0040" + domain + '?subject=' + text;
   var url = "mailto:" + address;
   if(!text)
   {
      text = address;
   }
   document.write("<a href=\""+url+"\"><img src='/_lib/img/icon_email.gif' class='icon' border='0' alt='Email deze persoon' /></a>");
}
function doSubmitBestel(inp)
{
	var fid = "form_bestel_" + inp;
	var f = document.getElementById(fid);
	f.submit();
}
function doSubmitForm(inp) {
	
	var form = document.getElementById(inp);
	var sError = "";
	var strFocus = "";
	
	//make sure the can only be pressed once...
	if(document.getElementById('sbm')){document.getElementById('sbm').disabled = true};	
	
	if(inp == "form_contact" || inp == "form_aanmeld" || inp == "form_register") {	
		//var c_initialen		= document.getElementById('c_initialen').value;
		//var c_name			= document.getElementById('c_name').value;
		//var c_titel			= document.getElementById('c_titel').checked;
		//var c_adress		= document.getElementById('c_adress').value;
		//var c_adressnr		= document.getElementById('c_adressnr').value;
		//var c_zipc			= document.getElementById('c_zipc').value;
		//var c_zipl			= document.getElementById('c_zipl').value;
		//var c_city			= document.getElementById('c_city').value;
		//var c_country		= document.getElementById('c_country').value;
		//var c_tel		= document.getElementById('c_tel').value;
	
		//if(c_geslacht == ""){sError = sError + "- U hebt geen geslacht gekozen\n"; if(strFocus == ""){ strFocus = "gM"; }}
		//if(c_name == ""){sError = sError + "- U hebt geen achternaam ingevuld\n"; if(strFocus == ""){ strFocus = "c_name"; }}
		//if(c_titel == ""){sError = sError + "- U hebt geen titelatuur gekozen\n"; if(strFocus == ""){ strFocus = "c_titel_0"; }}
		//if(c_adress == ""){sError = sError + "- U hebt geen adres ingevuld\n"; if(strFocus == ""){ strFocus = "c_adress"; }}
		//if(c_adressnr == ""){sError = sError + "- U hebt geen huisnummer ingevuld\n"; if(strFocus == ""){ strFocus = "c_adressnr"; }}
		//if(c_zipc == "" && c_zipl == ""){sError = sError + "- U hebt geen juiste postcode ingevuld\n"; if(strFocus == ""){ strFocus = "c_zipc"; }}
		//if(c_city == ""){sError = sError + "- U hebt geen woonplaats ingevuld\n"; if(strFocus == ""){ strFocus = "c_city"; }}
		//if(c_tel == ""){sError = sError + "- U hebt geen e-mailadres ingevuld\n"; if(strFocus == ""){ strFocus = "c_tel"; }}
		//if(c_initialen == ""){sError = sError + "- U hebt geen initialen ingevuld\n"; if(strFocus == ""){ strFocus = "c_initialen"; }}
		//if(c_country == ""){sError = sError + "- U hebt geen land ingevuld\n"; if(strFocus == ""){ strFocus = "c_country"; }}
	}
	
	if (sError != "")
	{
		alert('De volgende gegevens ontbreken of zijn onvolledig.\n\n'+sError+'');
		if(document.getElementById('sbm')){document.getElementById('sbm').disabled = false};
		if(strFocus != "")
		{
		eval("document.forms."+inp+"."+strFocus+".focus();");
		}
	}
	else
	{
		form.action = "process.asp";
		form.target = "iSubmit";
		form.submit();
	}
}