
function showMainPlayerDefer( mediaclip, player ) {
	var popupUrl = mediaclip;
	if ( mediaclip.indexOf( "?" ) > -1 ) {
		popupUrl = mediaclip.substr( 0, mediaclip.indexOf( "?" ) );
	}
	popupUrl += "?service=VideoPopup";
	var videowindow;
	if ( player == "adv" ) {
		popupUrl += "&player=adv";
		videowindow = window.open( popupUrl, "video", "width=492,height=433,location=0,menubar=0,resizable=0,scrollbars=0,toolbar=0,status=0" );
	}
	else {
		videowindow = window.open( popupUrl, "video", "width=663,height=433,location=0,menubar=0,resizable=0,scrollbars=0,toolbar=0,status=0" );
	}
	if ( videowindow.opener ) videowindow.opener = self;
	videowindow.focus();
}


function showMainPlayer( mediaclip, player ) {
	setTimeout( "showMainPlayerDefer( '" + mediaclip + "', '" + player + "' )", 100 );
}


function showMoreVideos() {
	if ( window.opener ) {
		window.opener.location = "/videos/";
		window.opener.focus();
		window.close();
	}
	else {
		window.open( "/videos/" );
		window.close();
	}
}


function ivwLogVideo( parameters ) {
	var ivw = "<img src=\"http://welt.ivwbox.de/cgi-bin/ivw/CP/videoteaser?r=" + escape(document.referrer) + "&d=" + (Math.random()*100000) + "\" width=\"1\" height=\"1\" alt=\"\" class=\"countPixel\"/>";

	videoUrl = parameters.url;
	if ( videoUrl.indexOf( "?" ) >= 0 ) videoUrl = videoUrl.substr( 0, videoUrl.indexOf( "?" ) );
	if ( videoUrl.substr( 0, 7 ) == "http://" ) {
		videoUrl = videoUrl.substr( 7 );
		videoUrl = videoUrl.substr( videoUrl.indexOf( "/" ) );
	}
	ivw += "<img src=\"http://ivw.ullstein-online.de/ivw/CP/welt" + escape(videoUrl) + "/_x_?d=" + (Math.random()*100000) + "\" width=\"1\" height=\"1\" alt=\"\" class=\"countPixel\" id=\"localCountPixel\"/>";

	var ivwElement = document.getElementById( "ivw" );
	if ( ivwElement ) {
		ivwElement.innerHTML = ivw;
	}
}
 

