/*  (C) 1995-2008 Nautica Editrice Srl - All rights reserved  */

var hit_count = 'yachtmarket';

function tip_on (tip_id) {
	var tip = document.getElementById (tip_id);
	tip.style.visibility = 'visible';
	tip.style.display = 'block';
	return true;
}

function tip_off (tip_id) {
	var tip = document.getElementById (tip_id);
	tip.style.visibility = 'hidden';
	tip.style.display = 'none';
	return true;
}

function tip_switch (tip_id) {
	var tip = document.getElementById (tip_id);
	if (tip.style.visibility == 'visible') {
		tip.style.visibility = 'hidden';
		tip.style.display = 'none';
	}
	else {
		tip.style.visibility = 'visible';
		tip.style.display = 'block';
	}
	return true;
}

function zoom_on (image_url) {
	var img = document.getElementById ("zoomImage");
	var box = document.getElementById ('zoomBox');
	img.src = image_url;
	box.style.visibility = 'visible';
	box.style.display = 'block';
	return true;
}

function zoom_off () {
	var box = document.getElementById ('zoomBox');
	box.style.visibility = 'hidden';
	box.style.display = 'none';
	return true;
}

if (!window.rotator_speed) var rotator_speed = 5000;
if (!window.rotator_id) var rotator_id = 'rotator';
if (!window.rotator_tag) var rotator_tag = 'dt';
var rotator_item = 0;
var ROTATOR_ITEMS = new Array ();

function rotator () {
	if (!ROTATOR_ITEMS[0]) {
		if (!document.getElementById) return;
		ROTATOR_ITEMS = document.getElementById(rotator_id).getElementsByTagName(rotator_tag);
		ROTATOR_ITEMS[0].style.display = 'block';
		setTimeout (rotator, rotator_speed);
		return;
	}
	next_item = ROTATOR_ITEMS[rotator_item + 1] ? rotator_item + 1 : 0;
	ROTATOR_ITEMS[next_item].style.display = 'block';
	ROTATOR_ITEMS[rotator_item].style.display = 'none';
	rotator_item = next_item;
	setTimeout (rotator, rotator_speed);
}

function radiovalue (theRadio) {
	for (var i = 0; i < theRadio.length; i++) {
		if (theRadio[i].checked) return theRadio[i].value;
	}
	return false;
}

function searchSubmit (form_name) {
	obj = document.forms[form_name];
	obj.submit();
	return true;
}

function searchReset (form_name) {
	obj = document.forms[form_name];
	obj.s.selectedIndex='0';
	obj.c.selectedIndex='0';
	obj.l.selectedIndex='0';
	obj.e.selectedIndex='0';
	obj.y.selectedIndex='0';
	obj.g.selectedIndex='0';
	obj.q.value = "";
	return true;
}

/*
CSS Browser Selector v0.2.9
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera\s(\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('chrome')?'chrome webkit safari':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();

