//----------------------------------------------------------------------------------------------------------------------------------------------------------------------
// 	COPYRIGHT JAMES KENT 2008
//	AESTHETICBOX JAVASCRIPT APPLICATION V2.0
//	http://www.aesthetic-design.co.uk
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------
//	FINISHED 05/01/08 FOR GCE APPLIED ICT E-PORTFOLIO SITEMAP SECTION
//	I HEREBY GRANT PERMISSION, WITHOUT CHARGE, TO ANY PERSONS IN POSESSION
//	OF THIS SOFTWARE TO USE, COPY, MODIFY, MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE AND
//	SELL THIS SOFTWARE WITHOUT RESTRICTION, SUBJECT TO THE FOLLOWING CONDITIONS:
//
//	YOU MUST ACCREDIT ME, JAMES KENT AS THE CREATOR OF THIS SOFTWARE AS WELL AS
//	REFERENCING HTTP://WWW.AESTHETIC-DESIGN.CO.UK.
//
//	THIS SOFTWARE IS PROVIDED WITHOUT WARRANTY OF GUARANTEE AND THE COPYRIGHT HOLDER
//	ACCEPTS NO RESPONSIBILITY FOR DAMAGE CAUSED TO YOUR WEBSITE OR BUSINESS
//	IN USING THIS SOFTWARE
//	IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
//
//
//
//

function overLay() {
	var $link = document.getElementById('aestheticbox');
	$link.onclick = function() 
	{
			var browserName=navigator.appName; 
            if (browserName=="Netscape")
            { 
		            Effect.Appear('overlay-inner');
			            Element.show('overlaycontainer');
			            Effect.Appear('aboutmebox',{ delay:0});
			            Element.show('closebox');
			            Effect.Appear('image',{ delay:0});
			            }
            else 
            { 
             if (browserName=="Microsoft Internet Explorer")
             {
		            Effect.Appear('overlay-inner');
			            Element.show('overlaycontainer');
			            Effect.Appear('aboutmebox',{ delay:0 });
			            Effect.Appear('closebox', { delay: 0, duration: 0 });
			            Effect.Appear('image',{ delay:0});
			             }
                        document.getElementById('overlaycontainer').style.height = '100%';
			            document.getElementById('overlaycontainer').style.width = '100%'; 
            }
    }
}

function outer() {
	var div; 
	if(document.getElementById('overlaycontainer') == null) 
	{
		div = document.createElement("div");
		div.style.display = 'none';
		div.id = "overlaycontainer"; 
		document.body.appendChild(div);
	}else{
		div = document.getElementById('overlaycontainer');
	}
}

function inner() {
    var div = document.createElement("div");
    div.style.display = 'none';
    div.id = "overlay-inner"; 
    document.body.appendChild(div);
}

function closebox() {
    var closebox = document.createElement("div");
    closebox.setAttribute( 'href', '#' );
    closebox.setAttribute( 'id', 'closebox');
    closebox.setAttribute( 'accesskey', 'a');
    closebox.style.display = 'none';
    
    closebox.onclick = function()
    { 
	    Element.hide('overlaycontainer'); 
		Element.hide('closebox');
		Element.hide('overlay-inner');	
		Element.hide('image');
		Element.hide('para');
		Element.hide('aboutmebox');
	}
    if(document.getElementById("overlay-inner"))
        document.getElementById("overlay-inner").appendChild(closebox);
}

function closeboxHidden() {
    var closebox = document.createElement("div");
    closebox.setAttribute( 'href', '#' );
    closebox.setAttribute( 'id', 'closebox');
    closebox.setAttribute( 'accesskey', 'a');
    closebox.style.display = 'none';
	Element.hide('overlaycontainer'); 
	Element.hide('closebox');
	Element.hide('overlay-inner');	
	Element.hide('image');
	Element.hide('para');
	Element.hide('aboutmebox');
    document.getElementById("overlay-inner").appendChild(closebox);
}
//Edit this section for paragraph text
function title() {
    var p = document.createElement("p");
    p.setAttribute( 'id', 'para');
    p.style.display = 'none';
    document.getElementById("overlay-inner").appendChild(p);
}

// Edit this section for paragraph text
function content() {
    var about = document.createElement("p");
    about.setAttribute( 'id', 'aboutmebox');
    about.style.display = 'none';
    about.style.width = '500px';
    about.style.height = '480px'; 
    document.getElementById("overlay-inner").appendChild(about);
}

function image() {
    var image = document.createElement("div");
    image.setAttribute( 'id', 'image');
    image.style.display = 'none';
    image.innerHTML = "<img src='images/WTP_bigmap.jpg' border='0' style='margin-top:30px;' usemap='#WTP_bigmap'>"; 
    image.style.width = '500px';
    image.style.backgroundColor = '#ffffff';
    image.style.height = '338px';
    image.style.position = 'absolute';
    image.style.top = '0px';
    image.setAttribute( 'accesskey', 'a' );
    document.getElementById("overlay-inner").appendChild(image);
}
