function show_flash(widht,height,src,cyt,trans)
{
if (window.ActiveXObject)
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+widht+'" height="'+height+'" id="'+src+'">');
document.write('<param name="allowScriptAccess" value="always" />');
document.write('<param name="movie" value="'+src+'" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="wmode" value="'+trans+'">');
document.write('<param name="bgcolor" value="" />');
document.write('<PARAM NAME=FlashVars VALUE="'+cyt+'">');
document.write('<embed src="'+src+'" quality="high" FlashVars="'+cyt+'" bgcolor="" width="'+widht+'" height="'+height+'" name="'+src+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" wmode="'+trans+'" />');
document.write('</EMBED>');
document.write('</object>');
}
else
{
document.write('<object id="'+src+'" data="'+src+'" type="application/x-shockwave-flash" width="'+widht+'" height="'+height+'">');
document.write('<param name="allowScriptAccess" value="always" />');
document.write('<param name="movie" value="'+src+'" />');
document.write('<param name="quality" value="high" />');
// document.write('<param name="wmode" value="'+trans+'">');
document.write('<param name="bgcolor" value="" />');
document.write('<PARAM NAME=FlashVars VALUE="'+cyt+'">');
document.write('<embed src="'+src+'" quality="high" FlashVars="'+cyt+'" bgcolor="" width="'+widht+'" height="'+height+'" name="'+src+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />');
document.write('</EMBED>');
document.write('</object>');
}
}

function bild1() {
if(document.getElementById)
document.getElementById("bild1").style.display = "block";
document.getElementById("bild2").style.display = "none";
document.getElementById("bild3").style.display = "none";
document.getElementById("bild4").style.display = "none";
document.getElementById("bild5").style.display = "none";
document.getElementById("bild6").style.display = "none";
}

function bild2() {
if(document.getElementById)
document.getElementById("bild1").style.display = "none";
document.getElementById("bild2").style.display = "block";
document.getElementById("bild3").style.display = "none";
document.getElementById("bild4").style.display = "none";
document.getElementById("bild5").style.display = "none";
document.getElementById("bild6").style.display = "none";
}

function bild3() {
if(document.getElementById)
document.getElementById("bild1").style.display = "none";
document.getElementById("bild2").style.display = "none";
document.getElementById("bild3").style.display = "block";
document.getElementById("bild4").style.display = "none";
document.getElementById("bild5").style.display = "none";
document.getElementById("bild6").style.display = "none";
}

function bild4() {
if(document.getElementById)
document.getElementById("bild1").style.display = "none";
document.getElementById("bild2").style.display = "none";
document.getElementById("bild3").style.display = "none";
document.getElementById("bild4").style.display = "block";
document.getElementById("bild5").style.display = "none";
document.getElementById("bild6").style.display = "none";
}

function bild5() {
if(document.getElementById)
document.getElementById("bild1").style.display = "none";
document.getElementById("bild2").style.display = "none";
document.getElementById("bild3").style.display = "none";
document.getElementById("bild4").style.display = "none";
document.getElementById("bild5").style.display = "block";
document.getElementById("bild6").style.display = "none";
}

function bild6() {
if(document.getElementById)
document.getElementById("bild1").style.display = "none";
document.getElementById("bild2").style.display = "none";
document.getElementById("bild3").style.display = "none";
document.getElementById("bild4").style.display = "none";
document.getElementById("bild5").style.display = "none";
document.getElementById("bild6").style.display = "block";
}
 function CreateBookmarkLink() {
  title = "Mik-Funshopping"; 
  url = "http://www.mikfunshopping.de"; 
  if (window.sidebar) { // Mozilla Firefox Bookmark	
  window.sidebar.addPanel(title, url,"");
  } else if( window.external ) { // IE Favorite
  window.external.AddFavorite( url, title);
  }	else { 
      alert("Diese Funktion wird leider von ihrem Browser nicht unterstützt");}
  }
  //Bonus start
var submitter = null;
function submitFunction() {
   submitter = 1;
   }
