function vtoggle(id, hide) {
	if (!document.getElementById) return false
	if (!hide) hide = false
	var el = document.getElementById(id)
	var vis = el.style.display
	el.style.display = (vis != 'none' || hide) ? 'none' : ''
	el = document.getElementById(id+'arr')
	el.innerHTML = (vis != 'none' || hide) ? '&nbsp;&darr;' : '&nbsp;&uarr;'
	
	return false
}

function show(url, w, h, s, n) {
	if (!n) n = 'vw'
	attr = 'width=' + w + ',height=' + h + ',location=0,menubar=0,resizable=0,scrollbars=' + s + ',status=0,titlebar=0,toolbar=0,hotkeys=0'
	if (parseInt(navigator.appVersion) >= 4) {
		x = (screen.width - w) / 2
		y = (screen.height - h) / 2
		if(x < 0) x = 0
		if(y < 0) y = 0
		attr += ',xposition=' + x + ',left=' + x + ',yposition=' + y + ',top=' + y
	}
	window.open(url, n, attr)
}
function vshow(u) { show(u, 750, 600, 1); return false; }
function rshow(u) { show(u, 400, 250, 0); return false; }

function clickTab(a, otherTab) {
	var span = a.parentNode;
	if (span.className=='active') {
		return true;
	}
	var tab = document.getElementById(otherTab+'Tab');
	span.className = 'active';
	tab.className = '';
	var table = document.getElementById(otherTab+'Table');
	table.style.display = 'none';
	if (otherTab == 'video') {
		table = document.getElementById('photoTable');
	} else {
		table = document.getElementById('videoTable');
	}
	table.style.display = 'block';
	return false;
}


Event.observe(window, 'load', function() {
	setTimeout(load_adverts,100);
} );

var advert = new Array();
load_adverts = function(){
 	if (advert.length) {
 		advert.each(function(s){s(); });
 	}
}

create_iframe = function(div_id,_src,w,h){
	var div = $(div_id);
	if (!div) return;
	var ifr = document.createElement('iframe');
	ifr.frameBorder = 'no';
	ifr.width = w;
	if (h) ifr.height = h;
	ifr.scrolling = 'no';
	ifr.src = _src.toString();
	
    setTimeout(function () { div.appendChild(ifr);  }, 0);
    //div.insert(ifr);
}