var scrnW ;
var scrnH ;
var bdyW ;
var bdyH ;

function wygEdit(docid,catid) {
	wygwindow = window.open ("/members/docedit.php?docid="+docid+"&catid="+catid,  "wygwin","directories=yes,location=yes,status=1, scrollbars=1, width=800, height=900, top=6, left=6");
}
function setCookie(c_name,value,expiredays) {
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString()) + ";path=/;domain=ecomdelta.com" ;
}

function initDisplayVars() {
	scrnW = screen.availWidth ;
	setCookie("scrnW",scrnW,365);
	
	scrnH = screen.availHeight ; 
	setCookie("scrnH",scrnH,365);
	
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    bdyW = window.innerWidth;
	    bdyH = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    bdyW = document.documentElement.clientWidth;
	    bdyH = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    bdyW = document.body.clientWidth;
	    bdyH = document.body.clientHeight;
	  }
	setCookie("bdyW",bdyW,365);
	setCookie("bdyH",bdyH,365);
}

function skinChanger(sVar) {
//	alert('Changing Skin to: '+ sVar) ;
	var currentLoc = document.location.href.split('&skin=') ;
	document.location.href = currentLoc[0] + '&skin=' + sVar
}
