
//************************************************************************
//THIS WILL CONTAIN COMMON FUNCTIONS
//************************************************************************

function jsShowModalWindow(url,destinationControl, dialogWidth, dialogHeight)
{
	//open the popup screen
	var retval = window.showModalDialog(url, null,'dialogWidth:' + dialogWidth +'px;dialogHeight:'+ dialogHeight +'px;resizable=1;');

	//check if not null
	if(retval == 0 || (retval !="" && retval !=null))
	{
		document.getElementById(destinationControl).value = retval;
	}
		
}
function jsOpenWindow(url,windowName,settings) {
	var newwindow = window.open(url,windowName,settings);
	newwindow.focus()
}

function JSOpenWindow(url)
{
	window.open(url);
}

function jsEmail(Mail, SiteName)
{
	location.href ="mailto:?subject="+SiteName+"&body="+Mail;
}
var CBModalWindow
function showCBModalWindow(url,destinationControl, dialogWidth, dialogHeight) {
	//open the popup screen
	var CBModalWindow = window.open(url, null,'dialogWidth:' + dialogWidth +'px;dialogHeight:'+ dialogHeight +'px;resizable=1;');

	//check if not null
	if(CBModalWindow == 0 || (CBModalWindow !="" && CBModalWindow !=null))
	{
		document.getElementById(destinationControl).value = CBModalWindow;
	}
}
function checkForModal() {
	if (CBModalWindow!='undefined' && CBModalWindow.closed == false) {
		CBModalWindow.focus();
	}
}
//window.onFocus = checkForModal;

