

var age_no_limit = 'hr,th,vn';
var age_16_limit = 'aw,be,vg,fr,fx,it,jm,pt,es';
var age_18_limit = 'gb';
var age_19_limit = 'ca,kp,kr';
var age_20_limit = 'fi,is,jp,nz,no,se';
var age_21_limit = 'ee,hn,id,my,us,ru';
var year_now = 2008;

function getById(id)
{
	return document.getElementById?document.getElementById(id):(document.all?document.all(id):null);
}

function htmlpopup(url, width, height, scroll, resize)
{
	window.open(url,"popup9/8/200833603PM","width="+width+",height="+height+",scrollbars="+scroll+",resizable="+resize+",menubar=0");
}

function openLomoWinners()
{
	winners = window.open("/func/lomo/winners_dec.html","LomoWinnersDec","width=275,height=500,top=100,left=100,resizable=0,scrollbars=0,menubar=0,status=0,toolbars=0");
	winners.focus();
}

function openLomoWinnersJan()
{
	winners = window.open("/func/lomo/winners_jan.html","LomoWinnersJan","width=275,height=500,top=100,left=100,resizable=0,scrollbars=0,menubar=0,status=0,toolbars=0");
	winners.focus();
}

function openLomoWinnersFeb()
{
	winners = window.open("/func/lomo/winners_feb.html","LomoWinnersFeb","width=285,height=500,top=100,left=100,resizable=0,scrollbars=0,menubar=0,status=0,toolbars=0");
	winners.focus();
}

function openLomoWinnerTot()
{
	winners = window.open("/func/lomo/winner_tot.html","LomoGrandPrizeWinner","width=640,height=660,top=100,left=100,resizable=0,scrollbars=1,menubar=0,status=0,toolbars=0");
	winners.focus();
}

function openBlogTools(id, img, desc, by, date, ctry, city)
{
	img = escape(img);
	desc = escape(desc);
	by = escape(by);
	date = escape(date);
	ctry = escape(ctry);
	city = escape(city);
	window.open("/content/campaigns/en/2006/lomo/blogtools/popup.aspx?id="+id+"&img="+img+"&description="+desc+"&by="+by+"&date="+date+"&country="+ctry+"&city="+city,"LomoBlogTools","width=645,height=700,top=100,left=100,resizable=0,scrollbars=1,menubar=0,status=0,toolbars=0");
}

function openLunytunes()
{
	window.open("/content/campaigns/en/2006/lunytunes/shell.html", "lunytunes", "width=1016,height=650,fullscreen=0,menubar=0,resizeable=1,scrollbars=0,status=0,titlebar=1,toolbar=0");
}

function openPearsPopup(id, type)
{
	window.open("/content/campaigns/en/2007/pears/blogtools/popup.aspx?id="+id+"&type="+type,"PearsBlogTools","width=500,height=300,top=100,left=100,resizable=0,scrollbars=0,menubar=0,status=0,toolbars=0");
}

function openPearsPopupKr(id, type)
{
	window.open("/content/campaigns/kr/2007/pears/blogtools/popup.aspx?id="+id+"&type="+type,"PearsBlogTools","width=500,height=300,top=100,left=100,resizable=0,scrollbars=0,menubar=0,status=0,toolbars=0");
}

function openBrandSubmit(id)
{
	window.open("http://upload.vs.seeknear.com/frameset.aspx?id="+id,"BrandSubmit","width=400,height=108,top=100,left=100,scrollbars=0,resizable=0,menubar=0,status=0,toolbars=0");
}

function copyrightpopup(url)
{
	privacy = window.open(url,"copyright","width=500,height=400,scrollbars=1,resizable=1,menubar=0");
	privacy.focus();
}

function termspopup(url)
{
	terms = window.open(url,"absolut_terms","width=500,height=400,scrollbars=1,resizable=1,menubar=0");
	terms.focus();
}

function privacypopup(url)
{
	privacy = window.open(url,"privacy_policy","width=500,height=400,scrollbars=1,resizable=1,menubar=0");
	privacy.focus();
}

function responsibilitypopup(url)
{
	responsibility = window.open(url,"responsibility","width=500,height=400,scrollbars=1,resizable=1,menubar=0");
	responsibility.focus();
}

function gotoabsolutdrinks()
{
	location.href='http://absolutdrinks.com/?ldachk=';
}

function gotodrink(drink)
{
	location.href='http://absolutdrinks.com/drink/'+drink+'.aspx?ldachk=';
}

function gotoiaaw()
{
	location.href='http://absolut.com/?ldachk=';
}

function gotoiaawlang(lang)
{
	location.href='http://absolut.com/'+lang+'/iaaw/?ldachk=';
}

function agecheck(country, year)
{
	country = country.toLowerCase();
	if (isNaN(year))
		return false;
	if (year <= 1900)
		return false;
	if (country.length != 2)
		country = 'xx';
	var year_compare = 20;
	if (age_no_limit.indexOf(country) >= 0)
		year_compare = -1;
	if (age_16_limit.indexOf(country) >= 0)
		year_compare = 16;
	if (age_18_limit.indexOf(country) >= 0)
		year_compare = 18;
	if (age_19_limit.indexOf(country) >= 0)
		year_compare = 19;
	if (age_20_limit.indexOf(country) >= 0)
		year_compare = 20;
	if (age_21_limit.indexOf(country) >= 0)
		year_compare = 21;
	if (year_now - year > year_compare)
		return true;
	return false;
}

function GetActionTag(URL)
{
	var tmp = new Image();
	tmp.src = 'http://switch.atdmt.com/iaction/' + URL;
}

function spotlight(tagVal)
{
	var spotlighttag;
	var Tag;
	var axel = Math.random() + "";
	var ord = axel * 1000000000000000000;
	var prx = "?";
	spotlighttag="http://ad.se.doubleclick.net/activity;src=1167401;type=absol034;cat="+tagVal+";ord="+ord+prx;
	Tag = new Image();
	Tag.src = spotlighttag;
}

function spotlight_tattoo(tagVal)
{
	var spotlighttag;
	var Tag;
	var axel = Math.random() + "";
	var ord = axel * 1000000000000000000;
	var prx = "?";
	spotlighttag="http://ad.se.doubleclick.net/activity;src=1442286;type=absol388;cat="+tagVal+";ord="+ord+prx;
	Tag = new Image();
	Tag.src = spotlighttag;
}

var adcom_ro_total = 0;

function adcomPixelCall()
{
	if(!adcom_ro_total)
	{
		adcom_ro_total = 1;
		parent.document.getElementById('adcompixel').src = 'http://servedby.advertising.com/action/type=753002344/bins=1/rich=0/mnum=1516/logs=0/site=695501/betr=absolut_cs=2';
	}
}
