/* this code is bilalis.made © 2006 (www.bilalis.com) */

function bll_linkAtSign(user, domain) {
	document.location.href = 'mai' + 'lto' + ':' + user + '@' + domain;
}
function bll_showAtSign(user, domain) {
	document.write(user + '@' + domain);
}
// old code after this line, from filmsig.js (since 2005)
function popupPhoto(page) {
	newWindow = window.open(page, 'filmsigpop', 'left=20,top=10,width=334,height=356,resizable=yes');
	newWindow.focus();
}

function popupJustMain(page) {
	newWindow = window.open(page, 'filmsigpopmain', 'left=186,top=10,width=500,height=440,location=yes,status=yes,resizable=yes,scrollbars=yes');
	newWindow.focus();
}

function sbox() {
	if (!document.searchbox) return;
	var forma = document.searchbox;
	var sb = forma.phrase;
	var defvalue = sb.value;
	sb.onfocus = function () {if (sb.value == defvalue) {sb.value = ''; sb.className = 'globformfieldOn';}};
	sb.onblur = function () {if (sb.value == '') {sb.value = defvalue; sb.className = 'globformfield';}};
	forma.onsubmit = function () {if (sb.value == defvalue || sb.value == '') {return false;} else {return true;}};
}

function sforma() {
	if (!document.searchforma) return;
	var forma = document.searchforma;
	var sb = forma.phrase;
	var defvalue = sb.value;
	sb.focus();
	sb.onfocus = function () {sb.className = 'globformfieldOn';};
	sb.onblur = function () {sb.className = 'globformfield';};
	forma.onsubmit = function () {if (sb.value == '') {return false;} else {return true;}};
}

function sform() {
	if (!document.searchform) return;
	var forma = document.searchform;
	var sb = forma.phrase;
	var defvalue = sb.value;
	sb.onfocus = function () {sb.className = 'globformfieldOn';};
	sb.onblur = function () {sb.className = 'globformfield';};
	forma.onsubmit = function () {if (sb.value == '') {return false;} else {return true;}};
}

function contform() {
	if (!document.forms['contact']) return;
	var forma = document.forms['contact'];
	var elms = forma.elements;
	for (i=0;i<elms.length;i++) {
		elms[i].onfocus = function () {if (this.type != 'submit' && this.type != 'button' && this.type != 'radio' && this.type != 'checkbox') {this.className = 'textformfieldOn';}};
		elms[i].onblur = function () {if (this.type != 'submit' && this.type != 'button' && this.type != 'radio' && this.type != 'checkbox') {this.className = 'textformfield';}};
	};
	forma.onsubmit = function () {
		if (elms['sender'].value == '' || elms['email'].value == '' || elms['MESSAGE'].value == '') {
			return false;} 
		else {
			forma.elements['submit'].disabled = true;
			return true;};
	};
}

function entryform() {
	if (!document.forms['listentry']) return;
	var forma = document.forms['listentry'];
	var elms = forma.elements;
	for (i=0;i<elms.length;i++) {
		elms[i].onfocus = function () {if (this.type != 'submit' && this.type != 'button' && this.type != 'radio' && this.type != 'checkbox') {this.className = 'textformfieldOn';}};
		elms[i].onblur = function () {if (this.type != 'submit' && this.type != 'button' && this.type != 'radio' && this.type != 'checkbox') {this.className = 'textformfield';}};
	};
	forma.onsubmit = function () {
		if (elms['GID'].value == '' || elms['Company'].value == '') {
			return false;} 
		else {
			forma.elements['submit'].disabled = true;
			return true;};
	};
}

function cuttyCarditsa() {
//	if (forma.GID.options[selectBox.selectedIndex].value == 2) {alert('I\'m in, baby!'); document.getElementById('ERbitman').style.display = 'block';};
	forma.GID.onchange = function () {if (forma.GID.options[listentry.GID.selectedIndex].value == '2') {alert('I\'m in, baby!');document.getElementById('ERbitman').style.display = 'block';}};
	elms('GID2').onblur = function () {if (this.value == 38) {document.getElementById('ERbitman').style.display = 'block';}};
	elms('GID2').onblur = function () {if (this.value != 38) {document.getElementById('ERbitman').style.display = 'none';}};
}

function gobabygo() {
	sbox();
	sforma();
	sform();
	contform();
	entryform();
}

window.onload=gobabygo;
