function PopupImage(img, width, height) {
	images = new Image();
	images.src = img;
	url_image_zoom = img;
	width_image_zoom = width;
	height_image_zoom = height;
 
	document.getElementById('zoom').style.width=width_image_zoom;
	document.getElementById('zoom').style.height=height_image_zoom;
	document.getElementById('zoom').src=url_image_zoom;
//	images.onload = function() {}
	document.getElementById('CalqueZoom').style.display='block';
//	document.removeChild(document.getElementById());
//document.getElementById('zoom').removeChild(img);
}

function HideCalque() {
	document.getElementById('CalqueZoom').style.display='none';
}

function ipigz() {
	ipigz_me(''+url_image_zoom+'');
}

function na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length-1; i++) {
    document.preloadlist[top+i] = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function na_change_img_src(name, nsdoc, rpath, preload)
{ 
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  } 
}

function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  } 
}


function clk(id)
{
	(new Image()).src="goto.php?id="+id;
	return true;
}

function entree(id)
{
	(new Image()).src="open.php?id="+id;
	return true;
}

function CheckLen(Target)
{
	StrLen = Target.value.length;
	if ( StrLen>100 ) {
		Target.value = Target.value.substring(0,100);
		CharsLeft = 100;
	} else {
		CharsLeft = StrLen;
	}
	var CharsLeft1 = 100 - CharsLeft;
	document.form2submit.reste.value = CharsLeft1;
}

function ChangeUrl(liens)
{
if (liens.partenaires.selectedIndex != 0)
	{
	location.href = liens.partenaires.options[liens.partenaires.selectedIndex].value;
 	}
	else {}
}

function goto(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
     if (targetstr == 'blank') {
       window.open(sel.options[index].value, 'win1');
     } else {
       var frameobj;
       if (targetstr == '') targetstr = 'self';
       if ((frameobj = eval(targetstr)) != null)
         frameobj.location = sel.options[index].value;
     }
  }
}

function zonehot(url)
{
	winwidth = 790;
	winheight = 550;
	wintop = (screen.height - winheight) / 2;
	winleft = (screen.width - winwidth) / 2;
	window.open(url, '_blank', 'scrollbars=yes, width=' + winwidth + ', height=' + winheight + ', top=' + wintop + ', left=' + winleft + ', resizable');
}

function allopass(url)
{
	winwidth = 700;
	winheight = 650;
	wintop = (screen.height - winheight) / 2;
	winleft = (screen.width - winwidth) / 2;
	window.open(url, '_blank', 'scrollbars=yes, width=' + winwidth + ', height=' + winheight + ', top=' + wintop + ', left=' + winleft + ', resizable');
}

function makevisible(cur,which)
	{
	if(document.getElementById)
		{
		if (which==0)
			{
			if(document.all)
				cur.filters.alpha.opacity=80
			else
				cur.style.setProperty("-moz-opacity", .8, "");
			}
		else
			{
			if(document.all)
				cur.filters.alpha.opacity=50
			else
				cur.style.setProperty("-moz-opacity", .5, "");
			}
		}
	}


function cover(id_video,hauteur,largeur)
{
	var url= 'http://www.divxgay.net/pop-cover.php?id_video=' + id_video;
	var winl = (screen.width - largeur) / 2;
	var wint = (screen.height - hauteur) / 2;
	date_t = new Date;
	time = date_t.getTime();
	winprops = 'height='+hauteur+',width='+largeur+',top='+wint+',left='+winl+',scrollbars=,resizable'
	win = window.open(url, time, winprops)
}
