//routine copyright 2001 STAM-IT Dot Com Sdn. Bhd.
//all rights reserved

//feel free to use this routine, provided u do not modify the ownership

function gPicFileName(){
	var qPos1, qPos2, qStr1, qStr2, gFilename, gPhotoDesc;
	var sURL = window.location.href;
	qStr1 = /gFilename=/i;
	qStr2 = /gDescribe=/i;
	
	qPos1 = sURL.search(qStr1)+10;
	qPos2 = sURL.search(qStr2);
	
	if (qPos2!=-1) {
		qPos2=qPos2+10;
		gFilename = sURL.substr(qPos1, qPos2-qPos1-11);
		gPhotoDesc = sURL.substr(qPos2, sURL.length-qPos2);	
	}
	// just in case don't have a description
	else {
		gFilename = sURL.substr(qPos1, sURL.length-qPos1);
		gPhotoDesc = " ";
	}
		
	
	
	do {gPhotoDesc = gPhotoDesc.replace(/%20/i," ");}
	while (gPhotoDesc.search(/%20/i)!=-1);
	
	window.gPhotoHolder.src = gFilename;
	window.gPhotoTitle.innerHTML = gPhotoDesc;

}

