var shopsObj = new Object();

//function shopObj(id, name, tel, loc, hour, desc, galleries, link, category, premises)
function shopObj(id, name, tel, loc, hour, desc, galleries, link, category, premises)
{
	this.id = (id)?id:'';	// section group id - the folder struct which relative to the root htm
	this.name = (name)?name:'';	// shop name - text
	this.tel = (tel)?tel:'';	// shop tels
	this.loc = (loc)?loc:'';	//	shot location id
	this.hour = (hour)?hour:'';	//	shot operation hour
	this.desc = (desc)?desc:'';	// shop desc - all langs
	this.galleries = (galleries)?galleries:0;	// shop galleries
	this.link = (link)?link:'';	// shop link *** will override the gen page
	
	this.category = (category)?category:'';	// shop link *** will override the gen page
	this.premises = (premises)?premises:'';	// shop link *** will override the gen page
	
	
	this.getName = function()
		{
			return unescape(this.name[getLang()]);
		}
	this.getID = function()
		{
			return this.id;
		}
	this.gethour = function()
		{
			var hour = this.hour;
			
			while (hour.indexOf("^BR^")!=-1) 
				{
					hour = hour.replace("^BR^","<BR>");
				}

			return hour;
		}
	this.getDesc = function()
		{
			var desc = this.desc[getLang()];
			
			while (desc.indexOf("^BR^")!=-1) 
				{
					desc = desc.replace("^BR^","<BR>");
				}
				
			//desc = desc.replace("^newline^","<BR>");
			return unescape(desc);
		}
		
	this.getTel = function()
		{
			var str = "";
			for (var t in this.tel)
				{
					str += (str=="")?"":"<BR>";
					str += this.tel[t];
				}
			return str;
		}

	this.getLoc = function()
		{
			var loc = this.loc;
			return (loc=="GF")?"G/F":loc;
			return loc;
		}
}