if (typeof rencontres_flash_banner == 'undefined') var rencontres_flash_banner = new Object();
if (typeof rencontres_flash_banner.content_niche == 'undefined') rencontres_flash_banner.content_niche='normal';
if (typeof rencontres_flash_banner.thumbs_niche == 'undefined') rencontres_flash_banner.thumbs_niche='femmes';
if (typeof rencontres_flash_banner.thumb_size == 'undefined') rencontres_flash_banner.thumb_size='225x225';
if (typeof rencontres_flash_banner.tracker == 'undefined') rencontres_flash_banner.tracker='';
if (typeof rencontres_flash_banner.exit_console == 'undefined') rencontres_flash_banner.exit_console=false;
if (typeof rencontres_flash_banner.warning == 'undefined') rencontres_flash_banner.warning=false;
if (typeof rencontres_flash_banner.target_id == 'undefined') rencontres_flash_banner.target_id='_blank';
if (typeof rencontres_flash_banner.target_url_type == 'undefined') rencontres_flash_banner.target_url_type='';
if (typeof rencontres_flash_banner.id == 'undefined') rencontres_flash_banner.id='10000';
if (typeof rencontres_flash_banner.target_url == 'undefined') rencontres_flash_banner.target_url='';

document.write('<scr'+'ipt src="http://media.rencontreshard.com/new/js/get_thumbs.js"></scr'+'ipt>');

if(rencontres_flash_banner.thumbs_niche!='femmes' && rencontres_flash_banner.thumbs_niche!='couples' && rencontres_flash_banner.thumbs_niche!='mix')rencontres_flash_banner.thumbs_niche='femmes';

if (rencontres_flash_banner.thumb_size != '225x225' && rencontres_flash_banner.thumb_size != '160x300' && rencontres_flash_banner.thumb_size != '160x600' && rencontres_flash_banner.thumb_size != '300x250' && rencontres_flash_banner.thumb_size != '300x250_1' && rencontres_flash_banner.thumb_size != '728x90') { // 225x225, 160x300, 160x600, 300x250, 728x90
	rencontres_flash_banner.thumb_size = '225x225';
	var ban_width=225;
	var ban_height=225;
} else {
	var tmp=rencontres_flash_banner.thumb_size.split('x');
	var ban_width=tmp[0];
	var ban_height=tmp[1];
}
var imgSize;
var preffix;
switch (rencontres_flash_banner.thumb_size) {
	case '225x225': {imgSize='240x320';preffix='-fb01'; break;}
	case '160x300': {imgSize='240x320';preffix='-fb01'; break;}
	case '728x90': {imgSize='60x60';preffix='-fb02'; break;}
	case '300x250': {imgSize='120x120';preffix='-fb02'; break;}
	case '300x250_1': {imgSize='120x120';preffix='-fb02'; break;}
	case '160x600': {imgSize='120x120';preffix='-fb02'; break;}
}
if (rencontres_flash_banner.tracker == '' || !rencontres_flash_banner.tracker) rencontres_flash_banner.tracker='';
rencontres_flash_banner.tracker=rencontres_flash_banner.tracker+preffix+'-'+rencontres_flash_banner.thumb_size;
if (!rencontres_flash_banner.target_id || rencontres_flash_banner.target_id=='') rencontres_flash_banner.target_id='_blank';
if (rencontres_flash_banner.exit_console) var e='&e=1';
else var e='&e=0';
if (rencontres_flash_banner.warning) var w='&w=1';
else var w='&w=0';
if (rencontres_flash_banner.target_url_type!='site' && rencontres_flash_banner.target_url_type!='exe' && rencontres_flash_banner.target_url_type!='exe_page' && rencontres_flash_banner.target_url_type!='pdv' && rencontres_flash_banner.target_url_type!='promo_optimize') rencontres_flash_banner.target_url_type='site';

function txt_open_link(url, target,d)
{
	var winl = (screen.width-720)/2;
	var wint = (screen.height-620)/2;
		params = (d==2)? "menubar=0,resizable=1,width=750,height=790,top="+wint+",left="+winl+"":"menubar=1,scrollbars=1,resizable=1,width=1000";
		if (target == '_self' && d != 2) window.location = url;
		else window.open(url,"",params);
}

d=1
if(rencontres_flash_banner.target_url_type=='site'){
	rencontres_flash_banner.target_url = "http://www.rencontreshard.com/?id="+rencontres_flash_banner.id+"&tracker="+rencontres_flash_banner.tracker+""+e+w;
}else	if(rencontres_flash_banner.target_url_type=='exe'){
	rencontres_flash_banner.target_url = "http://download.rencontreshard.com/"+rencontres_flash_banner.id+"/"+rencontres_flash_banner.tracker+"_deftrack_rencontreshard/"+rencontres_flash_banner.target_url;
}else	if(rencontres_flash_banner.target_url_type=='exe_page'){
	rencontres_flash_banner.target_url = "http://clouds.rencontreshard.com/download.php?id="+rencontres_flash_banner.id+"&tracker="+rencontres_flash_banner.tracker+e+w+"&exe_name="+rencontres_flash_banner.target_url+"&cont_niche=femmes&img_path=http%253A//media.rencontreshard.com/content/femmes/60x60/angelyna_1983.jpg";
	d=2;
}else	if(rencontres_flash_banner.target_url_type=='promo_optimize'){
	rencontres_flash_banner.target_url = "http://www.espace-plus.net/redir/rotation_redir.php?id_rotation=90&id="+rencontres_flash_banner.id+"&tracker="+rencontres_flash_banner.tracker+""+e+w;
}else{
	rencontres_flash_banner.target_url = "http://clouds.rencontreshard.com/pdv"+rencontres_flash_banner.target_url+".php?id="+rencontres_flash_banner.id+"&tracker="+rencontres_flash_banner.tracker+""+e+w;
}

function inArray2(needle, haystack) {
	var found=false;
	for (var i=0; i<haystack.length; i++) {
		if (haystack[i]==needle) found=true;
	}
	return found;
}

function getRand2(min,max,except) {
	if (typeof except=="undefined") except=new Array();
	var rand_num=Math.round(Math.random()*max);
	do {
		rand_num=Math.round(Math.random()*max);
	} while (rand_num<min || inArray2(rand_num,except));
	return rand_num;
}
var rand=getRand2(1,3);

document.write('<scr'+'ipt src="http://media.rencontreshard.com/new/js/stored/'+rand+'/models-femmes-'+imgSize+'.js"></scr'+'ipt>');
document.write('<scr'+'ipt src="http://media.rencontreshard.com/new/js/stored/'+Math.ceil(Math.random()*2)+'/models-couples-'+imgSize+'.js"></scr'+'ipt>');
document.write('<scr'+'ipt src="http://pub.sv2.biz/geo_location.php"></scr'+'ipt>');
document.write('<scr'+'ipt src="http://pub.sv2.biz/geo_location_array.php"></scr'+'ipt>');
//document.write('<scr'+'ipt src="http://192.168.15.130/recontres/banners/write_banner.js"></scr'+'ipt>');
document.write('<scr'+'ipt src="http://media.rencontreshard.com/new/js/write_banner.js"></scr'+'ipt>');

