function openwin(url,wintype,winheight,winwidth)
{
//Default sizes for window
if (winheight==null) winheight='280';
if (winwidth==null) winwidth='350';

//give prod info windows a handle unique(ish) to the sku/qlink
var WinID = 0
if (url.charCodeAt)
  for(iLoop=0;iLoop<url.length;iLoop++) 
    WinID += url.charCodeAt(iLoop); 

window.name="mainwin"

if (wintype=="surveywin") {
    window.open(url,WinID, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=600,height=600')
}
if (wintype=="prodwin") window.open(url,WinID, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=470,height=540');
if (wintype=="assocwin") window.open(url,'assocwin', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=470,height=540');
if (wintype=="mfrwin") window.open(url, wintype, 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
if (wintype=="pricewin") window.open(url, wintype, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=300,height=100');
if (wintype=="infowin") {
    win = window.open(url, wintype, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=440,height=500')
}
if (wintype=="presswin") {
    win = window.open(url, wintype, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=800')
}
if (wintype=="newsltrwin") {
    win = window.open(url, wintype, 'toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=800')
}
if (wintype=="linkwin") window.open(url, wintype, 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
if (wintype=="helpwin") window.open(url, wintype, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+winwidth+',height='+winheight);
if (wintype=="mailwin") window.open(url, wintype, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+winwidth+',height='+winheight);
if (wintype=="ODwin") window.open(url, wintype, 'toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+winwidth+',height='+winheight);
}
function closeDep() {
    if (win && win.open && !win.closed) win.close();
}

