window.addEvent('domready', function() {
	// logo:
	$('logo').onmouseover = function() {
		this.style.cursor = 'pointer';
	}
	$('logo').onclick = function() {
		document.location.href = '/';
	}
	// promo:
	if ($('promo') != undefined) {
		$('promo').onmouseover = function() {
			this.style.cursor = 'pointer';
		}
		$('promo').onclick = function() {
			document.location.href = 'thule-excellence.html';
		}
	}
	// safemail:
	safeMail();
});

function playMovie(el, swffile, w, h) {
	var fo = new FlashObject(swffile, "player", w, h, "9", "#000000");
	fo.addParam("allowFullScreen", "true");
	fo.addParam("allowScriptAccess", "true");
	fo.addParam("swLiveConnect", "true");
	fo.addParam("quality", "best");
	fo.addParam("scale", "noscale");
	fo.addParam("menu", "false");
	fo.addParam("wmode", "transparent");
	fo.write(el);
}

function safeMail() {
	var safemails = $$('a.safemail');
	if (safemails) {
		for (i=0; i < safemails.length; i++) {
			t = safemails[i].href;
			t = t.replace('www.', '');
			t = t.replace('thule.', '');
			t = t.replace('http://boxshop.hu/safemail/', '');
			temp = t.split('/');
			temp = temp[1]+String.fromCharCode(64)+temp[0];
			safemails[i].innerHTML = temp;
			safemails[i].href = 'mailto:'+temp;
			safemails[i].className = '';
		}
	}
};

