if (window.screen) {
    var clientW = Math.floor(screen.availWidth);
    var clientH = Math.floor(screen.availHeight);
}

function openWindow(url){//standard size defined for generic pop up content
window.name = "main";
Window1=window.open(url,'Window1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=500,top='+((clientH-500)/2)+',left='+((clientW-560)/2)); 
Window1.focus();

if (url.indexOf('www.pcfinancial.ca')<= 0  && url.indexOf('preview.pcfinancial.ca')<= 0 && url.indexOf('http') >= 0) {
strreferid= dcsGetReferid(url);
dcsMultiTrack('DCS.dcsuri',url,'WT.ti','Offsite:'+url,"WT.os","1",'DCS.dcssip','Offsite', "WT.ac", strreferid,"WT.ad","");
}
}

function openWindow2(url, w, h){//customizable size with no tool bars, for calculators, amicus deposit register info, pavilion locator,...etc
window.name = "main";
Window2=window.open(url,'Window2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+',top='+((clientH-h)/2)+',left='+((clientW-w)/2));
Window2.focus();

if (url.indexOf('www.pcfinancial.ca')<= 0  && url.indexOf('preview.pcfinancial.ca')<= 0 && url.indexOf('http') >= 0) {
strreferid= dcsGetReferid(url);
dcsMultiTrack('DCS.dcsuri',url,'WT.ti','Offsite:'+url,"WT.os","1",'DCS.dcssip','Offsite', "WT.ac", strreferid,"WT.ad","");
}
}

function openWindow3(url, w, h){//customizable size with standard tool bars, for pc points
window.name = "main";
Window3=window.open(url,'Window3','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+w+',height='+h+',top='+((clientH-h)/2)+',left='+((clientW-w)/2)); 
Window3.focus();
//window.alert(url.indexOf('http'));

if (url.indexOf('www.pcfinancial.ca')<= 0  && url.indexOf('preview.pcfinancial.ca')<= 0 && url.indexOf('http') >= 0) {

strreferid= dcsGetReferid(url);
dcsMultiTrack('DCS.dcsuri',url,'WT.ti','Offsite:'+url,"WT.os","1",'DCS.dcssip','Offsite', "WT.ac", strreferid,"WT.ad","");
}
}

function openWindow4(url, w, h){//auto scrolling, NOT resizable, for why join pop up
window.name = "main";
Window4=window.open(url,'Window4','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+w+',height='+h+',top='+((clientH-h)/2)+',left='+((clientW-w)/2)); 
Window4.focus();

if (url.indexOf('www.pcfinancial.ca')<= 0  && url.indexOf('preview.pcfinancial.ca')<= 0 && url.indexOf('http') >= 0) {
strreferid= dcsGetReferid(url);
dcsMultiTrack('DCS.dcsuri',url,'WT.ti','Offsite:'+url,"WT.os","1",'DCS.dcssip','Offsite', "WT.ac", strreferid,"WT.ad","");
}

}

function openWindowSdc(url, w, h, adname){//customizable size with standard tool bars, for pc points
window.name = "main";
Window3=window.open(url,'Window3','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+w+',height='+h+',top='+((clientH-h)/2)+',left='+((clientW-w)/2)); 
Window3.focus();

if (url.indexOf('www.pcfinancial.ca')<= 0  && url.indexOf('preview.pcfinancial.ca')<= 0 && url.indexOf('http') >= 0) {
strreferid= dcsGetReferid(url);
dcsMultiTrack('DCS.dcsuri',url,'WT.ti','Offsite:'+url,"WT.os","1",'DCS.dcssip','Offsite', "WT.ac", strreferid,"WT.ad","");
}
}