//-> XML pharser
function Stfsr(set,fl,ctr) {
  try { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); }
  catch(e) {
    try { xmlDoc = document.implementation.createDocument("","",null); }
    catch(e) { 
	  alert(e.message);
      return;
    }
  } 
  
  xmlDoc.async = false;
  xmlDoc.load(ctr + fl + ".xml");
      
  var xvr = ["name","title","summary"];
  
  document.getElementById("pht").src = ctr + "img/" + xmlDoc.getElementsByTagName("pht")[set].childNodes[0].nodeValue + ".jpg";
    
  for (var n in xvr) {
    document.getElementById(xvr[n]).innerHTML = 
	xmlDoc.getElementsByTagName(xvr[n])[set].childNodes[0].nodeValue;
  }
}

//-> demo pop-up function
var win; var file; var x = 0;

function DspImg(img,w,h) {
	
if(win)
  win.close();
  if(file && file == img)
    return;	
    file = img;
	
    var tmp = '<html><head><title>Product Samples</title></head>';
	    tmp += '<body style="margin: 0; padding: 0;">';
		tmp += '<center><img src="../' + img + '" alt="" width=' + w + ' height=' + h + ' /></center>';
		tmp += '</body></html>';

		win = window.open('','image' + ++x,'width=' + w + ',height='+ h);
		win.document.write(tmp);
		win.document.close();
		win.focus();
  file='';
return;

}