function openWindow(url,width,height,resize,scroll) {
    x = (640 - width)/2, y = (480 - height)/2;

    if (screen) {
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }

	if (screen.availWidth > 1800) { 
		x = ((screen.availWidth/2) - width)/2; 
    } 
	return window.open(url,'newWin','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable='+resize+',scrollbars='+scroll+',menubar=no,status=no');
	//return window.open(url,'newWin','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable=yes,scrollbars=yes,menubar=yes,status=yes');
}

function loginScreen() {
	// open login screen for extranet
	var url = "http://www.youngwilliams-css.com/extranet/login.asp";
	var returnValue = openWindow(url,'425','300'); //use regular window to allow user to leave note open
	returnValue = null;
}

function GTMScreen() {
	// open login screen for extranet
	var url = "http://www.youngwilliams-css.com/gotomeeting.asp";
	var returnValue = openWindowGTM(url,'800','400','yes','yes'); //use regular window to allow user to leave note open
	returnValue = null;
}

function openWindowGTM(url,width,height,resize,scroll) {
    x = (640 - width)/2, y = (480 - height)/2;

    if (screen) {
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }

	if (screen.availWidth > 1800) { 
		x = ((screen.availWidth/2) - width)/2; 
    } 
	return window.open(url,'newWin','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable='+resize+',scrollbars='+scroll+',menubar=yes,status=yes,toolbar=yes,buttonbar=yes,location=yes');
	//return window.open(url,'newWin','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable=yes,scrollbars=yes,menubar=yes,status=yes');
}
