/*
   Video PopUp
*/	
function video(url)
{
	winwidth = screen.availWidth - 10;
	winheight = screen.availHeight - 30;
	window.open(url, '_blank', 'scrollbars=yes, width=' + winwidth + ', height=' + winheight + ', top=0, left=0, resizable');
} 

/* 
  KTU Iframe
*/

function affiche_ktu(g, id, mode, prod, skin, lg, tracker, width, height)
{
  var Param= new Array();
	Param['id'] = id;
	Param['tracker'] = tracker;
	Param['color'] = skin;
	Param['mode'] = mode;
	Param['prod'] = prod;
	Param['dist'] = '';
	Param['lg'] = lg;
	if(g == 'hetero')
	{
	   Param['id_site'] = '1007';
	   Param['id_produit'] = '343';
	   Param['rf'] = 'pornattiudeFR_ktu';
	   Param['name_kit'] = "Pornattitude";
	   Param['synergie'] = 'h';
	}
	else
	{
	   Param['id_site'] = '1011';
	   Param['id_produit'] = '344';
	   Param['rf'] = 'gayxperienceFR_ktu';
	   Param['name_kit'] = "GayXperience";
	   Param['synergie'] = 'g';
	}
  var ktuPath="";
	var tmp_link = "http://ktu.sv2.biz/iframe.html";
	
	for (param in Param) 
	   {
		  glue = tmp_link.indexOf('?') == -1 ? '?' : '&';
		  tmp_link += glue+param+'='+Param[param];
	   }
  document.write('<iframe src="' + tmp_link +'" name="IFRAME_MICRO" width="' + width + '" height="' + height + '" scrolling="no" frameborder="0"></iframe>'); 
}

function pop(url,lg,idkit,syn) 
{
  var left = (screen.width/2)-240; // On retire la moitié de 'width'
	var top = (screen.height/2)-185; // On retire la moitié de 'height'
	mp = window.open(url+'?idkit='+idkit+'&lg='+lg+'&synergie='+syn,'mp', 'statutbar=no, width=480, height=370, left='+left+', top='+top+', menubar=no, resize=yes, scrollbars=yes');
  if (mp && mp.focus) mp.focus();
}

//BLINK - IE does not understand the blink css
var text_timer;
var text_visible = 1;
var text_tmp;

function blink(){

	if (text_visible){
		text_tmp = document.email_form.email.value;
		document.email_form.email.value = '';
		text_visible = false;
	}
	else{
		document.email_form.email.value = text_tmp;
		text_visible = true;
	}
}

function start_blink(){
	if (document.email_form) {
		if (document.email_form.email.value=='votre em@il'){
			text_timer = setInterval('blink()', 500);
		}
	}
}

function stop_blink(){
	if (text_timer){
		clearInterval(text_timer);
	}
}

function email_focus(){
	stop_blink();
	e = document.email_form.email;
	if (e.value == 'votre em@il') e.value = '';
}

function email_blur(){
	e = document.email_form.email;
	if (e.value == 'votre em@il' || e.value == ''){
		e.value = 'votre em@il';
		start_blink();
	}
}
