//	openWindow.js
//	function openNewWindow - opens pop up window
//	author	ari rizos	www.webology.net.au	info@webology.net.au

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}

//	add the following code for the links
// javascript:openNewWindow('url.htm', 'fashion','height=400, width=313, toolbar=no, scrollbars=no')

function openCenterWindow(URLtoOpen,windowname, width,height) {
    x = (640 - width)/2, y = (480 - height)/2;

    if (screen) {
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }

    window.open(URLtoOpen, windowname ,'toolbar=no, scrollbars=yes, width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
}

var mainsite = "";
function openMainSite(URLtoOpen, windowName, width,height) {
	if (!mainsite.closed && mainsite.location)
	{
		mainsite.focus();
	}
	else
	{
		y = (screen.availHeight - height)/2;
     	x = (screen.availWidth - width)/2;
    	mainsite = window.open(URLtoOpen, windowName ,'toolbar=no, scrollbars=no, width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
		mainsite.focus();		
	
	}
}

// javascript:openCenterWindow('url.htm','name', width, height')


function birthdaysale(URLtoOpen,windowname, width,height) {
    x = (640 - width)/2, y = (480 - height)/2;

    if (screen) {
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }

    window.open("birthdaysale.html", birthdat ,'toolbar=no, scrollbars=yes, width='+515+',height='+376+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
}
