function popUpUrl(url, w, h)
{
	// calculate top left coordinates for centering pop up based on screen size and window size
	var l = (screen.width-(w+10))/2;
	var t = (screen.height-(h+90))/2;
	
	// ensure you're not going into negative
	if (t<0) {t=0;}
	if (l<0) {l=0;}

	// set pop-up window parameters
	var settings = 'height=' + h + ', width=' + w + ', top=' + t + ', left=' + l + ',' + 'titlebar=no, menubar=no, toolbar=no, status=yes, scrollbars=yes, resizable=no';

	// create the window and put it on top
	win = window.open(url, '', settings); 
	win.window.focus(); 
}

function popUpImage(title,img,w,h) {
	
	// calculate top left coordinates for centering pop up based on screen size and window size
	var l = (screen.width-(w+10))/2;
	var t = (screen.height-(h+90))/2;
	
	// ensure you're not going into negative
	if (t<0) {t=0;}
	if (l<0) {l=0;}
	
	// set pop-up window parameters
	var settings = 'height=' + h + ', width=' + w + ', top=' + t + ', left=' + l + ',' + 'titlebar=no, menubar=no, toolbar=no, status=yes, scrollbars=no, resizable=no';
	
	// create the window and put it on top
	newWin = window.open('', '', settings);
	
	// create the html and insert it into the window
  var page='<html><head><title>' + title + '</title></head><body style="margin: 0; padding: 0"><img src=' + img + '></body></html>';
  newWin.document.open();
  newWin.document.write(page);
  newWin.document.close();
	newWin.window.focus(); 
}

function clearDefaultandCSS(el)
{
	if (el.defaultValue==el.value) el.value = ""
	if (el.style) el.style.cssText = ""
	if (el.style) el.style.backgroundImage = "" 
}


