// BEGIN : Browser check script
var detect = navigator.userAgent.toLowerCase();
var OS, browser, version, total, thestring;
function detectBrowser() {
	if (checkIt("konqueror")) {
		browser = "Konqueror";
		OS = "Linux";
	}
	else if (checkIt("safari")) browser = "Safari";
	else if (checkIt("omniweb")) browser = "OmniWeb";
	else if (checkIt("opera")) browser = "Opera";
	else if (checkIt("webtv")) browser = "WebTV";
	else if (checkIt("icab")) browser = "iCab";
	else if (checkIt("msie")) browser = "Internet Explorer";
	else if (!checkIt("compatible")) {
		browser = "Netscape Navigator";
		version = detect.charAt(8);
	}
	else browser = "An unknown browser";
	if (!version) version = detect.charAt(place + thestring.length);
	if (!OS) {
		if (checkIt("linux")) OS = "Linux";
		else if (checkIt("x11")) OS = "Unix";
		else if (checkIt("mac")) OS = "Mac";
		else if (checkIt("win")) OS = "Windows";
		else OS = "an unknown operating system";
	}
};
function checkIt(string) {
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
};
// END : Browser check script

// BEGIN : Ad positioning script
/*
	THIS SCRIPT IS USED TO SET UP THE POSITION OF AD'S
	You will need to set up the values in the section below.
	The script assumes you are using absolute positioning for your ad's
*/
/***** START OF EDITABLE SECTION. ENTER VALUES SPECIFIC TO YOUR DESIGN HERE *****/
// setup variables
var xAdjustBanner = 0; // horizontal adjustment that should be made for a small banner
var yAdjustBanner = 0; // vertical adjustment that should be made for a small banner
var bannerID = "AdTop";
/***** END OF EDITABLE SECTION. DON'T EDIT BELOW HERE *****/
// alignBanner assumes the banner is set up to display a large banner and will change the element's style if there is a small banner loaded.
function alignBanner(div) {
	var smallHeight = 60;
	var smallWidth = 468;
	// display the ad
	div.style.display = "block";
	// check if the sky is small
	if (div.clientWidth == smallWidth && xAdjustBanner != 0) div.style.left = (div.offsetLeft + xAdjustBanner) + "px";
	if (div.clientHeight == smallHeight && yAdjustBanner != 0) div.style.top = (div.offsetTop + yAdjustBanner) + "px";
}
// END : Ad positioning script

window.onload = function() {
	detectBrowser();
	if (document.getElementById(bannerID)) alignBanner(document.getElementById(bannerID));
}