<!-- common functions :::

// 2use popup() function: <a href="javascript:;" onClick="javascript:popup('name', '#link', 0, 0, 300, 150, 0, 0, 1, 1, 1); return false;"></a>
function popup(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
	var wint = (screen.height - height) / 2;
	var winl = (screen.width - width) / 2;
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	window.open(url, name, 'left='+winl+',top='+wint+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function urlencode(ch)
{
//	ch = ch.replace(/[ ]/g,"+")
	ch = ch.replace(/[ ]/g,"%20")
	return escape(ch)
}
function urldecode(ch)
{
   ch = ch.replace(/[+]/g," ")
   return unescape(ch)
}

function popupimg(name, url, width, height)
{
	var imgss;
	winl = (screen.width) ? (screen.width - width) / 2 : 0;
	wint = (screen.height) ? (screen.height - height) / 2 : 0;
	//var winname = urlencode(name);
	var winname = name;
	var settings = 'left='+winl+',top=10,width='+(width+40)+',height='+(height+40)+',toolbar=no,menubar=no,status=yes,scrollbars=yes,resizable=yes';
	myimgss = window.open('','imgpoint',settings);
	myimgss.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><title>'+urldecode(winname)+'</title></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><table height="100%" width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" valign="middle"><a href="javascript:self.close();"><img src="'+url+'" name="fullbimg" alt="Click to close the window..." width="'+width+'" height="'+height+'" border="0"></a></td></tr></table></body></html>');
	myimgss.document.close();
	if(myimgss.window.focus) {
		myimgss.window.focus();
	}
}

function Dating()
{
   var d, s = 'Today is: ';
   d = new Date();
   s += d.getDate() + "/";
   s += (d.getMonth() + 1) + "/";
   s += d.getYear();
   return(s);
}

function ShowItem(link)
{
	popup('item_info', link, 0, 0, 400, 350, 0, 0, 0, 0, 1);
}
// -->