/**************************************************************************************
Author						:	Khalid Ali
Date							:
Version						:	1.1
Company						:	webapplikations inc.      http://www.webapplikations.com
                    The code provided here is copy righted material and belongs to the
                    webapplikations.com inc. It is provided as a service for our visitors.
                    It can be used without permission provided that this notification
                    does appear at the top.
Description				:
***************************************************************************************/
<!--
var newImg = new Image();
newImg.src = "images/cansoilt_2_2.jpg";
function Process(url){
  newImg.style.border="0px";
	//create image sized window
  var winProps = "width="+(newImg.width+4)+", height="+(newImg.height+2)+", scrollbars=yes, toolbar=no, directories=no, menu bar=no, resizable=yes, status=yes";
 	newWin=window.open("images/images.php","newWin",winProps);
  SetImage(newWin);

  // BELOW IS ANOTHER WAY OF OPENING IMAGES IN NEW WINDOW.

  //var winProps = "width="+(newImg.width+20)+", height="+(newImg.height+24)+", scrollbars=no, toolbar=no, directories=no, menu bar=no, resizable=yes, status=yes";
  //newWin=window.open("","newWin",winProps);
  //newWin.document.open();
  //newWin.document.write("<img id='dynaImg' src='"+newImg.src+"' alt='Dynamicaly wized window with this image' />");
  //newWin.document.close();
}

/**
  @param        newWin  a reference to new window being created
                        attaches image to this new window
*/
function SetImage(newWin){
  var imgEl = newWin.document.getElementById("imgID");
  if(imgEl!=null){
    imgEl.src= newImg.src;
    imgEl.style.borderWidth="0px";
  }else{
    setTimeout('SetImage(newWin)',10);
  }
}
//-->

