function openBox(fileSrc,winW,winH,scBar,toBar,stBar,t,l)
{
	var sw = screen.width;
	var sh = screen.height;
	
	if(winW==null) winW = sw*0.9;
	if(winH==null) winH = sh*0.85;
	if(scBar==null) scBar = 'yes';
	if(toBar==null) toBar = 'no';
	if(stBar==null) stBar = 'yes';
	if(t==null) t = (sh-winH)/4;
	if(l==null) l = (sw-winW)/2;
	
  var newPar = "width="+winW+",height="+winH;
	newPar += ",scrollbars="+scBar+",toolbar="+toBar;
	newPar += ",status="+stBar+",top="+t+",left="+l;
	
	window.open(fileSrc,"a",newPar);
}

function statusBar()
{
  window.status="Welcome to pacificvietnam.com";
}

function title(strTitle)
{
	document.title = strTitle;
}

function openImage(vLink)
{
	var sLink = (typeof(vLink.href) == 'undefined') ? vLink : vLink.href;

	if (sLink == '')
	{
		return false;
	}

	var img = new Image();
	img.src = sLink;
	if((img.height<=0)||(img.width<=0))
	{
		return false;
	}
	if((img.height>0)&&(img.width>0))
	{
		vHeight = img.height;
		vWidth  = img.width;
	}

	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('<title>Asia Pacific Travel</title><body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newwin.document.writeln('<a href="" onClick="window.close(); return false;"><img src="', sLink, '" alt="', 'Close', '" border=0></a>');
	newwin.document.writeln('</body>');

	if (typeof(vLink.href) != 'undefined')
	{
		return false;
	}
}

function view(file,i,w,h,s,r)
{
	var arg="width=" + w + ",height=" + h;
	arg+= ",left=0,top=0,scrollbars=" + s ;
	arg+=",resize=" + r;
	window.open(file+i,"a",arg);
}

function GotoPage(iPage) 
{
	document.frmPaging.curPg.value=iPage;
	document.frmPaging.submit();
}

function goPage(url) 
{
	window.open(url,'_self');
}