// #### BEG PAGE DIMENSIONS FUNCTIONS ################################################################
//
// (these find the inner page height and width - UPDATED 2008 LAWL)
function actualInnerWidth() {
	// all except Explorer
	if (self.innerWidth) {
		return self.innerWidth;
	}
	// Explorer 6 Strict Mode
	else if (document.documentElement && document.documentElement.clientWidth) {
		return document.documentElement.clientWidth;
	}
	// other Explorers
	else if (document.body) {
		return document.body.clientWidth;
	}
	// ghey
	else if (document.body) {
		return (null);
	}
}

function actualInnerHeight() {
	// all except Explorer
	if (self.innerHeight) {
		return self.innerHeight;
	}
	// Explorer 6 Strict Mode
	else if (document.documentElement && document.documentElement.clientHeight) {
		return document.documentElement.clientHeight;
	}
	// other Explorers
	else if (document.body) {
		return document.body.clientHeight;
	}
	// ghey
	else if (document.body) {
		return (null);
	}
}

function actualOuterWidth() {
	if (window.outerWidth != null)
		return window.outerWidth;
	if (document.body.offsetWidth != null)
		return document.body.offsetWidth;
	return(null);
}

function actualOuterHeight() {
	if (window.outerHeight != null)
		return window.outerHeight;
	if (document.body.offsetHeight != null)
		// COMPLETE AND TOTAL HACK -- IE 7 WAS BEING A PISSER
		var winHeight = ((document.body.offsetHeight) + (38));
		return winHeight;
	return(null);
}
// #### END PAGE DIMENSIONS FUNCTIONS ################################################################

// #### BEG CARLACTION FUNCTIONS ################################################################
//
// (pops up various windows)
function carlCamRemote(url, name) {
	CarlCamWindow = window.open(url,name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,width=350,height=290');
	CarlCamWindow.location = url;
}

function CarlCastRemote(url, name) {
	CarlCastWindow = window.open(url,name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,width=350,height=470');
	CarlCastWindow.location = url;
}

function insultRemote(url, name) {
	CarlCastWindow = window.open(url,name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,width=620,height=480');
	CarlCastWindow.location = url;
}

function picPop(picDirectory, picIndex){
	// Open new window
	PicBrowserWindow = window.open('/pics/browser.php?pics='+ picDirectory +'&pic='+ picIndex +'&xDiff=0&yDiff=0','Boing','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,resizable=1,width=420,height=520');
 	PicBrowserWindow.location = '/pics/browser.php?pics='+ picDirectory +'&pic='+ picIndex +'&xDiff=0&yDiff=0';
}

function windowClose() {
	self.close();
}

// #### END CARLACTION FUNCTIONS ################################################################
