function getImgPath(Qstr)
{
    var qVal = 'p';
    var ctlname = 'imgctl'; 
	var TotFloor = 2;
	var i=0;
	var fCnt = queryString(Qstr,'fc');
	
	//Restore the initial state of all tables--------------------------------
	var allTable = document.getElementsByNameIE ('table','floortable');
    var i=0;
    for (i=0;i<allTable.length; i++)
    {
        document.getElementById (allTable[i].id).style .display = 'none';
    }
    //-----------------------------------------------------------------------
    	
	document.getElementById (queryString(Qstr,qVal)).style .display = 'inline';
	var CurrFloor =  queryString(Qstr,qVal).split("_");
	// PlotNo_f_FloorNo
	// Plot No 	= CurrFloor[0]
	// f 		= CurrFloor[1]
	// Floor No = CurrFloor[2]
		
	for (i=0;i<=TotFloor;i++) 
	{	    
		if (i>fCnt)
    		document.getElementById ('Floor' + i ).style.display='none';
		else
		    document.getElementById ('Floor' + i ).style.display='inline';

		//document.getElementById ('Floor' + i ).href ='popup.html?p=' + CurrFloor[0] + '_f_' + i + '&fc=' + fCnt + '' ;
		var str = 'popup.html?p=' + CurrFloor[0] + '_f_' + i + '&fc=' + fCnt + '';
		document.getElementById ('Floor' + i ).href ="javascript:OpenSmallWindow('" + str + "')";
	}
	document.getElementById (ctlname).src = 'img/' + queryString(Qstr,qVal) + '.jpg';
    document.getElementById ('Floor' + CurrFloor[2] ).style.display='none';
}

  
 // Do Not modify Following Code *****************************************************
 document.getElementsByNameIE = function(tagName,elementName) 
 {
	
	
	matchingTags = document.getElementsByName(elementName);
	if (matchingTags .length > 0)
	{
		return matchingTags;
	}
	else
	{
		matchingTags = document.getElementsByTagName(tagName);
		
		elementList = new Array;
		for(i=0; i < matchingTags.length; i++) 
		{
			if( matchingTags[i].name == elementName ) 
			{
				elementList.push(matchingTags[i]);
			}
		}
		return elementList;
	}
  	
}

function PageQuery(q) {
     
	if(q.length > 1) this.q = q.substring(1, q.length);
	else this.q = null;
	this.keyValuePairs = new Array();
	if(q) {
		for(var i=0; i < this.q.split("&").length; i++) {
			this.keyValuePairs[i] = this.q.split("&")[i];
		}
	}
	this.getKeyValuePairs = function() { return this.keyValuePairs; }
	this.getValue = function(s) {
		for(var j=0; j < this.keyValuePairs.length; j++) {
			if(this.keyValuePairs[j].split("=")[0] == s)
				return this.keyValuePairs[j].split("=")[1];
		}
		return false;
	}
	this.getParameters = function() {
		var a = new Array(this.getLength());
		for(var j=0; j < this.keyValuePairs.length; j++) {
			a[j] = this.keyValuePairs[j].split("=")[0];
		}
		return a;
	}
	this.getLength = function() { return this.keyValuePairs.length; }	
}

function queryString(QStr,key){
 
var page = new PageQuery(QStr); 
return unescape(page.getValue(key)); 
}
function displayItem(key){
if(queryString(key)=='false') 
{
result.innerHTML="you didn't enter a ?name=value querystring item.";
}else{
result.innerHTML+=queryString(key)+"<BR>";
}
}
//*****************************************************************************************


