//------------------------------------------------------------//
//        Copyright 2006 B. Geraci - www.bg-portal.de         //
//------------------------------------------------------------//

/* 
    List of transitions:
	-------------------
	0. "Box In"
	1. "Box Out"
	2. "Circle In" 
    3. "Circle Out"
	4. "Wipe Up"
	5. "Wipe Down"
	6. "Wipe Right"
    7. "Wipe Left"
	8. "Vertical Blinds"
	9. "Horizontal Blinds"
    10. "Checkerboard Across"
    11. "Checkerboard Down"
    12. "Random Dissolve"
	13. "Split Vertical In"
	14. "Split Vertical Out"
    15. "Split Horizontal In"
	16. "Split Horizontal Out" 
    17. "Strips Left Down"
	18. "Strips Left Up"
	19. "Strips Right Down"
    20. "Strips Right Up"
	21. "Random Bars Horizontal"
    22. "Random Bars Vertical"
    23. "Random"
*/

function blurLinks(){
	var el = document.links;
	for(var i=0; i<el.length; i++)
		el[i].onfocus = function(){ this.blur(); };
}

function getObj(id){ return document.getElementById(id); }
function showObj(id){ getObj(id).style.visibility = "visible"; }

function setNav(){
	if(getObj("nav")){
		var abstand = getObj("container").offsetLeft;
		getObj("nav").style.left = abstand + 1 + "px";
		showObj("nav");
	}
}

function filter(id, fx){
	var el = getObj(id);
	if(el.filters){
		el.filters.item(0).transition = fx;
  		el.filters.item(0).apply();
  		el.style.visibility = "visible";
  		el.filters.item(0).play();
		return true;
	}
	else el.style.visibility = "visible";
}

function init(){
	blurLinks();
	if(getObj("headImg") && filter("headImg", 3))
		setTimeout("setNav()", 2000);
	else setNav();
}

window.onresize = setNav;
