//to divaki einai edo re!!!!
function CreateDynFrame(divName, pageLocation)
{
    var divContainer = document.getElementById(divName);

    if(divContainer!=null)
    {
			//xtra pedio gia na epanaferei to arxiko pedio tou div
			divContainer.style.width=400;
			divContainer.style.left=-64;
			divContainer.style.display='none';
	    
	    var dynFrame = document.getElementById('iframeMain');
	    
	    if(dynFrame!=null)
	    {
	    	dynFrame.src = pageLocation;
	    	dynFrame.style.display='';
	    }
	    
	    divContainer.style.display='';
		}
}

//apo edo gia na alazei to width --
function ResizeDiv(divName)
{
   var divContainer = document.getElementById(divName);
    
    if(divContainer!=null)
	{
		divContainer.style.width=730;
		divContainer.style.left=-380;
	}
}
// end 

// gia hide to div--
function HideDiv(divName)
{
    var divContainer = document.getElementById(divName);
    
    if(divContainer!=null)
       divContainer.style.display='none';
}

function SetDynFrameLink(pageLocation, isTop)
{
	var dynFrame = (isTop == true)?top.document.getElementById('iframeMain'):document.getElementById('iframeMain');
	
	if(dynFrame!=null)
		dynFrame.src = pageLocation;	
}

function ImagePopup(url)
{
	  var popupWin=window.open('','','titlebar=no,location=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,hotkeys=no');
	  var docHTML;

	  docHTML  = "<html><head><title></title><script language='javascript'>";
	  docHTML += "var NS = (navigator.appName=='Netscape')?true:false;";
	  docHTML += "function ResizePicture() {iWidth = (NS)?window.innerWidth:document.body.clientWidth;";
      docHTML += "iHeight = (NS)?window.innerHeight:document.body.clientHeight;";
      docHTML += "iWidth = document.images[0].width - iWidth;";
      docHTML += "iHeight = document.images[0].height - iHeight;";
      docHTML += "window.resizeBy(iWidth, iHeight);";
      docHTML += "self.focus();}</";
      docHTML += "script></head>";
      docHTML += "<body topmargin='0' leftmargin='0' marginwidth='0' margineight='0' onload='ResizePicture();'>";
      docHTML += "<script language='javascript'>document.write('<img src=";
      docHTML += '"';
      docHTML += url;
      docHTML += '"';
      docHTML += " border=0>');</";
      docHTML += "script></";
      docHTML += "body></";
      docHTML += "html>";

		  popupWin.document.open();
		  popupWin.document.write(docHTML);
		  popupWin.document.close();
}

function VideoPopup(url)
{
	  var popupWin=window.open('','','titlebar=no,location=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,hotkeys=no,width=425,height=344');
	  var docHTML;

	  docHTML  = "<html><head><title></title></head>";
      docHTML += "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" margineight=\"0\" onload=\"ResizePicture();\">";
      docHTML += "<object width=\"425\" height=\"344\"><param name=\"movie\" value=";
      docHTML += '\"';
      docHTML += url;
      docHTML += '\"';
      docHTML += "></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=";
      docHTML += '\"';
      docHTML += url;
      docHTML += '\"';
      docHTML += " type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>";
      docHTML += "</ body></html>";

		  popupWin.document.open();
		  popupWin.document.write(docHTML);
		  popupWin.document.close();
}
