// Ken Brown July 24th, 2009 - CSMicro Systems
var out = '<iframe id="pIFrame" style="border:0px solid #ffffff" src ="%URL%" width="100%" height="100%" frameborder=”0″ scrolling=”auto”><p>Your browser does not support iframes.</p></iframe>';
var url ='http://www.strictlyscubadiveboat.com/divecharters';


var qsParm = new Array();
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
var pos = parms[i].indexOf('=');

if (pos > 0) {
var key = parms[i].substring(0,pos);
var val = parms[i].substring(pos+1);
qsParm[key] = val;
}}

//Check to See if Show all was specified
var ShowAll = 0;
if (qsParm['ShowAll'] == '1'){
ShowAll= 1;}

//Get Parent Div Tag
var parentDivTag = document.getElementById('element33');
if (parentDivTag){
	
	//Output the page
	switch(qsParm['PageID'])
	{
		case "directions":
		url = url+'/directions.php';
		parentDivTag.style.height = '1500px';
		break;
		
		case 'calendar':
		url = url+'/Calendar.php';
		parentDivTag.style.height = '3500px';
		break;
		
		case 'policies':
		url = url+'/policies.php' ;
		parentDivTag.style.height = '1000px';
		break;
		
		case 'testimonials':
		url = url+'/testimonials.php' ;
		parentDivTag.style.height = '1000px';
		break;
		
		case 'gallery':
		url = 'http://www.strictlyscubadiveboat.com/PhotoGallery/index_old.php?level=collection&id=2' ;
		parentDivTag.style.height = '1000px';
		break;

		case '3':
		url = url+'/indexCal.php?PageID=LIST&ShowAll=' + ShowAll;
		parentDivTag.style.height = '2000px';
		break;
		
		default: 
		url = url+'/indexCal.php?PageID=3Cal&ShowAll=' + ShowAll;
		parentDivTag.style.height = '1200px';
		break;

	}
	
	}
if (!parentDivTag){
	//We are on the class Page
	parentDivTag = document.getElementById('element74');
	url = 'http://www.strictlyscubadiveboat.com/classcalendar/index_old.php'
	parentDivTag.style.height = '900px';
	
}

	

//Write IFrame
document.write(out.replace('%URL%',url));


function SetHeight(height){
	var parentDivTag = document.getElementById('element33');
	parentDivTag.style.height = '1500px';
	var parentIFrameTag = document.getElementById('element33');
	
	}
