// Flash header Script
// Yoonika theme

if(window.attachEvent) //IE
{
	window.attachEvent("onload", _initPageFunction);
}
else if(window.addEventListener) //DOM
{
	window.addEventListener("load", _initPageFunction, false);
}

// Function used to initialize all functions used in page
function _initPageFunction()
{
	_initLogo();
	_replaceNewsletter();
}

// function that insert a link over the logo in the header of the page for SEO
function _initLogo()
{
	if(document.getElementById('contentLogo'))
	{
		var oDivLogo = document.getElementById('contentLogo');
		if(oDivLogo){oDivLogo.innerHTML = '<a id="logoYoonika" href="/" title="Yoonika Fashion">Yoonika Fashion</a>';}
	}
}

function _replaceNewsletter()
{
	if(document.getElementById("newsLetterContainer") && document.getElementById("newsletterContentContainer"))
	{
		document.getElementById("newsletterContentContainer").appendChild(document.getElementById("newsLetterContainer"));
	}
}