function win_open(href, width, height)
{
	if (width == '' && height == '')  
	{
		window.open(href, '_blank', 'toolbar=no,location=no,status=yes,menubar=no,personalbar=no,scrollbars=yes,resizable=yes,screenx=50,left=50,screenY=50,top=50');
	} 
	else
	{
		window.open(href, '_blank', 'toolbar=yes,location=yes,status=yes,menubar=no,personalbar=no,scrollbars=yes,width=' + width + ',height=' + height + ',resizable=yes,screenx=50,left=50,screenY=50,top=50')
	}
}


function setcookie (value)
{
  var cookiename = "wtmcid";
  var expireintagen = "3";
  var verfall = expireintagen * 1000*60*60*24;
  var jetzt = new Date();
  var auszeit = new Date(jetzt.getTime() + verfall);
  
  if (value.indexOf("g_") == 0) {
  	document.cookie = cookiename + "=" + value + "; expires="+auszeit.toGMTString()+"; path=/";
  }
}


var	WT_param = getQuery("WT.mc_id");

if (WT_param != false){
	setcookie(WT_param);
}


function getQuery(key) {
	var parameters = window.location.search;
	regexp = new RegExp("[?&]" + key + "=(.*?)(&.*)?$");
	if (parameters.match(regexp)) {
		return RegExp.$1;	
	} else {
		return false;
	}
}

function open_popup(href){
	bigwin = window.open(href, 'bigimage', 'toolbar=no,location=no,status=no,menubar=no,personalbar=no,scrollbars=no,resizable=no,screenx=50,left=50,screenY=50,top=50,width=650px,height=466px');
	bigwin.focus();
}