
function BaseComponentOpen(SiteUrl, path)
{
	
	document.location = SiteUrl  + '/SiteManager/Process/FileOpen.aspx?field=' + path ;
}
function BaseComponentOpenFile(SiteUrl, path)
{
	
	window.open(SiteUrl  + '/SiteManager/Process/FileOpen.aspx?field=' + path );
}
function openCenteredFilePopup(path,l,h,resize,scroll)
{
	longueur=l;
	hauteur=h;
	haut = screen.height/2 - hauteur/2;
	dimx = screen.width/2 - longueur/2;
	//window.open(SiteUrl  + '/SiteManager/Process/FileOpen.aspx?field=' + path,'', 'width='+longueur+' ,height='+hauteur+',left='+ dimx +',top='+ haut + ',resizable=' + resize + ',scrollbars='+scroll);
	window.open( path,'', 'width='+longueur+' ,height='+hauteur+',left='+ dimx +',top='+ haut + ',resizable=' + resize + ',scrollbars='+scroll+',status=1');
}

function openCustomFilePopup(path,l,h,x,y,resize,scroll)
{
	longueur=l;
	hauteur=h;
	//window.open(SiteUrl  + '/SiteManager/Process/FileOpen.aspx?field='+path,'','width='+longueur+',height='+hauteur+',left='+x+',top='+y+',resizable=' + resize + ',scrollbars='+scroll);
	window.open(path,'','width='+longueur+',height='+hauteur+',left='+x+',top='+y+',resizable=' + resize + ',scrollbars='+scroll+',status=1');	
}
//endsim


function ClickAutoSelect(ListIndex, str)
{ 
if (ListIndex!=0) { eval(str); }
}
function SendFriend(pageid)
{
alert('ouverture popup ami ... '+ pageid );
}
function Print()
{
window.print();
}

function writeFlash(url,id,w,h,o){
	var tempFlashContent = '';
	var flashOptionsTab = new Array();
	flashOptionsTab = o.split('|');
	tempFlashContent += '\n<object id="'+id+'" type="application/x-shockwave-flash" data="'+url+'" width="'+w+'" height="'+h+'">\n';
	tempFlashContent += '\t<param name="movie" value="'+url+'" />\n';
	for(i=0; i<flashOptionsTab.length; i++){
		var tempParam = flashOptionsTab[i].split('#')[0];
		var tempValue = flashOptionsTab[i].split('#')[1];
		tempFlashContent += '\t<param name="'+tempParam+'" value="'+tempValue+'" />\n';
	}
	tempFlashContent += '</object>\n';
	document.write(tempFlashContent);
}
