function resize() {
	n = document.body.offsetWidth > 792 ? 789 : '100%';
	with (document.getElementById('bod')) if (width != n) width = n
}

var port_int = 0, port_img = new Image(), port_lod = true;
port_img.onload = port_onl;

function port_pic(port_fna) {
	window.clearInterval(port_int); port_int = 0;
	with (document.getElementById('roll')) {
		switch (port_fna) {
		case '':
			style.visibility = 'visible'
			src = 'visual/inter.gif'
			port_int = window.setInterval('port_pic(\'xxx\')', 2500)
			break;
		case 'xxx':
			style.visibility = 'hidden'
			break;
		default:
			src = 'visual/inter.gif'
			style.visibility = 'visible'
			port_lod = true
			port_img.src = 'dbimg/' + port_fna
		}
	}
}

function port_onl() {
	if (port_lod) {
		document.getElementById('roll').src = port_img.src;
		window.clearInterval(port_int);
		port_lod = false
	}
}

function contact() {
	contact_mes = '';
	contact_ise = (document.getElementById('f_mail').value.indexOf('@') > -1)
	if (document.getElementById('f_list').checked) {
		if (!contact_ise)
			contact_mes += ' You have to enter a valid email address if you\'d like to join our mailing list.'
	} else if (document.getElementById('f_comm').value.length == 0)
		contact_mes += ' We\'re assuming you want to either leave a comment or join the mailing list - otherwise, what\'d be the point in filling out the form?'
	if (contact_mes.length > 0) {
		alert(contact_mes.substr(1))
		return false
	} else return true
}

function tickets(tickets_num, tickets_job, tickets_sta) {
	document.location.href = 'support.asp?i=t' + tickets_num + '&j=' + tickets_job + '&s=' + tickets_sta
}