function showPriceList(id)
{
	showModalDialog("../member/open_price_list.php?member_id="+id, "", "help: no; status: no; scroll: yes;");
	return false;
}
function showMember(id)
{
	showModalDialog("../member/open_member_detail.php?member_id="+id, "", "help: no; status: no; scroll: yes;");
	return false;
}
function showReviewForm(id)
{
	r=showModalDialog("../review/review_form.php?product_id="+id, "", "help: no; status: no; scroll: yes;");
	return r;
}
function showCalendar(id)
{
	var date = showModalDialog("../editor/popup_calendar.php", "", "help: no; status: no; scroll: no;");
	if (date)
	{
		eval(id).value=date;
	}
}
function showCalendarOut(id)
{
	var date = showModalDialog("../admin/editor/popup_calendar.php", "", "help: no; status: no; scroll: no;");
	if (date)
	{
		eval(id).value=date;
	}
}
function image_open(image_loc,img)
{
  HTML = "<html><title>Zoom out image</title><style>body{margin:0px 0px 0px 0px}</style><body onBlur='top.close()'><img src='"+ image_loc +"' border=0 name=load_image onLoad='window.resizeTo(document.load_image.width+30,document.load_image.height+50);window.moveTo(parseInt(window.screen.availWidth)/2-parseInt(document.load_image.width+30)/2,parseInt(window.screen.availHeight)/2-parseInt(document.load_image.height+50)/2)'></body></html>";
  popupImage = window.open('','_blank','toolbar=no,scrollbars=yes,resizable');
  popupImage.document.open();
  popupImage.document.write(HTML);
  popupImage.document.close();
}
function image_open_(image_loc,img)
{
  HTML = "<html><title>Zoom out image</title><style>body{margin:0px 0px 0px 0px}</style><body onBlur='top.close()' bgcolor=#EAF3F7>";
  HTML += "<center><table border=0 cellspacing=0 cellpadding=0 height=100%><tr><td>";
  HTML += "<table border=0 cellspacing=0 cellpadding=0><tr><td style='"+"border:1 solid #666666"+"'><img src='"+ image_loc +"'vspace=1 hspace=1 name=load_image onLoad='window.moveTo(parseInt(window.screen.availWidth)/2-parseInt(document.load_image.width+10)/2,parseInt(window.screen.availHeight)/2-parseInt(document.load_image.height+30)/2)'>";
  HTML += "</td></tr></table></td></tr></table>";
  HTML += "</body></html>";
  popupImage = window.open('','_blank','width=700,height=500,toolbar=no,scrollbars=yes');
  popupImage.document.open();
  popupImage.document.write(HTML);
  popupImage.document.close();
}

function doMark(id)
{
	st=eval('document.all.'+id);
	if(st.className=='cellcheck')
		st.className='celluncheck';
	else
		st.className='cellcheck';
}
function doOpen(file,field,show)
{
	open(file+'?return='+field+'&show='+show,'','width=350,height=350,top=0,left=0,scrollbars,status,resize');
	return false;
}
function doOpenWindow(file,width,height,top,left)
{
	if(width=="")
		width=460;
	if(height=="")
		height=460;
	if(top=="")
		top=0;
	if(left=="")
		left=0;
	open(file,'','width='+width+',height='+height+',top='+top+',left='+top+',scrollbars,status,resize');
	return false;
}

function openImage(vLink, vHeight, vWidth)
{
	var sLink = (typeof(vLink.href) == 'undefined') ? vLink : vLink.href;

	if (sLink == '')
	{
		return false;
	}

	winDef = 'status=no,resizable=no,scrollbars=no,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(vHeight).concat(',').concat('width=').concat(vWidth).concat(',');
	winDef = winDef.concat('top=').concat((screen.height - vHeight)/2).concat(',');
	winDef = winDef.concat('left=').concat((screen.width - vWidth)/2);
	newwin = open('', '_blank', winDef);

	newwin.document.writeln('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newwin.document.writeln('<a href="" onClick="window.close(); return false;"><img src="', sLink, '" alt="', 'Dong lai', '" border=0></a>');
	newwin.document.writeln('</body>');

	if (typeof(vLink.href) != 'undefined')
	{
		return false;
	}
}