var imgResizeMsg = 'اضغط على هذه الصورة المصغرة لمشاهدتها بحجمها الأصلي';
var imgWidthMax = 600;
var imgWidthSizeTo = 400;
var imgClassName = 'imglimit';
window.onload = fiImageResize;

function fiImageResize() {
if (document.images.length) {
var docImg = document.images;
   for ( var i = 0 ; i < docImg.length ; i++)
      if (docImg[i].width > imgWidthMax && docImg[i].id != 'forumlogo') {
         docImg[i].width = imgWidthSizeTo;
         docImg[i].title = imgResizeMsg;
         docImg[i].className = imgClassName;
         docImg[i].onclick = fiImageWinOpen;
      }
   }
}

function fiImageWinOpen(e) {
	if( window.event )
	   window.open(window.event.srcElement.src,'PoliticsViewer','menubar=no, toolbar=no, location=no, directories=no, fullscreen=no, titlebar=yes, hotkeys=no, status=no, scrollbars=yes, resizable=yes');
	else
	   window.open(e.target.src,'PoliticsViewer','menubar=no, toolbar=no, location=no, directories=no, fullscreen=no, titlebar=yes, hotkeys=no, status=no, scrollbars=yes, resizable=yes');
}
	
