/* 1a test template
 * requires:
 * jquery.js
 * player_test_template.js
 * iliustraData.js
 */

console.log('> template6a.js is iniciated;');

function template6ascript() {
	console.log("function template6ascript(); sectionName=" +sectionName + "; slideName=" +slideName);
	 
    tObj = getObject();
        
	var mainVars = initMainVars(tObj,sectionName,slideName);
	var tO = mainVars.tO;          
        	
    if (tO['background']) {
		loadSlideBackground();
	}
        
	var p = {	// properties
		step : 124,		// it is a step for each text, radio, checkbox, check items
		photo:{
			css	:{
				'width'	:'300px',
				'height':'262px',
				"z-index": "7",
				"float": "right",
				"margin-right": "43px",
				"margin-top": "0px"
			}
		},
		text:{
			top  : 185,
			css	:{
				"position":"absolute",
				'width':'984px',
				'height':'116px',
				'left' : '145px',
				"z-index": "7",
				'text-indent':'0px',
				'font-family':'Arial',
				'font-size': '24px',
				'text-align':'left',
				'line-height': '33px'
			}
		}
	}	
	
	var zIndexChange=20;
	
	var text_top = 185;
	
	//  get true - correct ; or falls - incorrect
	this.checkAnswer = checkTestAnswer_6a;
	// check buttton and function to check	
        
        //console.log("question:",tO);
    checkTestButton(this.checkAnswer,tO,p);

	appendQuestion(ssId, ss, tO);
	
	if ((tO.photo != '') && (tO.photo != null)) {
		append_photo_3e(tO.photo,p);
		$(ssId+'txt_frame').css({'width': '738px', 'height': '321px'});
	}
	
	appendFreeAnswer(ssId, ss, tO);
	
	if (tO.answer[0].indexOf('--') == 0) {
		$(ssId + 'freeanswer').css('height', '30px');
	}
	
	$(ssId + 'freeanswer').css('resize', 'none');
	
	var free_bottom = $(ssId + 'freeanswer').position().top + $(ssId + 'freeanswer').outerHeight() + 40;
	
	normalize_height(free_bottom);
}
