function newwindow(domain)
{
	website_window=window.open(domain, 'website_window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=600,height=600');
	website_window.focus();
}

function core_popup(domain, w)
{
	website_window=window.open(domain, 'website_window', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+w+', height=600');
	website_window.focus();
}


function newwindow_max(domain)
{
	website_window=window.open(domain, 'website_window','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes');
	website_window.focus();
}

function in_array(needle, haystack, strict) {
	var found = false, key, strict = !!strict;

	for(key in haystack) {
		if((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) {
			found = true;
			break;
		}
	}
	return found;
}

function getCookie ( cookie_name ) {
    var results = document.cookie.match ( cookie_name + '=(.*?)(;|$)' );
    if (results) {
        return ( unescape ( results[1] ) );
    } else {
        return null;
    }
}

function setCookie (name, value, seconds) {
    var date = new Date();
    date.setTime(date.getTime() + (seconds*1000));
    var expires = "; expires=" + date.toGMTString();
    document.cookie = name+"="+value+expires+"; path=/";
}