//Bonus ende
$(document).ready(function(){
    var options = {
		target: '#ajax_putin',
		url:$('#filter').attr('action'),
		data:{ajax:'1'},
        beforeSubmit:  function(){$('#ajax_putin').html('<div id="ajax_loading"><img src="images/loading.gif" /></div>');},  // pre-submit callback 
        success:       function(){do_ship_link();}   // post-submit callback 
    }; 	
	 $('#filter').ajaxForm(options); 
$('select[name=filter_id]').bind('change',function(){ /*$('#filter').ajaxSubmit(options);*/this.form.submit();});
$('select[name^=filters]').bind('change',function(){ /*$('#filter').ajaxSubmit(options);*/this.form.submit();});
$('select[name=size_drop]').bind('change',function(){ /*$('#filter').ajaxSubmit(options);*/this.form.submit();});
do_ship_link();
do_ajax_page();
do_tooltip();
});

function do_ship_link(){
$(".ship_link").bind('click',function(){									   
 window.open($(this).attr('href'),'popup','toolbar=0, scrollbars=yes, resizable=yes, height=720, width=750');
return false;});
//ajax pagelinks moved to function do_ajax_page()
	/*$(".pageResults").bind('click',function(){
	// get the data for the html;
	var checked_basename = $(this).attr('href');
	$.ajax({url:checked_basename,data:{ajax:1},type:'get',success:function(data){$('#ajax_putin').html(data);do_ship_link();},beforeSend:function(){$('#ajax_putin').html('<div id="ajax_loading"><img src="images/loading.gif" /></div>');}});										
return false;});*/
	}
	
function do_ajax_page(){
	if($('.pageResults').length > 0){
		            $.address.init(function(event) {
			    $('.pageResults').address(function(){
												   checked_link_var = $(this).attr('href').replace(/^#/, '').replace(location.protocol+'//'+location.host+location.pathname.replace('.html',''),'').replace(/^\?/, '');
												   return checked_link_var;  
												   });
            }).change(function(event) {
                if (event.value != '/' && event.value.search(/\/:/) == -1) {
                   	$.ajax({url:location.protocol+'//'+location.host+location.pathname+event.value.replace(/^\//,'?'),data:{ajax:1},type:'GET',dataType:'html',success:function(data){$('#ajax_putin').html(data);do_ship_link();do_tooltip();},beforeSend:function(){$('#ajax_putin').html('<div id="ajax_loading"><img src="images/loading.gif" /></div>');}});
				   
                }else if(event.value.search(/\/:/) != -1){
				$.ajax({url:location.protocol+'//'+location.host+location.pathname.replace('.html','')+event.value.replace(/^\//,''),data:{ajax:1},type:'GET',dataType:'html',success:function(data){$('#ajax_putin').html(data);do_ship_link();do_tooltip();},beforeSend:function(){$('#ajax_putin').html('<div id="ajax_loading"><img src="images/loading.gif" /></div>');}});
				}else if(event.value == '/' && typeof(mod_inited)!='undefined'){
				//case for nolink during history back
				$.ajax({url:location.protocol+'//'+location.host+location.pathname,data:{ajax:1},type:'GET',dataType:'html',success:function(data){$('#ajax_putin').html(data);do_ship_link();do_tooltip();},beforeSend:function(){$('#ajax_putin').html('<div id="ajax_loading"><img src="images/loading.gif" /></div>');}});
				}
			mod_inited = '1';	
            });
	}
}

function do_tooltip(){
	if($('.mod_tooltip').length){
$('.mod_tooltip').tooltip({ 
    track: true,
    delay: 500,
    showURL: false,
    bodyHandler: function() {
        return $("<img/>").attr("src", $(this).parents('td').attr('background').replace('vorschau.jpg','large1.jpg')); 
    } 
});
	}

if($('.mod_paySelection').length){
$('.mod_payDescription').hide();
$('.mod_paySelection').tooltip({ 
    track: true,
    delay: 100,
    showURL: false,
	id: 'tooltipPayment',
    bodyHandler: function() {
        return '<div class="main">'+$(this).next('tr.mod_payDescription').children('td.onepxwidth').next('td').html()+'</div>'; 
    } 
});
}

}
