// par lex (lex@silex.tv)
// 2005

function adjustSilexWindowSize(h)
{
	var silexFrameName_str="flashcontent";
//	move(silexFrameName_str,0,0,w,h);
	set_frame_prop(silexFrameName_str,'height',h);
}
function move(id_str,x,y,w,h)
{
	set_frame_prop(id_str,'top',y);
	set_frame_prop(id_str,'left',x);
	set_frame_prop(id_str,'width',w);
	set_frame_prop(id_str,'height',h);
//	set_frame_prop(id_str+'_content','width',w);
//	set_frame_prop(id_str+'_content','height',h);
}
function set_frame_prop(id_str,prop_str,valeur_num)
{
/*	debug_lex(get_frame(id_str));
	alert(prop_str+" = "+get_frame(id_str)[prop_str]);
	alert(prop_str+" <- "+valeur_num);
	alert("type de "+prop_str+" : "+typeof(get_frame(id_str)[prop_str]));
/**/	
	get_frame(id_str)[prop_str]=valeur_num;
}
function get_frame(id_str)
{
	return get_obj(id_str).style;
}
function get_obj(id_str)
{
	 if (document.layers) 
	 { 
	 	 //alert("1");
	     return document.layers[id_str].document; 
	 } 
	 else if (parseInt(navigator.appVersion)>=5&&navigator.appName=="Netscape")
		 { 
		 	//alert("2");
		   return document.getElementById(id_str); // ou  return document.getElementById(id_str).document; ?
		 }
		 else if (document.all)
		 {
		 	//alert("3");// ICI DANS IE
		 	//alert(debug_lex(document.all[id_str].document));
		 	return document.all[id_str];
		 }
//	 else alert("Erreur : impossible de trouver la frame "+id_str+" dans votre navigateur");
	 return null;
}

