function popup(url, width, height)
{
    var winl     = (screen.width) ? (screen.width - width) / 2 : 0;
    var wint     = (screen.height) ? (screen.height - height) / 2 : 0;
    var settings = 'left='+winl+',top='+wint+',width='+(width+40)+',height='+(height+40)+',toolbar=no,menubar=no,status=yes,scrollbars=yes,resizable=yes';
    var myimgss  = window.open(url, 'imgpoint', settings);
    myimgss.focus();
}

function popup2(url, width, height)
{
    var winl     = (screen.width) ? (screen.width - width) / 2 : 0;
    var wint     = (screen.height) ? (screen.height - height) / 2 : 0;
    var settings = 'left='+winl+',top='+wint+',width='+width+',height='+height+',toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no';
    var myimgss  = window.open(url, 'imgpoint', settings);
    myimgss.focus();
}

function cookieSet(name, value, days)
{
    var date = new Date();
	if (days) {
		date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
	} else {
	    date.setFullYear(date.getFullYear() + 10);
	}
	
	var expires = '; expires='+date.toGMTString();
	var cookie = name+'='+value+expires+'; path=/';
	document.cookie = cookie;
}

function cookieGet(name)
{
	var nameEQ = name + '=';
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function cookieDelete(name)
{
	createCookie(name, '', -1);
}

function changeCurrency(list)
{
    var currency = list.options[list.selectedIndex].value;
    cookieSet('currency', currency, 365);
    document.location.reload();
}