﻿	function openNewWindow(width,height,top,left,TBar,location,StatusBar,menu,scroll,resize,name,url) {//v1.0

		var windowProperties='';

		// Toolbar visible
		if(TBar==false) windowProperties+='toolbar=no,';
		 	else windowProperties+='toolbar=yes,';

		// Show Location bar
		if(location==false) windowProperties+='location=no,'; 
			else windowProperties+='location=yes,';

		// Status Bar visisble
		if(StatusBar==false) windowProperties+='status=no,';
			else windowProperties+='status=yes,';

		// Menubar visible
		if(menu==false) windowProperties+='menubar=no,';
			else windowProperties+='menubar=yes,';

		//Allow Scrollbars
		if(scroll==false) windowProperties+='scrollbars=no,';
			else windowProperties+='scrollbars=yes,';

		//Allow Resize
		if(resize==false) windowProperties+='resizable=no,';
			else windowProperties+='resizable=yes,';

		// Set top
		if(top!="") windowProperties+='top='+top+',';

		// Set left
		if(left!="") windowProperties+='left='+left+',';

		// Set width
		if(width!="") windowProperties+='width='+width+',';

		// Set height
		if(height!="") windowProperties+='height='+height;

		// Build string to send to open method
		if(windowProperties!="") {
			if(windowProperties.charAt(windowProperties.length-1)==',') 
	  		windowProperties=windowProperties.substring(0,windowProperties.length-1);
	 		}

		// Open the window
		window.open(url,name,windowProperties);
	}
