
	
	
Experience.prototype = new TabNav();
Experience.prototype.constructor=Experience;
function Experience(){
	this.projcode;
	this.contentDiv;
	this.country;
	
} // end object

	Experience.prototype.open = function(country, projcode) {
		this.projcode = (projcode) ? projcode : "";
		this.country = (country) ? country : "";
		this.contentDiv = CDA.find("divContentArea");
		this.load("maintab");
			
	} // end method
	
	Experience.prototype.showPopup = function(querystring) {

		var popup = new DivPopup(650, 400);
		popup.show();
	
		var div = document.createElement("div");
		div.className="padded";
		popup.contentDiv.appendChild(div);
		var nestedIFrame = new IFrameElem();		
		nestedIFrame.iframeId="ifmExperience";
		nestedIFrame.parent = div;	
		nestedIFrame.makeIFrame();
		nestedIFrame.iframeSrc = "nested_experience.php?"+querystring;
		
		nestedIFrame.show();
		popup.addContent();
	} // end method
	
	Experience.prototype.showCaseStudy = function() {
		
		this.clearContent();
		var dt = new CaseStudy( this.projcode, "datatable_experience", false, this.country);
		dt.iframeId = "ifmCaseStudy"
		dt.showActivity=false;
		dt.parent = this.contentDiv;
		dt.show();	
	} // end method
	
	Experience.prototype.showWorkshop = function() {
		this.clearContent();
		//Event(projcode, showType, showIntro, expiredOnly, country)
		var dt = new Event( this.projcode, "workshop", false, true, this.country );
		dt.iframeId = "ifmWorkshop"
		
		dt.showActivity=false;	
		dt.parent = this.contentDiv;		
		dt.show();
		    
	} // end method
	
	Experience.prototype.showFieldWork = function() {
		this.clearContent();
		//Event(projcode, showType, showIntro, expiredOnly, country)
		var dt = new Event( this.projcode, "other", false, true, this.country );
		dt.iframeId = "ifmWorkshop";
		dt.showActivity=false;	
		dt.parent = this.contentDiv;		
		dt.show();
	} // end method
	
	//**************************************************************************************
	// Method:		Override getEvalJsFunc().  Sets function calls to be evaluated on tab click
	// Returns:		Null
	Experience.prototype.getEvalJsFunc = function(anchorLoopIndex) { // method override
		
		switch (anchorLoopIndex) {
			case 0:
				return "CDA.Experience.showCaseStudy()";
								
			case 1: 
				return "CDA.Experience.showWorkshop()";
								
			case 2: 
				return "CDA.Experience.showFieldWork()";
			default:
				break;
		
		} // end switch
		return null;
	} // end override
		

if(!window.CDA) {
	CDA=new Object();
} // end if

if(!window.CDA.Experience) {
	CDA.Experience=new Experience();
} // end if