function setImage(strLabel, small, medium, large, title, imgX, imgY) {
	var maxWidth = 350;
	var maxHeight = document.getElementById('ctd-small').offsetHeight-30;
	var ratio = 0;

	if(imgX > imgY)
    ratio = (maxWidth / imgX) 
  else 
    ratio = (maxHeight / imgY) 
	
	var newWidth, newHeight;
	newWidth = Math.round(imgX*ratio);
	newHeight = Math.round(imgY*ratio);
	
//	alert(ratio)
//	alert(newWidth + ' - ' + newHeight);
	
  var img = parent.document.images('imgpreview');
  img.src = '/sizeXY/' + newWidth + '/' + newHeight + '/assets/' + small;
  img.alt = "";
  var imgLbl = parent.document.getElementById('imgpreviewlbl');
  imgLbl.innerHTML = strLabel;
  parent.setPaths(small, medium, large, title)
}

function getPrintHTML(){
	document.getElementById('printHTML').innerHTML = opener.document.getElementById('container').innerHTML;
}

function openPrintPage(){
 	var newwin=window.open('/print.html','print','width=474,height=450,scrollbars=yes,resizable=yes,menubar=no');
 	newwin.focus();
}

// mail page to someone (from Vnumedia Marketing Website)

function sendMainContent(){
	tempContainer.location='/sendcontent'+currentMenuURI;
}

function submitEmailPageHTML(){	
	document.emailpageform.page=document.getElementById('container').innerHTML; 
	document.emailpageform.pageref.value=location;	
	document.emailpageform.submit();
}

function submitEmailPage(){	
	parent.document.emailpageform.page.value=document.getElementById('maincontentFrame').innerHTML;
	parent.document.emailpageform.pageref.value=parent.location;	
	parent.document.emailpageform.submit();
}

function show_answer(x) {
//    alert('answer_' + x);
//    alert(document.getElementById('answer_' + x).style.display);
    if (document.getElementById('answer_' + x).style.display == 'none') {
        document.getElementById('answer_' + x).style.display = 'block'; 
       // document.getElementById('question_' + x).type = 'disc'; 
    } else {
        document.getElementById('answer_' + x).style.display = 'none'; 
       // document.getElementById('question_' + x).type = 'circle'; 
    }
}



