///////////////////
// Code d'Azur ////
///////////////////
// version = 0.1 //
///////////////////
// function getClientWidth
function getClientWidth()
{
	var clientW;
	if (self.innerWidth)
	{
		clientW = self.innerWidth;
	} else if (document.documentElement && document.documentElement.clientWidth)
	{
		clientW = document.documentElement.clientWidth;
	} else if (document.body)
	{
		clientW = document.body.clientWidth;
	}
	return clientW;
}
// function getClientHeight
function getClientHeight()
{
	var clientH;
	if (self.innerHeight)
	{
		clientH = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight)
	{
		clientH = document.documentElement.clientHeight;
	} else if (document.body)
	{
		clientH = document.body.clientHeight;
	}
	return clientH;
}
// function getScrollTop
function getScrollTop()
{
	var scrollT;
	if (self.pageYOffset)
	{
		scrollT = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop)
	{
		scrollT = document.documentElement.scrollTop;
	} else if (document.body)
	{
		scrollT = document.body.scrollTop;
	}
	return scrollT;
}
// function setScrollTop
function setScrollTop()
{
	self.scrollTo(0,0);
}
// function setScrollBottom
function setScrollBottom()
{
	self.scrollTo(0,3000);
}
// function setScrollPos
function setScrollPos(numPos)
{
	self.scrollTo(0,numPos);
}
// function set div height
function setDivHeight(div, numHeight)
{
	document.getElementById('flash').style.height = numHeight+"px";  
}
// function set div width
function setDivWidth(div, numWidth)
{
	document.getElementById(div).style.width = numWidth+"px";
}
// function bookmark
function bookmark()
{
	var appName   = navigator.appName.toLowerCase(); 
	var userAgent = navigator.userAgent.toLowerCase();
	if (appName.indexOf("explorer") != -1)
	{
		window.external.AddFavorite(parent.window.location, parent.document.title);
	} else {
		var info;
		if (userAgent.indexOf("mac") != -1)
		{
			info = "Please use Cmd-D or the menu to bookmark Code d'Azur site";
		} else {
			info = "Please use Ctrl-D or the menu to bookmark Code d'Azur site";
		}
		alert(info);		
	}
}