function layout(page) {
	
	if(document.getElementById){
	
		 if(navigator.appName == "Microsoft Internet Explorer") {
			 
			 if (page == "intro") {			 
				 
				var obj = document.all["mainFrame"];
	
				var w1 = obj.style.width.split("p");
				var w2 = w1[0];
	
				var newx = document.body.offsetWidth*0.5 - w2*0.5;
	
				obj.style.left = newx+"px";
				obj.style.visibility = "visible";
			
			 }
			
		 }else{
			 
			 if (page == "intro") {
				 
				var obj = document.getElementById("mainFrame");
				
				var w1 = obj.style.width.split("p");
				var w2 = w1[0];
	
				var newx = window.innerWidth*0.5 - w2*0.5;
	
				obj.style.left = newx+"px";
			
			 }
			 
		  }
		  
	}	
	
}

function showHideArrow2(pos2) {
	
	if(document.getElementById){
		
		 if(navigator.appName == "Microsoft Internet Explorer") {
					
			document.all['hideR'].style.left = pos2;
		
		 }else{

			document.getElementById('hideR').style.left = pos2;
		 
		  }
	  
	}	
	
}

function showHideArrow(pos) {
	
	if(document.getElementById){
		
		 if(navigator.appName == "Microsoft Internet Explorer") {
					
			document.all['hideL'].style.left = pos;
		
		 }else{

			document.getElementById('hideL').style.left = pos;
		 
		  }
	  
	}	
	
}

function show(dir,count) {	
	
	goOn = true;
	
	if (dir == 'start') {
		showHideArrow('0px');
		activePhoto = 1;
		var nextPhoto = 1;

	}else{
		if (dir == 'right' && activePhoto < count) {
			$("div.photo"+activePhoto).fadeOut(400);
		}
		if (dir == 'left' && activePhoto > 1) {
			$("div.photo"+activePhoto).fadeOut(400);
		}
	}
	
	if (dir == 'left') {
		var nextPhoto = activePhoto - 1;
		if (activePhoto == 1) {
			goOn = false;
		}
	}
	
	if (dir == 'right') {
		var nextPhoto = activePhoto + 1;
		if (activePhoto == count) {
			goOn = false;
		}	
	}
	
	if (goOn == true) {
	
		$("div.photo"+nextPhoto).fadeIn(400);	
		
		if (activePhoto == 1 && nextPhoto == 2) {
			showHideArrow('-30px');
		}
		
		if (activePhoto == 2 && nextPhoto == 1) {
			showHideArrow('0px');
		}
		
		if (nextPhoto == count) {
			showHideArrow2('60px');
		}
		
		if (activePhoto == count) {
			showHideArrow2('90px');
		}
		
		activePhoto = nextPhoto;
	
	}
		
}

function hide(obj) {
	
	$("div.photo"+obj).fadeOut(400);	
	
}

function showContent() {
	
	$("div.textPage").fadeIn(500);	
	
}

function send(name,domain,tld) {
    document.location = "mailto:" + name + "@" + domain + "." + tld;
}

