	function enlarge(url)
	{
		MM_openBrWindow(url,'','status=yes,scrollbars=yes,width=600,height=500');
	}
	
	function browse(url)
	{
		MM_openBrWindow(url,'','status=yes,scrollbars=yes,width=820,height=500');
	}
	
	function gallery(region, id)
	{
		MM_openBrWindow('gallery.php?region=' + region + '&id=' + id,'','status=yes,scrollbars=yes,width=120,height=70');
	}
	
	function gallery_2(region, id, uid)
	{
		MM_openBrWindow('gallery.php?region=' + region + '&id=' + id + '&uid=' + uid,'','status=yes,scrollbars=yes,width=120,height=70');
	}
	
	function newsletter(language)
	{
		
		//javascript:MM_openBrWindow('', 'newsletter','width=670,height=550,scrollbars=yes,statusbar=yes');
		javascript:MM_openBrWindow('../microsites/newsletter/?language=' + language,'newsletter','width=670,height=550,scrollbars=yes,statusbar=yes');
	}
	
	function comment(pid, ptype, variant, language)
	{
		javascript:MM_openBrWindow('../microsites/comments/?pid=' + pid + '&type=' + ptype+ '&variant=' + variant + '&language=' + language,'comment','width=670,height=550,scrollbars=yes,statusbar=yes');
	}
	
	function headteam()
	{
		MM_openBrWindow('https://www.news.head.com/u/register.php?CID=116373601&f=9033', 'RegistrationForm', 'menubar=0,locationbar=0,status=0,scrollbars=1,resizable=1,width=670,height=590');
	}
	
	function TickerEN()
	{
		MM_openBrWindow('../ski-ticker/index_en.html', 'Live', 'width=700,height=500,resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes');
	}
	
	function TickerDE()
	{
		MM_openBrWindow('../ski-ticker/index.html', 'Live', 'width=700,height=500,resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes');
	}
	
	function SkiTicker(language)
	{
		/* currently no support for languages */
		MM_openBrWindow('../ski-ticker/index.html', 'Live', 'width=700,height=500,resizable=no,toolbar=no,status=no,menubar=no,scrollbars=yes');
	}
	
	function show_video()
	{
		alert('no popup yet');
	}
	
	function ShowInvodoProductVideos(product_key)
	{
		InvodoProductVideosx = window.open('http://www.tennisequipmentdemonstrations.com/' + product_key + '?a=tennis.head.com', 'InvodoProductVideos', 'menubar=0,locationbar=0,resizable=0,width=770,height=515');
		InvodoProductVideosx.focus();
		
	}
	
	var global_selector = 0;
	var global_language = 'en';
	
	
	var mouse_x = 0;
	var mouse_y = 0;
	
	var helpers_open = false;

	/*
	if (document.addEventListener)
	{
		addEventListener('mousemove', getMouseXY, true);
	}
	else if (!document.all)
	{
		document.captureEvents(Event.MOUSEMOVE)
	}
	document.onmousemove = getMouseXY;
	*/
	
	function URLEncode(clearString)
	{
		var output = '';
		var x = 0;
		clearString = clearString.toString();
		var regex = /(^[a-zA-Z0-9_.]*)/;
		while (x < clearString.length)
		{
			var match = regex.exec(clearString.substr(x));
			if (match != null && match.length > 1 && match[1] != '')
			{
				output += match[1];
				x += match[1].length;
			}
			else
			{
				if (clearString[x] == ' ')
				{
					output += '+';
				}
				else
				{
					var charCode = clearString.charCodeAt(x);
					var hexVal = charCode.toString(16);
					output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase();
				}
				x++;
			}
		}
		return output;
	}

	function getMouseXY(e)
	{
		if (document.all)
		{
			mouse_x = event.clientX + document.body.scrollLeft;
			mouse_y = event.clientY + document.body.scrollTop;
		}
		else
		{
			mouse_x = e.pageX;
			mouse_y = e.pageY;
		}
		
		if (mouse_x < 0){mouse_x = 0;}
		if (mouse_y < 0){mouse_y = 0;}  
		
		//window.status = mouse_x + '/' + mouse_y;
		if (helpers_open && mouse_y > 220 || helpers_open && mouse_x < 600)
		{
			HideHelpers()
		}
		return true;
	}

	function ShowProductOverview()
	{
		HideHelpers();
		MM_showHideLayers('div_po', '', 'show');
		helpers_open = true;
		MM_changeProp('div_po', '', 'style.left', (mouse_x - 100) + 'px');
	}
	
	function thinkBig()
	{
	}
	
	function ShowLegend()
	{
		el = 'div_legend';
	
		var rowShow=(document.all?'block':'table-row');
		
		elem=document.getElementById(el);
		state=(rowShow==elem.style.display?0:1);
		elem.style.display=(state?rowShow:'none');
		
		//MM_showHideLayers('div_legend', '', 'show');
	}
	
	function HideHelpers()
	{
		MM_showHideLayers('div_po', '', 'hide');
		MM_showHideLayers('div_bookmarks', '', 'hide');
		//MM_changeProp('div_bookmarks', '', 'style.left', 0 + 'px');
		helpers_open = false;
	}
	
	function ProductRedirect(url, el)
	{
		target = document.forms[0].elements[el].options[document.forms[0].elements[el].selectedIndex].value;
		var target_arr = target.split('&'); 

		if (target_arr[0] != '' & target_arr[1] != '')
		{
			location.replace(url + '&tag=' + target_arr[1] + '&id=' + target_arr[0]);
		}
	}
	
	function movieplayer(url, len)
	{
		MM_openBrWindow('http://media.head.com/__/play.php?hash=' + url + '&length=' + len,'','resizable=yes,status=yes,scrollbars=no,width=360,height=350');
	}
	
	function grayOut(vis, options)
	{
		var options = options || {}; 
		var zindex = options.zindex || 50;
		var opacity = options.opacity || 40;
		var opaque = (opacity / 100);
		var bgcolor = options.bgcolor || '#000000';
		var dark=document.getElementById('darkenScreenObject');
		if (!dark)
		{
			var tbody = document.getElementsByTagName("body")[0];
			var tnode = document.createElement('div');
			tnode.style.position='absolute';
			tnode.style.top='0px';
			tnode.style.left='0px';
			tnode.style.overflow='hidden';
			tnode.style.display='none';
			tnode.id='darkenScreenObject';
			tbody.appendChild(tnode);
			dark=document.getElementById('darkenScreenObject');
		}
		if (vis)
		{
			hideAllByTag('embed');
			hideAllByTag('object');
			if( document.body && ( document.body.scrollWidth || document.body.scrollHeight ) )
			{
				var pageWidth = document.body.scrollWidth+'px';
				var pageHeight = document.body.scrollHeight+'px';
			}
			else if ( document.body.offsetWidth )
			{
				var pageWidth = document.body.offsetWidth+'px';
				var pageHeight = document.body.offsetHeight+'px';
			}
			else
			{
				var pageWidth='100%';
				var pageHeight='100%';
			}   
		
			dark.style.opacity=opaque;                      
			dark.style.MozOpacity=opaque;                   
			dark.style.filter='alpha(opacity='+opacity+')'; 
			dark.style.zIndex=zindex;        
			dark.style.backgroundColor=bgcolor;  
			dark.style.width= pageWidth;
			dark.style.height= pageHeight;
			dark.style.display='block';
		}
		else
		{
			dark.style.display='none';
			showAllByTag('embed');
			showAllByTag('object');
		}
	}
	
	function showAllByTag(tagName,dispType)
	{
		var elements = document.getElementsByTagName(tagName);
		var i = 0;
		if (dispType == "")
		{
			dispType = "visible";
		}
		while (i < elements.length)
		{
			if (elements[i].id != 'mediaCenter')
			{
				//elements[i].style.display = "block";
				elements[i].style.margin = "0px";
			}
			i++;
		}
	}
	function hideAllByTag(tagName)
	{
		var elements = document.getElementsByTagName(tagName);
		var i = 0;
		while (i < elements.length)
		{
			if (elements[i].id != 'mediaCenter')
			{
				//elements[i].style.display = "none";
				elements[i].style.margin = "-4000px";
			}
			i++;
		}
	}
	
	function HeaderPromotionOpen(title, language, jumpTo)
	{
		var so_promo_header = new SWFObject('../_swf/headerpromo/' + title + '/' + title + '_' + language + '.swf', "promo_header", "630", "430", "8", "#FFFFFF");
		so_promo_header.addParam("quality", "high");
		so_promo_header.addParam("wmode", "transparent");
		so_promo_header.addParam("menu", "false");
		so_promo_header.addVariable("jumpTo", jumpTo);
		so_promo_header.setAttribute("style", ";");
		so_promo_header.write("dvHeaderPromotion");

		// show promotion layer
		elem = document.getElementById('dvHeaderPromotion');
		MM_changeProp('dvHeaderPromotion', '', 'style.left', (document.body.clientWidth/2-630/2-120) + 'px');
		elem.style.display = 'block';
		
		grayOut(true);
	}
	
	function HeaderPromotionClose()
	{
		grayOut(false);
		
		// hide promotion layer
		elem = document.getElementById('dvHeaderPromotion');
		elem.style.display = 'none';
	}
	
	function VideoPlayerOpen(videoID, mode)
	{
		if (mode == 'youtube')
		{
			var so_player = new SWFObject('../_swf/videoplayer/wrap.swf?videoURL=http://www.youtube.com/v/' + videoID, "player", "360", "301", "8", "#FFFFFF");
		}
		else if (mode == 'xnx')
		{
			var so_player = new SWFObject('../_swf/videoplayer/wrap.swf?isLocal=1&videoURL=' + videoID, "player", "360", "301", "8", "#FFFFFF");
		}
		else
		{
			var so_player = new SWFObject('../_swf/videoplayer/wrap.swf?isLocal=1&videoURL=http://media.head.com/__/?' + videoID, "player", "360", "301", "8", "#FFFFFF");
		}
		so_player.addParam("quality", "high");
		so_player.addParam("wmode", "transparent");
		so_player.addParam("menu", "false");
		so_player.setAttribute("style", ";");
		so_player.write("dvVideoPlayer");
		
		
		var so_player_overlay = new SWFObject('../_swf/videoplayer/tv_geraet.swf', "player", "533", "590", "8", "#FFFFFF");
		so_player_overlay.addParam("quality", "high");
		so_player_overlay.addParam("wmode", "transparent");
		so_player_overlay.addParam("menu", "false");
		so_player_overlay.setAttribute("style", ";");
		so_player_overlay.write("dvVideoPlayerOverlay");
		
		
		
		elem = document.getElementById('dvVideoPlayer');
		//elem.innerHTML = '<a href="javascript:VideoPlayerClose();" style="color: #FF6600; font-weight: bold;">Close</a><br />\n' + elem.innerHTML;
		
		MM_changeProp('dvVideoPlayer', '', 'style.left', (document.body.clientWidth/2-360/2+5) + 'px');
		elem.style.display = 'block';
		grayOut(true);
		
		elem = document.getElementById('dvVideoPlayerOverlay');
		MM_changeProp('dvVideoPlayerOverlay', '', 'style.left', (document.body.clientWidth/2-533/2) + 'px');
		elem.style.display = 'block';
	}
	
	function VideoPlayerClose()
	{
		grayOut(false);
		elem = document.getElementById('dvVideoPlayer');
		elem.style.display = 'none';
		
		elem = document.getElementById('dvVideoPlayerOverlay');
		elem.style.display = 'none';
	}
	
	function HeaderPromotionClose()
	{
		grayOut(false);
		
		// hide promotion layer
		elem = document.getElementById('dvHeaderPromotion');
		elem.style.display = 'none';
	}
	
	function TeamResize(size)
	{
		elem = document.getElementById('div_worlds');
		if (navigator.userAgent.indexOf('Safari') != -1)
		{
			elem = elem.style;
		}
		elem.height = size + 'px';
		
		elem = document.getElementById('worlds');
		if (navigator.userAgent.indexOf('Safari') != -1)
		{
			elem = elem.style;
		}
		elem.height = size + 'px';
	}
	
	function changeStatusText(message)
	{
		window.status = message;
	}