/*
Copyright Gary Fooks, all right reserved.
Used to load any child page into a parent frameset.
*/
	var childPage;

function superSizeMe(){
 if (window != null && window.width!=screen.availWidth)  {
  if (window.moveTo != null){
      window.moveTo(0, 0);
					}
  if (window.resizeTo != null) {
   if (screen.availWidth != null) {
       window.resizeTo(screen.availWidth, screen.availHeight);
       }else if (screen.width != null) {
       window.resizeTo(screen.width, screen.height);
       }else{
       window.resizeTo(fullscreen);
      }
    }
  }
}
	function getCookie(key){
 theCookie = '';
 if(document.cookie && document.cookie.indexOf(key) != -1){
  theCookie = document.cookie;
  theCookie = theCookie.substring(theCookie.indexOf(key),theCookie.length);
  if(theCookie.indexOf(';') != -1){
   theCookie = theCookie.substring(0,theCookie.indexOf(';'));
  }
  return theCookie;
 }
}
function getCookieVal(key){
 theCookie = getCookie(key);
 if(theCookie != '' && theCookie != null){
  theVal = theCookie.substring(theCookie.indexOf(key) + key.length + 1,theCookie.length);
  if(theVal.indexOf(delim) != -1){
   theVal = theVal.split(delim);
  }
  return theVal;
 } else {
  return '';
 }
}
function reFrame(){
	slash = '\/';
	//Vee: Added sniffer for my server and appropriate paths for testing locally
	//look in default.asp for error comments
	if (location.host.indexOf('p4')==-1){
	if (location.host.indexOf('www.')==-1)return location.href = (location.protocol+slash+slash+'www.'+location.host+location.pathname+location.search+location.hash);
	}
			try{parentPage}
			catch(e){parentPage=false;}
//			if (parentPage && !getCookieVal('intro')){return location.href='intro/';}
		if(self==top){
			superSizeMe();
	dance_junction = location.host=='p4'?'dj/htdocs/default.asp':'';
	if(location.search.length ==0 && !parentPage){
		reload = location.protocol+slash+slash+location.host+slash+dance_junction;
		path = location.pathname;
		location.replace(reload +'?'+path.substring(path.indexOf(slash)+1));
		} else if (location.search.length+1 >1 && parentPage){
	childPage = (location.host=='p4'?slash:'')+location.search.substring(1)+location.hash;
			}
		}
	}
reFrame();
var loaded;
function loadDoc(){
	loaded=true;
return	(childPage)?window.document.getElementById("Content_Frame").src=childPage:'';
}


