//Script pour le popup Menu

	function setStyleElement(elementID, color) {
		document.getElementById(elementID).style.backgroundColor = color;
	}
	
	function searchInComment(searchFilter, searchItem, divResult, lng){
	
		if (searchItem != '') {
			request_send('SVIEWe1057ca6e70c8e295117e05c3161f3fb','filter=likespace(' + searchFilter + ',' + searchItem + ')|egal(COMNT_VIEW, 1)|notegal(COMNT_GLOBALID,donotdelete)', divResult,'divWarning');
		} else {
			if (lng = "EN")
				alert('Please enter a search criteria');
			else
				alert('Veuillez entrer un critère de recherche');
		}
	
	}
	
	function searchInPoll(searchItem, divResult, searchField) {
		
		if (searchItem != '')
			request_send('SVIEW4a8e51350f02705cdfa67141f3bd3fe0','filter=likespace(' + searchField + ',' + searchItem + ')','' + divResult + '','divWarning','' + divResult + '');

	}
	

function getLargeScreenShot(id, def)
{
 var _docHeight = Math.max(document.documentElement.clientHeight, document.documentElement.scrollHeight);
 var _docWidth = (document.width !== undefined) ? document.width : document.body.offsetWidth;
 
 if(window.innerHeight > _docHeight){ _docHeight = window.innerHeight;}
 
 if(document.getElementById('promptBg') == null)
 {
	 promptBg = document.createElement('div');
	 promptBg.id = 'promptBg';
	 promptBg.className = 'promptBg';
	 document.getElementsByTagName('body').item(0).appendChild(promptBg);
 }

 promptBg.style.height = _docHeight + 'px';
 promptBg.style.width = _docWidth + 'px';
 promptBg.style.display = 'block';

 if(document.getElementById('myPrompt') == null)
 {
	 myPrompt = document.createElement('div');
	 document.getElementsByTagName('body').item(0).appendChild(myPrompt);
 }
 
 myPrompt.innerHTML = '';
 myPrompt.id = 'myPrompt';
 promptHTML = '';
 promptHTML += '<div>';
 promptHTML += '<h3 style="width: 100%; text-align: center; height: 25px">' + def + '</h3>';
 promptHTML += '<a href="javascript:closePrompt();" title="Click to close this dialogue"><img style="border: 2px solid black" src="images/screenshots/poll/screen_shot_' + id + '_poll.png" width="900" height="725"/></a>';
 promptHTML += '</div>';
 myPrompt.innerHTML = promptHTML;
 myPrompt.className = 'screenShots';

 var vscroll = (document.all ? document.documentElement.scrollTop : window.pageYOffset);
 var clientHeight = (document.all ? document.documentElement.clientHeight : window.innerHeight);

 var h = ((clientHeight/2) - 350);
 myPrompt.style.top = (h + vscroll) + "px";

 myPrompt.style.left = ((_docWidth-800)/2) +"px";
 myPrompt.style.display = 'block';
 myPrompt.style.position = 'absolute';
}

function closePrompt()
{
 promptBg.style.display = 'none';
 myPrompt.style.display = 'none';
 myPrompt.innerHTML = '';
}
