// function for opening a new browser with a name and all the functionnalities

function OpenNewBrowserWithName(strURL, strName, intWidth, intHeight){

	var newWindow;

	

	newWindow = window.open(strURL,strName,'left=100,top=100,width='+intWidth+',height='+intHeight+',resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes');

	newWindow.focus();

}



// function for opening a new browser with a name and without all the functionnalities

function OpenNewWindowWithName(strURL, strName, intWidth, intHeight){

	var newWindow;

	

	newWindow = window.open(strURL,strName,'left=100,top=100,width='+intWidth+',height='+intHeight+',resizable=no,scrollbars=yes,menubar=no,toolbar=no,location=no,status=no');

	newWindow.focus();

}



// function for opening a new browser with all the functionnalities

function OpenNewBrowser(strURL, intWidth, intHeight){

	window.open(strURL,'','left=100,top=100,width='+intWidth+',height='+intHeight+',resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes');

}



// function for opening a new browser without all the functionnalities

function OpenNewWindow(strURL, intWidth, intHeight){

	window.open(strURL,'','left=100,top=100,width='+intWidth+',height='+intHeight+',resizable=no,scrollbars=yes,menubar=no,toolbar=no,location=no,status=no');

}



//function for opening a pop-up window with a close button

function PopWindow (strTitle, strText, strButtonText, showMenubar, showToolbar, showLocation, showStatus){

	var openedWindow;

	var strFinalText;

	var strOptions;

	var strMenubar = '';

	var strToolbar = '';

	var strLocation = '';

	var strStatus = '';

	

	if (showMenubar) strMenubar = ',menubar=yes';

	if (showToolbar) strToolbar = ',toolbar=yes';

	if (showLocation) strLocation = ',location=yes';

	if (showStatus) strStatus = ',status=yes';

	

	strOptions = strMenubar + strToolbar + strLocation + strStatus;

	

	openedWindow = window.open('','popup1','left=100,top=100,width=300,height=200,resizable=no,scrollbars=no' + strOptions);

	

	strFinalText = '<html>\n<head>\n<title>' + strTitle + '</title>\n</head>\n<body>\n' + strText;

	strFinalText += '\n<form>\n<center>\n';

	strFinalText += '<input type="button" onclick="window.close();" value="' + strButtonText + '">'

	strFinalText += '\n</center>\n</form>\n</body>\n</html>';

	

	openedWindow.document.write(strFinalText);

}


