// 820
var camcntr = {

	'baseurl': '/camcenter/index.php',
	'winW': 1014,
	'winH': 758,

	requestCCntr: function(e){

		this.verifyCCntr();

	},

	verifyCCntr: function(){

		if(!this.win){

			this.openCCntr();

		} else {

			try{
				if(!this.win.holdvar){
					this.openCCntr();
				} else {
					this.win.focus();
					return true;
				}
			}
			catch(e) {
				this.openCCntr();
			}

		}

	},

	openCCntr: function(e){

		if(!e){

			e = this.baseurl + '#start';

		} else {

			e = this.baseurl + '#' + e;

		}

		try{

			this.win = window.open(e, 'ccntr', 'width=' + this.winW + ', height=' + this.winH);
			this.win.holdvar = 'open';

			this.win.windowWidth = this.winW;
			this.win.windowHeight = this.winH;

		} catch(e){

			alert('You must allow the opening of pop-up windows on Camnation.com to access this area.');

		}
	},

	redirCCntr: function(e){

		this.verifyCCntr();
		this.win.document.location.href = e;

	},

	loadUser: function(e){
		this.redirCCntr(this.baseurl + '#' + e);
		this.win.focus();
	}

}

function doChatOpen(cnID){

	camcntr.openCCntr(cnID);

}