function openIframe(url) {
	smartSize();
	document.getElementById('inframe').src=url;
	document.getElementById('myFrame').style.display="block";
	document.getElementById('flashcontent').style.visibility="hidden";
	document.getElementById('adsframe').style.visibility="hidden";
}

function closeIframe(){
	document.getElementById('myFrame').style.display="none";
	document.getElementById('flashcontent').style.visibility="visible";
	document.getElementById('adsframe').style.visibility="visible";
}


var winW = 630, winH = 460;

function smartSize() {
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			winW = window.innerWidth;
			winH = window.innerHeight;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1) {
			winW = document.body.offsetWidth;
			winH = document.body.offsetHeight;
		}
	}
	document.getElementById('flashcontent').style.height = winH - document.getElementById('adsframe').height;

	document.getElementById('inframe').style.height = winH-37-3;
	document.getElementById('inframe').style.width = winW-21;
	document.getElementById('buttonBar').style.width = winW-21;
}

window.onresize = function() {
	smartSize();
}

window.onload = function() {
	smartSize();
	   _uacct = "UA-1625259-2"; 
         urchinTracker();     
}

function adIsVisible() {
	return 1;
//	return adsframe.height != 0;
}

function refreshAd(adLocation){
	document.getElementById('adsframe').src = adLocation;
//	adsframe.src = adLocation;
}

function sendMessage(msg) {
	var re = /<!-- Delay: .* -->/gi;
	var found = msg.match(re);
	var filteredMessage = found[found.length-1];
	document.getElementById("FotoFlexer").setAdDelay(filteredMessage);
//   alert(msg);
}

