<!--


$(document).ready(function(){
	var m = $('#mainAlias').text();
	var s = $('#subAlias').text();
	var i = $('#itemAlias').text();
	$('#adswrapper').load('/functions/ajax/getrelatedposter.php', {'main': m, 'sub': s, 'item': i}, function(){
		$('#posterad').click(function(){
			var target = $(this).find('.target').attr('href');
			window.open(target, 'allposters');
			$.get('/functions/ajax/logposterlink.php', {'src':'gallery', 'main': m, 'sub': s, 'item': i});
		});
	});
});

/*
var bgColor = "#9cc";		
var defColor = "#fff";		

function overCell(id)
{
	if (document.getElementById(id) != null)
	{	
		cell = document.getElementById(id);	
		cell.style.backgroundColor = defColor;
		cell.style.border = "1px solid #000";
	}		
}	
	
function outCell(id){	
		
	if (document.getElementById(id) != null)
	{	
		cell = document.getElementById(id);	
		cell.style.backgroundColor = defColor;	
		cell.style.border = "1px solid #eee";
	}		
}	
*/

//popular

function getPhotoTarget(value){
		if (value == "none") return;
			
		pref = "/gallery/";
		suf = ".htm";
		
		this.location = pref + value + suf;
}

function getBuildingTarget(value){
		if (value == "none") return;
			
		pref = "/buildings/";
		suf = ".htm";
		
		this.location = pref + value + suf;
}

function getPosterTarget(value, tpe){
		if (value == "none") return;
		
		if(this.location.hostname == 'localhost')
		{
			domain = "/posters/";
		}
		else
		{
			domain = "http://posters.aviewoncities.com/";
		}
		pref = tpe == 'city' ? 'cities/' : '';
		suf = ".htm";
		
		this.location = domain + pref + value + suf;
}
//-->