function AutoPic(img){
  img1 = new Image();
  img1.src = (img);
  Control(img);
}
function Control(img){
  if((img1.width!=0)&&(img1.height!=0)){
    viewImg(img);
  }
  else{
    funzione="Control('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewImg(img)
{
 strW=img1.width+26;
 strH=img1.height+26;
 strLeft=(screen.width-img1.width)/2;
 strTop=(screen.height-img1.height)/2;
 strArg="width="+strW+",height="+strH+",top="+strTop+",left="+strLeft;
 strFinal=window.open(img,"Picture",strArg);
}




//===========================================================

function showImage(imgpath) {
	var elIMG = document.getElementById("page_picture_content");
	if(imgpath==0){
		elIMG.innerHTML="";return true;
	}else{
		imgpath = remove(imgpath,"sm");
		elIMG.innerHTML="<img src='"+imgpath+"' border='0' alt='Trailer Photo' style='border:1px solid #000;' id='imgLarge'>";return true;

	}
}
function remove(s, t) {
  i = s.indexOf(t);r = "";
  if (i == -1) return s;
  r += s.substring(0,i) + remove(s.substring(i + t.length), t);
  return r;
  }