

// joomla reference link
// <script type="text/javascript" src="<?php echo $this->baseurl; ?>/templates/system/scripts/ppwd-script.js"></script>
//==================================================
//
//<a href="popupex.html" onclick="return popitup('popupex.html')">Link to popup</a>
//
//=========================================================
//window.open('URL', 'NAME', 'FEATURES', 'REPLACE')
//<a href="javascript:void(0)" onclick="window.open('welcome.html','Welcome Popup', 'height=600, width=800, ')">Open a new window</a>


function popitup(url) {
	newwindow=window.open(url,'popup','height=600,width=800,resizable=yes,toolbar=no,titlebar=no,location=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

var x = document.getElementsByTagName('a');
for (var i=0;i<x.length;i++) {
	if (x[i].getAttribute('type') == 'popup') {
		x[i].onclick = function () {
			return pop(this.href)
		}
		x[i].title += ' (Popup)';
	}
}

function popitup2() {
	newwindow2=window.open('','name','height=200,width=150');
	var tmp = newwindow2.document;
	tmp.write('<html><head><title>popup</title>');
	tmp.write('<link rel="stylesheet" href="js.css">');
	tmp.write('</head><body><p>this is once again a popup.</p>');
	tmp.write('<p><a href="javascript:alert(self.location.href)">view location</a>.</p>');
	tmp.write('<p><a href="javascript:self.close()">close</a> the popup.</p>');
	tmp.write('</body></html>');
	tmp.close();
}

function mypopup(url)
{
    mywindow = window.open( url, "mywindow", "location=no,menubar=no,status=no,scrollbars=no,width=800, height=600,resizable=yes,toolbar=no,titlebar=yes,screenX=400,screenY=200");
}


/*Option 	Values 	Description 	Version
location 	yes|no 	Does the location bar show? 	ver 1.0
menubar 	yes|no 	Does the menubar show? 	ver 1.0
scrollbars 	yes|no 	Do scrollbars show? 	ver 1.0
status 	yes|no 	Does the status bar show| 	ver 1.0
titlebar 	yes|no 	Does the titlebar show? 	ver 1.0
toolbar 	yes|no 	Does the toolbar show? 	ver 1.0
resizable 	yes|no 	Can you resize the window? 	ver 1.0
height 	pixels 	height of window 	ver 1.0
width 	pixels 	width of window 	ver 1.0
directories 	yes|no 	Does the personal toolbar show? 	ver 1.2
*/


