/***********************************************

* Animated Information Bar- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more

***********************************************/


informationbar.prototype.setContent=function(data)
{
	//data = data + '<a href="javascript:informationbar.close()">'
		//+ '<img src="close.gif" style="width: 14px; height: 14px; float: right; border: 0; margin-right: 5px" />'
		//+ '</a>';
	//this.content=content+data;
	document.write('<div id="informationbar" style="top: -500px">'+data+'</div>');
}

informationbar.prototype.delayedAnimation=function()
{
	var barinstance=this;
	setTimeout(function(){barinstance.animatetoview()}, 1500);
}

informationbar.prototype.animatetoview=function()
{
	var barinstance=this;
	if (parseInt(this.barref.style.top)<0)
	{
		this.barref.style.top=parseInt(this.barref.style.top)+5+"px";
		setTimeout(function(){barinstance.animatetoview()}, 50);
	}
	else
	{
		if (document.all && !window.XMLHttpRequest)
			this.barref.style.setExpression("top", 'document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px" : body.scrollTop+"px"');
		else
			this.barref.style.top=0;
	}
}

informationbar.close=function()
{
	document.getElementById("informationbar").style.display="none";
	if (this.displayfreq=="session")
		document.cookie="infobarshown=1;path=/";
}
																					
informationbar.prototype.setfrequency=function(type)
{
	this.displayfreq=type;
}

informationbar.prototype.initialize=function()
{
	if (this.displayfreq=="session" && document.cookie.indexOf("infobarshown")==-1 || this.displayfreq=="always")
	{
		this.barref=document.getElementById("informationbar");
		this.barheight=parseInt(this.barref.offsetHeight);
		this.barref.style.top=this.barheight*(-1)+"px";
		this.delayedAnimation();
	}
}

informationbar.prototype.redirect = function()
{
	var url = window.location.href;
	var newUrl = url.substring("http://www.asteriskit.com.au".length);
	window.location = "http://www.noojee.com.au" + newUrl;
}

function informationbar()
{
	this.displayfreq="always";
}

window.onunload=function()
{
	this.barref=null;
}

<!--Invocation code-->
function showInfoBar()
{
	var infobar=new informationbar();
	var url = window.location.href;
	var newUrl = "http://www.noojee.com.au" + url.substring("http://www.asteriskit.com.au".length);
	infobar.setContent(
	
		'<table border="0" cellpadding="0" cellspacing="0" width="772" align="center">'
		+ '<tr> '
		+ '    <td><img src="http://www.noojee.com.au/images/1logo1.gif" width="260" height="78" alt="Noojee Telephony Solutions" border="0" hspace="5"><br></td>'
		+ '    <td><b>We are moving to a new Website and name</b>. Asterisk IT has become <b>Noojee Telephony Solutions</b>. '
		+ '        Nothing has changed except the name. We are still the leading supplier of Asterisk Systems and Support in Australia. '
		+ '        <a href="' + newUrl + '">Click here</a> to go to our new site or wait a moment and we will redirect you.'
		+ '    </td>'
		+ '</tr>'
		+ '</table>');

	//infobar.setfrequency('session') //Uncomment this line to set information bar to only display once per browser session!
	infobar.initialize();

	setTimeout(function(){infobar.redirect()}, 12000);
}


