function NewWindow(thepage, thename, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(thepage, thename, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	return false;
}
function rotateImg(main,newimg){
	var MainImg = document.getElementById(main);
	var regExp = new RegExp(/&w=(\d)*&h=(\d)*/i);
	
	var getMainDimensions =	MainImg.src.match(regExp);		// gets the width/height of main
	var getOldDimensions = newimg.match(regExp);		// get the width and height of highlighted image

	var getnewURL = newimg.replace(getOldDimensions[0],getMainDimensions[0]);  //this replace original php_thumb width/hieght with main width/height
	MainImg.src = getnewURL;
}
function Subscribe(){
		$('#dialogSubscribe').load('/newsletter/');
		$('#dialogSubscribe').jqmShow();
		return false;
}