var ftBegin = '<font style="font-size:';
var ftEnd = 'px"> ';
var cloud1_layout = new Array('22','40','22','14','30','22','35','25','22','22','16','22','30','22','40','22','25','22','30','14','22');
var cloud2_layout = new Array('32','24','40','24','14','32','22','18','22','28','26','16','24','14','30','40','20','16','26','34','20');
var cloud3_layout = new Array('14','30','24','34','18','22','16','20','32','24','32','38','14','24','20','36','14','26','40','22','30');
var cloudLayoutArray = new Array(cloud1_layout,cloud2_layout,cloud3_layout);
var popit = true;

function setMenuSelection() {
	var url = window.location.toString();
	var tagId = 'default';
	if (url.indexOf('animals.html') != -1) tagId = 'animals';
	else if (url.indexOf('music.html') != -1) tagId = 'music';
	else if (url.indexOf('art.html') != -1) tagId = 'art';
	else if (url.indexOf('celebrities.html') != -1) tagId = 'celebrities';
	else if (url.indexOf('3d.html') != -1) tagId = '3d';
	else if (url.indexOf('kids.html') != -1) tagId = 'kids';
	else if (url.indexOf('holidays.html') != -1) tagId = 'holidays';
	else if (url.indexOf('games.html') != -1) tagId = 'games';
	else if (url.indexOf('models.html') != -1) tagId = 'models';
	else if (url.indexOf('sports.html') != -1) tagId = 'sports';
	else if (url.indexOf('tv.html') != -1) tagId = 'tv';
	else if (url.indexOf('movies.html') != -1) tagId = 'movies';
	else if (url.indexOf('culture.html') != -1) tagId = 'culture';
	else if (url.indexOf('nature.html') != -1) tagId = 'nature';
	else if (url.indexOf('specialty.html') != -1) tagId = 'specialty';
	document.getElementById(tagId).style.color = '#2084EB';
}
function mItemOver(catItem) {
	catItem.style.color = '#2084EB';
	catItem.style.borderBottom = '1px dotted #2084EB';
}
function mItemOut(catItem) {
	catItem.style.color = '#888888';
	catItem.style.border = '0px';
}
function mItemClick(catItem) {
	window.location = catItem.id + '.html';
}
function createTagCloud(cloudId,keywords) {
	var keywordArray = keywords.split(',');
	if (cloudId >= 0 && cloudId <= 2) {
		for (var x = 0; x < cloudLayoutArray[cloudId].length; x++) {
			if (keywordArray[x] != null)
				document.write(ftBegin + cloudLayoutArray[cloudId][x] + ftEnd + keywordArray[x] + '</font>');
			else document.write(ftBegin + cloudLayoutArray[cloudId][x] + ftEnd + '</font>');
		}
	}
}
function exitPop() {
	if (popit) {
		var w = 720;
		var h = 300;
		props = "width=" + w + ",";
		props += "height=" + h + ",";
		props += "titlebar=0,";
		props += "toolbar=0,";
		props += "location=0,";
		props += "menubar=0,";
		props += "scrollbars=0,";
		props += "resizable=0,";
		props += "channelmode=0,";
		props += "directories=0,";
		props += "status=0";
		var popwin = window.open("","popwin",props,true);
		popwin.location = 'http://pops.freeze.com/themes/pop4/index.asp?a=8170&f=theme_exitpop';
		self.focus();
	} 
}
function setExitPop(value) {
	popit = value;
}
