 
	
				
  	








 




function fehler() {
 alert("Ein Fehler ist aufgetreten.");
 return true;
}

var browser = "";
if (navigator.appName.indexOf("Opera") != -1)
{
 browser = "opera";
}
else if (navigator.appName.indexOf("Explorer") != -1)
{
 browser = "ie";
}
else if (navigator.appName.indexOf("Netscape") != -1)
{
 browser = "netscape";
}
else
{
 browser = "anderer";
}

function changebgpic(orid){
 document.getElementById(orid).style.backgroundImage='url(https://www.supersport.de/viomatrix/imgs/top_menue_bg_dark.gif)';
}
function changebgpicback(orid){
 document.getElementById(orid).style.backgroundImage='url(https://www.supersport.de/viomatrix/imgs/top_menue_bg.gif)';
}

function transparentpic(pic, styles, cssclass, cssid) {
 if ( cssclass != "" ) { cssclass=" " + cssclass; }
 if ( cssid    != "" ) { cssid=" id=\"" + cssid + "\""; }
  var filename = "https://www.supersport.de/viomatrix/imgs/" + pic;
  document.write("<div " + cssid + " style=\"");
 if(browser == "ie"){document.write("filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + filename + "', sizingMethod='scale');");}
 document.write(styles + "\"><img src" );
 document.write("=\"" + filename + "\" class=\"iepic" + cssclass + "\" style=\"" + styles + "\" alt=\"\"><\/div>");
}



var breakit=0;
var zaehler;
var lastobj;
var zeitliste="";
var maxtime="2000";
var starttime=0;
var vergangenezeit=0;
var anteilanmaxtime=0;
var sub=0;
var jetzt;

function fadein(obj,deep) {
 window.clearTimeout(zaehler);
 if(lastobj){document.getElementById(lastobj).style.display='none';}
 if(!deep)deep=0.9;
 deep2=deep*100;
 document.getElementById(obj).style.display='block';
 document.getElementById(obj).style.opacity=deep;
 document.getElementById(obj).style.filter='alpha(opacity=' + deep2 + ')';
 lastobj = obj;


}

document.onmouseup = LayerPosition;
function LayerPosition (Ereignis) {
 var xpos = 0;
 var ypos = 0;
 if (!Ereignis) Ereignis = window.event;

 if ( document.getElementById("picbigcontainer") ) {
  if ( navigator.appName.indexOf("Explorer") != -1 ) {
   xpos = Ereignis.clientX;
   ypos = Ereignis.clientY;
   if (document.documentElement && document.documentElement.scrollTop) {
    // Explorer 6 Strict
    xpos += document.documentElement.scrollLeft;
    ypos += document.documentElement.scrollTop;
   } else {
	xpos += document.body.scrollLeft;
	ypos += document.body.scrollTop;
   }
//alert( "IE "+xpos+","+ypos );
  }
  else {
   // andere Browser
   xpos = Ereignis.pageX;
   ypos = Ereignis.pageY;
  }
  if ( document.getElementById("picbigcontainer").style.display == 'none' || document.getElementById("picbigcontainer").style.display == '' ) {
   xpos = xpos - parseInt( parseInt( document.getElementById("picbigcontainer").style.width )/3.0 );    ypos = ypos - parseInt( parseInt( document.getElementById("picbigcontainer").style.height ) /3.0 ); if ( ypos < 120 ) { ypos = 120; }
         document.getElementById("picbigcontainer").style.left = xpos + "px";
   document.getElementById("picbigcontainer").style.top = ypos + "px";
  }
 }
}

function fadeout(obj) {
 jetzt = new Date();

 if(!obj){obj=lastobj;}else{lastobj=obj;}
 aktopacity=document.getElementById(obj).style.opacity;
 aktfilter=document.getElementById(obj).style.filter;

   if(!starttime)
  {
   starttime=jetzt.getTime();
   sub=0.01;
  }
 else
  {
   vergangenezeit=jetzt.getTime()-starttime;
   sub=vergangenezeit/maxtime;
   zeitliste = zeitliste + " -> " + vergangenezeit;
  }
 aktopacity=aktopacity-sub;
 if(aktopacity> 0 ) {
 aktfilter = aktopacity * 100;
 document.getElementById(obj).style.opacity=aktopacity;
 document.getElementById(obj).style.filter='alpha(opacity=' + aktfilter + ')';
 if(breakit==0){zaehler=window.setTimeout("fadeout()", 5);}
 }
 else
 {
 document.getElementById(obj).style.display='none';
 document.getElementById(obj).style.opacity='0.9';
 document.getElementById(obj).style.filter='alpha(opacity=90)';
 window.clearTimeout(zaehler);
 starttime="";
 }
}

function fadeoutstop(obj,deep) {
 breakit=1;
 if(!deep)deep=0.9;
 deep2=deep*100;
 document.getElementById(obj).style.display='block';
 document.getElementById(obj).style.opacity=deep;
 document.getElementById(obj).style.filter='alpha(opacity=' + deep2 + ')';
 window.clearTimeout(zaehler);
 starttime="";
}

var lastHintObj = null;
function showHint( obj ) {
 hideHint( lastHintObj );
 if ( obj && document.getElementById(obj) ) {
  fadein(obj);
  // document.getElementById(obj).style.display='block';
  lastHintObj = obj;
 } 
}
function hideHint( obj ) {
 if ( obj && document.getElementById(obj) ) {
  fadeout(obj);
  // document.getElementById(obj).style.display='none';
  lastHintObj = null;
 }
}
function createPassword() {
  document.getElementById( "cn_b2bpassword" ).value='1563NU7062T';
}
 
	
				
  	








 




var topicShownArticle = -1;

var maxBoxHeight = 30; var fadeOutTimeMS = 100;

function fadeOutArticle( articleid ) {
		var detaildiv_name	= "articledetails"+articleid;
	var arrowbutton_name	= "arrow"+articleid;
	var detaildiv		= document.getElementById( detaildiv_name );
	var arrowbutton		= document.getElementById( arrowbutton_name );
		if ( detaildiv && arrowbutton )
	{
				var boxHeight = maxBoxHeight;
		if ( detaildiv.style.height != "auto" ) { boxHeight = parseInt( detaildiv.style.height ); }
		if ( boxHeight < 0 ) { boxHeight = 0; }
		var boxOpacity = parseFloat( detaildiv.style.opacity ); if ( boxOpacity < 0 ) { boxOpacity = 0; }

		var step = parseInt( boxHeight/3 ); if ( step < 10 ) { step = 10; }
		var stepOpacity = boxOpacity/3.0;
		if ( boxHeight > step ) {
						boxHeight -= step; detaildiv.style.height = boxHeight+"px"; detaildiv.style.minHeight = "0px";
			boxOpacity -= stepOpacity; detaildiv.style.opacity = boxOpacity;
						window.setTimeout( "fadeOutArticle( "+articleid+")", fadeOutTimeMS );
		} else {
						detaildiv.style.height = "0px";
			detaildiv.style.display = "none";
			detaildiv.style.opacity = 0;
						arrowbutton.style.backgroundImage = "url(/viomatrix/imgs//20090826_al_arrow_closed.gif)";
		}
	}
	return false;
	
}

function fadeInArticle( articleid ) {
		var detaildiv_name	= "articledetails"+articleid;
	var arrowbutton_name	= "arrow"+articleid;
	var detaildiv		= document.getElementById( detaildiv_name );
	var arrowbutton		= document.getElementById( arrowbutton_name );
		if ( detaildiv && arrowbutton )
	{
				detaildiv.style.display = "block";
				arrowbutton.style.backgroundImage = "url(/viomatrix/imgs//20090826_al_arrow_open.gif)";
				var boxHeight = parseInt( detaildiv.style.height ); if ( isNaN(boxHeight) ) { boxHeight = 0; }
		var boxOpacity = parseFloat( detaildiv.style.opacity ); if ( boxOpacity < 0 ) { boxOpacity = 0; }

		var step = parseInt( boxHeight/3 ); if ( step < 10 ) { step = 10; }
		var stepOpacity = boxOpacity/3.0; if ( stepOpacity <= 0 ) { stepOpacity = 0.1; }


		if ( boxHeight < maxBoxHeight-step ) {
						boxHeight += step; detaildiv.style.height = boxHeight+"px"; detaildiv.style.minHeight = "0px";
			boxOpacity += stepOpacity; detaildiv.style.opacity = boxOpacity;
						window.setTimeout( "fadeInArticle( "+articleid+")", fadeOutTimeMS );
		} else {
						detaildiv.style.height = "auto";
			detaildiv.style.minHeight = maxBoxHeight+"px";
			detaildiv.style.opacity = 1;
		}
	}
	return false;
	
}



function showArticle( articleid ) {
		var detaildiv_name	= "articledetails"+articleid;
	var arrowbutton_name	= "arrow"+articleid;
	var detaildiv		= document.getElementById( detaildiv_name );
	var arrowbutton		= document.getElementById( arrowbutton_name );
		if ( detaildiv && arrowbutton )
	{
				if ( topicShownArticle > 0 ) { fadeOutArticle( topicShownArticle ); }
				if ( topicShownArticle != articleid || detaildiv.style.display == "none" ) {
						topicShownArticle = articleid;
						detaildiv.style.height = "40px";
			detaildiv.style.opacity = 1;
			detaildiv.style.display = "block";
			fadeInArticle( topicShownArticle );
												sajax_callback_func = "gapi.plusone.go()";
			sajax_content( 'loadarticledetail', detaildiv_name, articleid, 'de' );
					}
		return true;
	}
	return false;
}

function showFAQ( faqid ) {
		var detaildiv_name	= "articledetails"+faqid;
	var arrowbutton_name	= "arrow"+faqid;
	var detaildiv		= document.getElementById( detaildiv_name );
	var arrowbutton		= document.getElementById( arrowbutton_name );
		if ( detaildiv && arrowbutton )
	{
				if ( topicShownArticle > 0 ) { fadeOutArticle( topicShownArticle ); }
				if ( topicShownArticle != faqid || detaildiv.style.display == "none" ) {
						topicShownArticle = faqid;
						fadeInArticle( topicShownArticle );
		}
		return true;
	}
	return false;
}


var topicShownFARow = null;

function handlePopupDiv( divid ) {
	var detaildiv		= document.getElementById( divid );
	var arrowbutton		= document.getElementById( divid+"link" );
		if ( detaildiv && arrowbutton )
	{
				var olddetaildiv		= document.getElementById( topicShownFARow );
		var oldarrowbutton		= document.getElementById( topicShownFARow+"link" );
		if ( olddetaildiv && oldarrowbutton && olddetaildiv != detaildiv ) {
			olddetaildiv.style.height = "0px";
			olddetaildiv.style.display = "none";
						oldarrowbutton.style.backgroundImage = "url(/viomatrix/imgs//20090902_arrow_fa_closed.gif)";
		}
				detaildiv.style.height = "auto";
		detaildiv.style.display = "block";
				arrowbutton.style.backgroundImage = "url(/viomatrix/imgs//20090902_arrow_fa_opend.gif)";
				topicShownFARow = divid;
	}
}

function activateEndrohrAuswahl( articleid, modus ) {
	var endrohrslider	= document.getElementById( "endrohrslider"+articleid );
	var endrohrspecial	= document.getElementById( "endrohrspecial"+articleid );
	var endrohruniversal	= document.getElementById( "endrohruniversal"+articleid );
	var endrohrSPZ		= document.getElementById( "endrohrwahlSPZ"+articleid );
	var endrohrALL		= document.getElementById( "endrohrwahlALL"+articleid );
	if ( endrohrslider && endrohrspecial && endrohruniversal && endrohrSPZ && endrohrALL )
	{
				if ( modus == 0 ) { endrohruniversal.style.display = 'none'; }
		if ( modus == 1 ) { endrohruniversal.style.display = 'block'; }
				var anzahl = endrohrspecial.getElementsByTagName( "div" ).length;
		if ( modus == 1 ) { anzahl += endrohruniversal.getElementsByTagName( "div" ).length; }
		var breite = anzahl * 126;
				endrohrslider.style.width = breite+"px";
				endrohrSPZ.style.textDecoration = 'none';
		endrohrALL.style.textDecoration = 'none';
		if ( modus == 0 ) { endrohrSPZ.style.textDecoration = 'underline'; }
		if ( modus == 1 ) { endrohrALL.style.textDecoration = 'underline'; }
	}	
	return false;
}

function checkBrowserName(name){  
	var agent = navigator.userAgent.toLowerCase();  
	if (agent.indexOf(name.toLowerCase())>-1) {  
		return true;  
	}  
	return false;  
} 
function productAlert( articleid, modus ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_oy	= document.getElementById( "articledetail_sajax_overlay"+articleid );
	
	if ( questionform && questionform_oy )
	{
		if ( self.innerHeight ) 		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		else if ( document.documentElement && document.documentElement.clientHeight ) 		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		else 
		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		if ( modus == 0 ) { 
			questionform_oy.style.display = 'none'; 
			questionform.style.display = 'none'; 
			questionform.innerHTML = ""; 
			last_sajaxdetails = ""
		}
		if ( modus == 1 ) { 
			questionform_oy.style.display = 'block'; 
			questionform.style.display = 'block';
						sajax_content( 'articledetail_alert', 'articledetail_question'+articleid, 'articleid='+articleid, 'de' ); 
		}
	}
	return false;
}
function submitProductAlert( articleid ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_form	= document.getElementById( "questionform"+articleid );
	if ( questionform && questionform_form )
	{
		var parameter = '';
		parameter += "articleid=" + articleid;
		parameter += "&cn_avail_email=" + document.getElementById( "cn_avail_email" ).value;
		parameter += "&cn_avail_artid=" + document.getElementById( "cn_avail_artid" ).value;
		if ( document.getElementById( "cn_avail_emaildo" ).checked == true ) {
			parameter += "&cn_avail_emaildo=1";
		} else {
			parameter += "&cn_avail_emaildo=0";
		}
		parameter += "&cn_fhid="; if ( document.getElementById( "hidden_fhid" ) ) { parameter += encodeURIComponent(document.getElementById( "hidden_fhid" ).innerHTML); } else { parameter += ""; }
		parameter += "&cn_ftid="; if ( document.getElementById( "hidden_ftid" ) ) { parameter += encodeURIComponent(document.getElementById( "hidden_ftid" ).innerHTML); } else { parameter += ""; }
		parameter += "&cn_faid="; if ( document.getElementById( "hidden_faid" ) ) { parameter += encodeURIComponent(document.getElementById( "hidden_faid" ).innerHTML); } else { parameter += ""; }
		parameter += "&cn_fa1="; if ( document.getElementById( "hidden_fa1" ) ) { parameter += encodeURIComponent(document.getElementById( "hidden_fa1" ).innerHTML); } else { parameter += ""; }
		parameter += "&cn_fa2="; if ( document.getElementById( "hidden_fa2" ) ) { parameter += encodeURIComponent(document.getElementById( "hidden_fa2" ).innerHTML); } else { parameter += ""; }
				sajax_content( 'articledetail_alert', 'articledetail_question'+articleid, parameter, 'de' );
	}
	return true;
}


function auspuffsound( soundid, articleid, modus ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_oy	= document.getElementById( "articledetail_sajax_overlay"+articleid );

	if ( questionform && questionform_oy )
	{
		if ( self.innerHeight ) 		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		else if ( document.documentElement && document.documentElement.clientHeight ) 		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		else 
		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		if ( modus == 0 ) { 
			questionform_oy.style.display = 'none'; 
			questionform.style.display = 'none'; 
			questionform.innerHTML = ""; 
			last_sajaxdetails = ""
		}
		if ( modus == 1 ) { 
			questionform_oy.style.display = 'block'; 
			questionform.style.display = 'block'; 
						sajax_content( 'articledetail_sound', 'articledetail_question'+articleid, 'articleid='+articleid+'&soundid='+soundid, 'de' );
		}
	}
	return false;
}


function buyDocument( docid, articleid, modus ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_oy	= document.getElementById( "articledetail_sajax_overlay"+articleid );

	if ( questionform && questionform_oy )
	{
		if ( self.innerHeight ) 		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		else if ( document.documentElement && document.documentElement.clientHeight ) 		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		else 
		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		if ( modus == 0 ) { 
			questionform_oy.style.display = 'none'; 
			questionform.style.display = 'none'; 
			questionform.innerHTML = ""; 
			last_sajaxdetails = ""
		}
		if ( modus == 1 ) { 
			questionform_oy.style.display = 'block'; 
			questionform.style.display = 'block'; 
			questionform.style.width = '689px'; 
						sajax_content( 'buyDocument', 'articledetail_question'+articleid, 'articleid='+articleid+'&docid='+docid, 'de' );
		}
	}
	return false;
}

function buyDocument_step2back( docid, articleid ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_oy	= document.getElementById( "articledetail_sajax_overlay"+articleid );
	if ( questionform && questionform_oy )
	{
		var parameter = '';
		parameter += "articleid=" + articleid;
		parameter += "&docid=" + docid;
		parameter += "&cn_email=" + document.docstep2.cn_email.value;
		parameter += "&cn_email2=" + document.docstep2.cn_email2.value;
		parameter += "&cn_zwid=" + document.docstep2.cn_zwid.value;
		
				sajax_content( 'buyDocument', 'articledetail_question'+articleid, parameter, 'de' );
	}
	return true;
}

function buyDocument_step2( docid, articleid ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_oy	= document.getElementById( "articledetail_sajax_overlay"+articleid );
	if ( questionform && questionform_oy )
	{
		var parameter = '';
		parameter += "articleid=" + articleid;
		parameter += "&docid=" + docid;
		parameter += "&cn_email=" + document.docstep1.email.value;
		parameter += "&cn_email2=" + document.docstep1.email2.value;
		if( document.docstep1.cn_zwid.length == undefined ) {
			parameter += "&cn_zwid=" + document.docstep1.cn_zwid.value;
		} else {
			for  ( i=0; i<document.docstep1.cn_zwid.length; i++ )
			{
				if ( document.docstep1.cn_zwid[i].checked )
				{
					parameter += "&cn_zwid=" + document.docstep1.cn_zwid[i].value;	
				}
			}  
		}
				parameter += "&docbuy_step=2";
		parameter += "&docbuy_wkid=" + document.docstep1.docbuy_wkid.value;
		
				sajax_content( 'buyDocument', 'articledetail_question'+articleid, parameter, 'de' );

	}
	return true;
}

function buyDocument_step3( docid, articleid ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_oy	= document.getElementById( "articledetail_sajax_overlay"+articleid );
	if ( questionform && questionform_oy )
	{
		var parameter = '';
		parameter += "articleid=" + articleid;
		parameter += "&docid=" + docid;
		parameter += "&cn_email=" + document.docstep2.cn_email.value;
		parameter += "&cn_email2=" + document.docstep2.cn_email2.value;
		parameter += "&cn_zwid=" + document.docstep2.cn_zwid.value;
		if ( document.docstep2.cn_agb.checked )
		{
			parameter += "&cn_agb=1";	
		} else {
			parameter += "&cn_agb=0";
		}
		if ( document.docstep2.cn_wider.checked )
		{
			parameter += "&cn_wider=1";	
		} else {
			parameter += "&cn_wider=0";
		}
		parameter += "&docbuy_wkid=" + document.docstep2.docbuy_wkid.value;
				parameter += "&docbuy_step=3";
		
				sajax_content( 'buyDocument', 'articledetail_question'+articleid, parameter, 'de' );
	}
	return true;
}

function buyDocument_step4( docid, articleid ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_oy	= document.getElementById( "articledetail_sajax_overlay"+articleid );
	if ( questionform && questionform_oy )
	{
		var parameter = '';
		parameter += "articleid=" + articleid;
		parameter += "&docid=" + docid;
		parameter += "&cn_email=" + document.docstep3.cn_email.value;
		parameter += "&cn_email2=" + document.docstep3.cn_email2.value;
		parameter += "&cn_zwid=" + document.docstep3.cn_zwid.value;
		parameter += "&cn_agb=" + document.docstep3.cn_agb.value;
		parameter += "&cn_wider=" + document.docstep3.cn_wider.value;
		parameter += "&docbuy_wkid=" + document.docstep3.docbuy_wkid.value;
				parameter += "&docbuy_step=4";
		
				sajax_content( 'buyDocument', 'articledetail_question'+articleid, parameter, 'de' );
	}
	return true;
}


function productQuestion( articleid, modus ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_oy	= document.getElementById( "articledetail_sajax_overlay"+articleid );
	
	if ( questionform && questionform_oy )
	{
		if ( self.innerHeight ) 		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		else if ( document.documentElement && document.documentElement.clientHeight ) 		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		else 
		{
			questionform_oy.style.height = document.body.clientHeight+"px";
		}
		if ( modus == 0 ) { 
			questionform_oy.style.display = 'none'; 
			questionform.style.display = 'none'; 
			questionform.innerHTML = ""; 
			last_sajaxdetails = ""
		}
		if ( modus == 1 ) { 
			questionform_oy.style.display = 'block'; 
			questionform.style.display = 'block';
			sajax_content( 'loadarticledetail_question', 'articledetail_question'+articleid, articleid, 'de' );
					}
	}
	return false;
}
function submitProductQuestion( articleid ) {
	var questionform	= document.getElementById( "articledetail_question"+articleid );
	var questionform_form	= document.getElementById( "questionform"+articleid );
	if ( questionform && questionform_form )
	{
		var parameter = '';
		parameter += "doinsert=" + document.getElementById( "doinsert" ).value;
		parameter += "&artid=" + articleid;
		parameter += "&vname=" + document.getElementById( "vname" ).value;
		parameter += "&nname=" + document.getElementById( "nname" ).value;
		parameter += "&str=" + document.getElementById( "str" ).value;
		parameter += "&plz=" + document.getElementById( "plz" ).value;
		parameter += "&ort=" + document.getElementById( "ort" ).value;
		parameter += "&tel=" + document.getElementById( "tel" ).value;
		parameter += "&handy=" + document.getElementById( "handy" ).value;
		parameter += "&email=" + document.getElementById( "email" ).value;
		parameter += "&betreff=" + document.getElementById( "betreff" ).value;
		parameter += "&msg=" + document.getElementById( "msg" ).value;
		if ( document.getElementById( "cn_agb" ).checked == true ) {
			parameter += "&cn_agb=" + document.getElementById( "cn_agb" ).value;
		} else {
			parameter += "&cn_agb=0";
		}
		parameter += "&email_test=" + document.getElementById( "email_test" ).value;
		
		sajax_content( 'submitarticledetail_question', 'articledetail_question'+articleid, parameter, 'de' );
			}
	return true;
}


function swapImage(newimg, origimg) {
	document.getElementById('articleBigPic').src = '/viomatrix/imgs/itempic/'+newimg;
	document.getElementById('maximizePic').onclick = function() { fadein('picbigcontainer','1'); sajax_content('loadbigpic', 'picbigcontainer', origimg,'de'); };
}

var timer1;
var widht = 0;

function start(){
	var frameobj = document.getElementById( "teaserframe" );
			width  = frameobj.offsetWidth;
	tleft = frameobj.style.width;
}

function unscroll() {
	clearTimeout( timer1 );
	cmd = "scroll()";
	timer1 = window.setTimeout( cmd, 30 );
}

function scroll( ) {
	clearTimeout( timer1 );
	var obj = document.getElementById( 'teaser' );
					var twidth = obj.offsetWidth;
	tleft -= 2;
	if ( tleft < -twidth ) { tleft = width  ; }
	obj.style.left = tleft + "px";
	cmd = "scroll()";
	timer1 = window.setTimeout( cmd, 30 );
}

function closeOverlay()
{
    if ( document.getElementById('overlaybox') )
    {
        var overlaybox = document.getElementById('overlaybox');
                
        overlaybox.style.display = "none";
                                            }
}






var sajax_debug_mode = false;
var sajax_request_type = "POST";
var sajax_target_id = "";
var sajax_callback_func = ""; // FJ, 13.05.2011
var sajax_target_var = "";    // FJ, 11.06.2011
var sajax_failure_redirect = "";
		
function sajax_debug(text) {
 if (sajax_debug_mode)
 alert(text);
}

function sajax_init_object() {
 sajax_debug("sajax_init_object() called..")
 var A;
 var msxmlhttp = new Array('Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP');
 for (var i = 0; i < msxmlhttp.length; i++) {
  try {
   A = new ActiveXObject(msxmlhttp[i]);
  } catch (e) {
   A = null;
  }
 }
 if(!A && typeof XMLHttpRequest != "undefined")
  A = new XMLHttpRequest();
 if (!A)
  sajax_debug("Could not create connection object.");
 return A;
}
		
var sajax_requests = new Array();
	
function sajax_cancel() {
 for (var i = 0; i < sajax_requests.length; i++) 
  sajax_requests[i].abort();
}

function sajax_do_call(func_name, args) {
 var i, x, n;
 var uri;
 var post_data;
 var target_id;
 var returns;
 sajax_debug("in sajax_do_call().." + sajax_request_type + "/" + sajax_target_id);
 target_id = sajax_target_id;
 
            // FJ, 13.05.2011
            // sajax_callback_func wieder loeschen, damit beim naechsten Sajax-Aufruf die
            // Callback-Funktion nicht erneut ausgefuehrt wird
            var callback_func;
            callback_func = sajax_callback_func;
            sajax_callback_func = "";

            // FJ, 11.06.2011
            // optionale Angabe einer Zielvariablen fuer den Inhalt
            var target_var;
            target_var = sajax_target_var;
            sajax_target_var = "";
            
 if (typeof(sajax_request_type) == "undefined" || sajax_request_type == "") 
  sajax_request_type = "GET";
 uri = "/cgi-bin/vm/vio.matrix";
 
 
  post_data = "rs=" + escape(func_name);
  post_data += "&rst=" + escape(sajax_target_id);
  post_data += "&rsrnd=" + new Date().getTime();
  
  post_data += "&or=1";
  post_data += "&typ=SAJAX%23sajax_response";
  for (i = 0; i < args.length-1; i++) 
   post_data = post_data + "&rsarg"+i+"=" + escape(args[i]);
 

 x = sajax_init_object();

 if (x == null) {
  if (sajax_failure_redirect != "") {
   location.href = sajax_failure_redirect;
   return false;
  } else {
   sajax_debug("NULL sajax object for user agent:\n" + navigator.userAgent);
   return false;
  }
 } else {
  x.open(sajax_request_type, uri, true);
  sajax_requests[sajax_requests.length] = x;
				
  
   x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");
   x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  

  x.onreadystatechange = function() {
   if (x.readyState != 4) 
    return;

   sajax_debug("received " + x.responseText);

   var status;
   var data;
   var data_pic;
   var txt = x.responseText.replace(/^\s*|\s*$/g,"");
   status = txt.charAt(0);
   data = txt.substring(2);
      var daten = data;
   daten = daten.split("|");
   if(daten.length>1)
    {
            target_id = daten[0].replace(/\"/g, "");
            data = daten[1];
            data_pic = daten[2];
    }

   if (status == "") {
       } else if (status == "-") 
    alert("Error: " + data);
   else {
    // FJ, 11.06.2011
    // optionale Rueckgabe des Inhaltes in einer JS-Variablen
    if (target_var != "")
    {
    	eval(target_var + " = " + data);
    }
    if(data_pic && data_pic != "\"") {
	data_pic=data_pic.replace(/\"/,"");
	data2 = "<img sr";
	data2 += "c=\"http://www.supersport.de/viomatrix/imgs/" + data_pic + "\" alt=\"\" class=\"hinticon\" />" + data + "<div class=\"antifloat\">&nbsp;</div>";
	data = data2;
    }
    if (target_id != "") {
		var parentElement = document.getElementById(target_id);
	parentElement.innerHTML="";
	var wrappingDiv = document.createElement('div');
	wrappingDiv.innerHTML = data;
	parentElement.appendChild(wrappingDiv);
    }
    /*else {
     try {
      var callback;
      var extra_data = false;
      if (typeof args[args.length-1] == "object") {
       callback = args[args.length-1].callback;
       extra_data = args[args.length-1].extra_data;
      } else {
       callback = args[args.length-1];
      }
      callback(eval(data), extra_data);
     } catch (e) {
      sajax_debug("Caught error " + e + ": Could not eval " + data );
     }
     }
     */
     // FJ, 13.05.2011
     // Callback-Funktion aufrufen, wenn bei der Initialisierung
     // eine Callback-Funktion angegeben wurde
     try
     {
     		if ( callback_func.length > 0 )
           {
           	eval(callback_func);
           }
      }
      catch (e)
      {
      	sajax_debug("Caught error " + e + ": Could not eval " + callback_func );
      }
   }
  }
 }
			
 sajax_debug(func_name + " uri = " + uri + "/post = " + post_data);
 x.send(post_data);
 sajax_debug(func_name + " waiting..");
 delete x;
 return true;
}

var sajax_aufrufe = new Array();

function x_sajax_content() {
 sajax_do_call( "sajax_content", arguments );
}

function sajax_content(sajax_func,sajax_obj,getid,lang,feld,sajax_aufrufe_entry,callfunction) {
 var searchstring = getid;
 searchstring += "*SJX-SPLT*" + sajax_func;
 searchstring += "*SJX-SPLT*" + sajax_obj;
 searchstring += "*SJX-SPLT*" + lang;
 if( feld )
 {
	searchstring += "*SJX-SPLT*" + feld;
 }
 else
 {
	searchstring += "*SJX-SPLT*" + "";
 }
 if( sajax_aufrufe_entry > 0 )
 {
	searchstring += "*SJX-SPLT*" + sajax_aufrufe_entry;
	sajax_aufrufe[sajax_aufrufe.length] = sajax_aufrufe_entry;
 }
 
  if ( searchstring != "" ) {
   x_sajax_content( "sajax_content", searchstring, sajax_contentresponse );
  }
 
  if(callfunction)
 {
	sajax_callfunction(callfunction, sajax_obj, sajax_aufrufe_entry, getid);
 }
}

function sajax_contentresponse( data ) {
 document.getElementById(sajax_obj).innerHTML = data; 
}

function sajax_callfunction(callfunction, sajax_obj, sajax_aufrufe_entry, getid) {
	var sajax_callfunction_obj = document.getElementById(sajax_obj);
	var sajax_getfunction_ok = 0;
	if(sajax_callfunction_obj)
	{
		var value = "";
		if(sajax_callfunction_obj.innerHTML)
		{
						value = sajax_stripHTML(sajax_callfunction_obj.innerHTML);
		}
		if(sajax_callfunction_obj.value)
		{
						value = sajax_callfunction_obj.value;
		}
				if(value)
		{
						var values = value.split(";");

						if(values[0] == sajax_aufrufe_entry)
			{
								sajax_getfunction(callfunction, values[1], getid);
								sajax_getfunction_ok = 1;
			}
		}
	}
		if(sajax_getfunction_ok == 0 )
	{
		window.setTimeout("sajax_callfunction('" + callfunction + "','" + sajax_obj + "','" + sajax_aufrufe_entry + "','" + getid + "')", 500);
	}
}

function sajax_stripHTML(str){ return str.replace(/<[^>]*>/g, "");}  

function sajax_getfunction(n, p, p2) {if(typeof window[n] == "function"){window[n](p, p2);}}


var lastsearchstring = "";

function sajax_quickorder(sajax_obj,getid,lang,feld) {
     var searchstring = "row=" + sajax_obj;
 searchstring += "&anr=" + document.getElementById("anr_"+sajax_obj).value;
 searchstring += "&esd=" + document.getElementById("esd_"+sajax_obj).value;
 searchstring += "&menge=" + document.getElementById("menge_"+sajax_obj).value;
 if(feld)searchstring += "," + feld;
 if ( document.getElementById("anr_"+sajax_obj).value != "" && searchstring != lastsearchstring ) {
  lastsearchstring = searchstring;
  document.getElementById("desc_"+sajax_obj).value = "";
  document.getElementById("price_"+sajax_obj).value = "";
    sajax_callback_func = "initquickorderrow2( "+sajax_obj+" )";
  sajax_content( 'getdata_quickorder', 'quickorder_content', searchstring, 'de' );
 }
}
function initquickorderrow( row, artid, artcode, secartid, esdcode, desciption, menge, price, special ) {
 document.getElementById( "productid_"+row ).value = artid;
 document.getElementById( "anr_"+row ).value = artcode;
 document.getElementById( "secid_"+row ).value = secartid;
 document.getElementById( "esd_"+row ).value = esdcode;
 document.getElementById( "desc_"+row ).value = desciption;
 document.getElementById( "menge_"+row ).value = menge;
 document.getElementById( "price_"+row ).value = price;
 if ( special == "NEEDESD" ) {
  document.getElementById( "esd_"+row ).setAttribute( "style", "display: inline; width: 75px; max-width: 75px;" );
  document.getElementById( "anr_"+row ).setAttribute( "style", "width: 84px;" );
  document.getElementById( "esd_"+row ).style.cssText = "display: inline; width: 75px; max-width: 75px;";
  document.getElementById( "anr_"+row ).style.cssText = "width: 84px;";
  document.getElementById( "esd_"+row ).focus();
 } else {
  document.getElementById( "esd_"+row ).setAttribute( "style", "display: none;" );
  document.getElementById( "anr_"+row ).setAttribute( "style", "width: 164px;" );
  document.getElementById( "esd_"+row ).style.cssText = "display: none;";
  document.getElementById( "anr_"+row ).style.cssText = "width: 164px;";
  document.getElementById( "esd_"+row ).value = "";
  document.getElementById( "secid_"+row ).value = "";
 }
}
function initquickorderrow2( row ) {

 var artid = document.getElementById( "tmp_quickorderrow"+row+"_aid" ).value;
 var artcode = document.getElementById( "tmp_quickorderrow"+row+"_anr" ).value;
 var secartid = document.getElementById( "tmp_quickorderrow"+row+"_esdid" ).value;
 var esdcode = document.getElementById( "tmp_quickorderrow"+row+"_esd" ).value;
 var desciption = document.getElementById( "tmp_quickorderrow"+row+"_desc" ).value;
 var menge = document.getElementById( "tmp_quickorderrow"+row+"_menge" ).value;
 var price = document.getElementById( "tmp_quickorderrow"+row+"_pric" ).value;
 var special = document.getElementById( "tmp_quickorderrow"+row+"_special" ).value;
 
 document.getElementById( "productid_"+row ).value = artid;
 document.getElementById( "anr_"+row ).value = artcode;
 document.getElementById( "secid_"+row ).value = secartid;
 document.getElementById( "esd_"+row ).value = esdcode;
 document.getElementById( "desc_"+row ).value = desciption;
 document.getElementById( "menge_"+row ).value = menge;
 document.getElementById( "price_"+row ).value = price;
 if ( special == "NEEDESD" ) {
  document.getElementById( "esd_"+row ).setAttribute( "style", "display: inline; width: 75px; max-width: 75px;" );
  document.getElementById( "anr_"+row ).setAttribute( "style", "width: 84px;" );
  document.getElementById( "esd_"+row ).style.cssText = "display: inline; width: 75px; max-width: 75px;";
  document.getElementById( "anr_"+row ).style.cssText = "width: 84px;";
  document.getElementById( "esd_"+row ).focus();
 } else {
  document.getElementById( "esd_"+row ).setAttribute( "style", "display: none;" );
  document.getElementById( "anr_"+row ).setAttribute( "style", "width: 164px;" );
  document.getElementById( "esd_"+row ).style.cssText = "display: none;";
  document.getElementById( "anr_"+row ).style.cssText = "width: 164px;";
  document.getElementById( "esd_"+row ).value = "";
  document.getElementById( "secid_"+row ).value = "";
 }
}




