
function pws_digitalOrder(formname, cookievalue, action)
{

	pws_popupNewBrowser('', 'yes', 'no', 'yes', 'no', 'no', 'yes', screen.width, screen.height*0.9, 20, 20);

	pws_setCookie2('FromWebSite', cookievalue, '/', '.hsbc.com.hk', 'true', 0);
          
	document.forms[formname].target = 'nb';
	document.forms[formname].action = action;
	document.forms[formname].submit();

}

function pws_popupNewBrowser(url, status, location, scroll, mbar, toolbar, resize, width, height, left, top, winname)
{
	!winname? winname='nb':winname=winname;
	nb=window.open(url, winname, 'status=' + status + ',location=' + location + ',scrollbars=' + scroll + ',menubar=' + mbar + ',toolbar=' + toolbar + ',resizable=' + resize + ',height=' + height + ',width=' + width + ',left=' + left + ',top' + top);
	nb.focus();
}

function pws_setCookie2(name, value, path, domain, secure, expires)
{
    document.cookie = name + '=' + value +
    ((path) ? '; path=' + path : '') +
    ((domain) ? '; domain=' + domain : '') +
    ((secure) ? ';secure' : '')+
    ((expires) ? ';expires=' + expires.toGMTString() : '') ;
}

function pws_popupDisclaimer(url)
{
    window.open(url, 'disclaimer', 'status=yes,location=no,scrollbars=auto,menubar=no,toolbar=no,resizable=no,height=160,width=400,left=20,top=20');
}

function pws_popupDisclaimerIDC(url)
{
    window.open(url, 'disclaimer', 'status=yes,location=no,scrollbars=auto,menubar=no,toolbar=no,resizable=no,height=450,width=400,left=20,top=20');
}