﻿//© 2004 - 2007 ActiveModules, Inc. All Rights Reserved

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}else{
	    var expires = "";
	}
	document.cookie = name+"="+value+expires+"; path=/";
}
function setfocus() {
    document.getElementById('amLogin_ctl01_UserName').focus();        
}
function getBrowserSize() {
    if (navigator.appName.indexOf("Microsoft")!=-1) {
        var winW = document.body.offsetWidth;
        var winH = (document.body.offsetHeight - 5);
    }else{
        var winW = window.innerWidth;
        var winH = window.innerHeight;
    }

    createCookie("crmWidth",(winW - 181), 30);
    createCookie("crmHeight",(winH - 27), 30);
}
