/*** 
    Simple jQuery Ajax Script
    Released by Boris Hoeffgen, H&J-Datentechnik e. K., 2011
***/


function contentloader(datei,div,dataid,lastid,vorzur,startid) {
    $("#"+div).load(datei+"?id="+dataid+"&lastid="+lastid+"&vorzur="+vorzur+"&startid="+startid+"",null, function (){
        //alert("Hey, I loaded!");
		setupRate();
});
}
  
function contentloader2(dataid) {
    $("#prev_cont").load("includes-new/rel_member_pre.asp?id="+dataid+"");
}

function GetRandom( min, max ) {
	if( min > max ) {
		return( -1 );
	}
	if( min == max ) {
		return( min );
	}
	var ret = min + parseInt( Math.random() * ( max-min+1 ) );
	if(ret.toString().length<2) ret = "0"+ret.toString();
		return( ret );
}

var an;
function Bildwechsel (Bildnr, video) {
	newImage = new Image();
	newImage.src = "http://addons.marquis.de/inc/ffmpeg_image.php?file="+video+".flv&time=00:"+GetRandom(0,2)+":"+GetRandom(1,59)+"&browser=true";
	window.document.getElementById(Bildnr).src = newImage.src;
	window.document.getElementById(Bildnr).height = "1000";
	an = window.setTimeout("Bildwechsel(\""+Bildnr+"\",\""+video+"\")", 1000);
}

function stop(){
	window.clearTimeout(an);
}

