// JavaScript Document
function addEventHandler(oNode, sEvt, fFunc,bCap){
	var browserName = navigator.appName;
	if(typeof(window.event) != "undefined") oNode.attachEvent("on" + sEvt, fFunc);
	else oNode.addEventListener(sEvt,fFunc,bCap);
	}
function removeEventHandler(oNode, evt, oFunc, bCaptures) {
    if (typeof (window.event) != "undefined")
        oNode.detachEvent("on" + evt, oFunc);
    else
        oNode.removeEventListener(evt, oFunc, bCaptures);
}
function getEventTarget(e) {
	if (window.event) return window.event.srcElement;
	else return e.target;}
function cssBottom(){
	var browserName = navigator.appName;
	if (browserName=="Microsoft Internet Explorer")
 		{
			var array = new Array('one','two','three','four','five');
			for(var i = 1; i < 5; i++){
				document.getElementById(array[i]).style.paddingLeft = "5px";
				}
			document.getElementById('one').style.backgroundPosition = "1px 7px";
 			document.getElementById('two').style.backgroundPosition = "7px 7px";
			document.getElementById('three').style.backgroundPosition = "7px 7px";
		} else {
			document.getElementById('one').style.backgroundPosition = "12px 7px";
			document.getElementById('two').style.backgroundPosition = "7px 7px";
			document.getElementById('three').style.backgroundPosition = "7px 7px";
			}
	}
function outLinks(e){
	if(typeof(window.event) != "undefined") var clickedId = e.srcElement.parentNode.id;
	else var clickedId = e.target.parentNode.id;
	
	switch(clickedId){
		case "pad":
		window.open("http://dibazadesigns.typepad.com");
		break;
		case "inter":
		window.open("http://dibazadesigns.typepad.com/directorio_internacional_/");
		break;	
		case "dsl":
		window.open("http://www.studiodibaza.com/");
		break;
		case "recipes":
		break;
		case "youtube":
		window.open("http://www.youtube.com/dibaza01");
		break;
		}
//	alert(clickedId);

	}
function navOut(){
	addEventHandler(document.getElementById('pad'),"click",outLinks,false);
	addEventHandler(document.getElementById('inter'),"click",outLinks,false);
	addEventHandler(document.getElementById('dsl'),"click",outLinks,false);
	addEventHandler(document.getElementById('recipes'),"click",outLinks,false);
	addEventHandler(document.getElementById('youtube'),"click",outLinks,false);
	}
function init (){
	navOut();//OPENING NEW WINDOWS FOR BOTTOMS LINKS
	cssBottom();
	}
	
addEventHandler(window,"load",init,false);
