// JavaScript Document
var doOnce=0;
function loadIframe(theURL) {
	document.getElementById("mainFrame").src = theURL;
}
function checkURL(){
	if(doOnce!=1)
	{
		fullurl = location.href;
		if(fullurl.indexOf('#')!=-1){		
			subURL = fullurl.substring(fullurl.indexOf('#')+1, fullurl.length);
			loadIframe('http://www.pokerroommate.com/archives/green/'+subURL);
		}
		else
		{
			loadIframe('main.htm');
		}			
		doOnce=1;	
	}
}
function checkFrame(){
	if ((top != self.parent) || (top == self)) { 
		var fullurl = location.href;
		fullurl="http://www.pokerroommate.com/archives/green/index.htm#"+fullurl.substring(fullurl.indexOf('pokerroommate.com/archives/green/')+33,fullurl.length);
		top.location=fullurl; 	
	}
}
function autofitIframe(id){
	if (!window.opera && !document.mimeType && document.all && document.getElementById){
		parent.document.getElementById(id).style.height=this.document.body.offsetHeight+"px";
	}
	else if(document.getElementById) {
		parent.document.getElementById(id).style.height=this.document.body.scrollHeight+"px"
	}
}
