
var popWin = null;

function ImagePopupWithoutScroll(URL, NAME, WD, HG){

	if(WD==0){WD = 250;}
	if(HG==0){HG = 80;}

	WD = WD+50;
	HG = HG+60;

	xpos = (window.screen.width-WD)/2;
	ypos = ((window.screen.height-HG)/2)-40; 

	popWin = window.open('',NAME,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width='+WD+',height='+HG+',left='+xpos+',top='+ypos+',screenx='+xpos+',screeny='+ypos+',resizable=0');

//	if (popWin && popWin.open && !popWin.closed) {

	popWin.document.writeln('<HTML>');
	popWin.document.writeln('<HEAD>');
	popWin.document.writeln('<TITLE>VEGAcom Kft.</TITLE>');
	popWin.document.writeln('<LINK HREF="http://www.vegacom.hu/vegacom.css" REL="stylesheet" TYPE="text/css">');
	popWin.document.writeln('</HEAD>'); 
	popWin.document.writeln('<BODY leftMargin="0" topMargin="0" marginHeight="0" marginWidth="0">');
	popWin.document.writeln('<BR><P align="center"><IMG src='+URL+' border="1"></P>');
	popWin.document.writeln('<CENTER><A href="javascript:close();" onFocus="blur()">Ablak bezárása</A></CENTER>');
	popWin.document.writeln('</BODY>');
	popWin.document.writeln('</HTML>');

	popWin.focus();
//	};
//	else return false;

}


function ImagePopupWithScroll(URL, NAME, WD, HG){

	if(WD==0){WD = 250;}
	if(HG==0){HG = 80;}

	WD = WD+50;
	HG = HG+60;

	xpos = (window.screen.width-WD)/2;
	ypos = ((window.screen.height-HG)/2)-40; 

	popWin = window.open('',NAME,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width='+WD+',height='+HG+',left='+xpos+',top='+ypos+',screenx='+xpos+',screeny='+ypos+',resizable=1');

	popWin.document.writeln('<html><HEAD><LINK HREF="http://www.vegacom.hu/vegacom.css" REL="stylesheet" TYPE="text/css"></HEAD>');
	popWin.document.writeln('<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>');
	popWin.document.writeln('<title>VEGAcom Kft.</title>');
	popWin.document.writeln('<br><p align="center"><img src='+URL+' border="1"></p>');
	popWin.document.writeln('<CENTER><A HREF="javascript:close();" onFocus="blur()">Ablak bezárása</A></CENTER>');
	popWin.document.writeln('</body>');
	popWin.document.writeln('</html>');

	popWin.focus();

}


function PopupWithoutScroll(URL, NAME, WD, HG){
	if(WD==0){WD = 250;}
	if(HG==0){HG = 80;}

	popWin = window.open(URL,NAME,"toolbar=0,location=0,menubar=0,scrollbars=0,resizable=0,width="+WD+",height="+HG);

	popWin.focus();
}


function PopupWithScroll(URL, NAME, WD, HG){

	if (WD==0){WD = 600;}
	if (HG==0){HG = 500;}

	popWin = window.open(URL,NAME,"toolbar=0,location=0,menubar=0,scrollbars=1,resizable=1,width="+WD+",height="+HG);

	popWin.focus();
}


function WriteCopyright(){
	now = new Date();
	document.write('Minden jog fenntartva. &copy; 2003-' + now.getFullYear() + '. VEGAcom Kft.')
}


// ################################
// # Functions below are not used #
// ################################


function PopupCenter(TYPE,URL,NAME,WD,HG,OPTIONS){
//OPTIONS: ('pic','popup.php?ID=13057','PopupAblak',728,650,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0');

	if(WD==0){WD = 250;}
	if(HG==0){HG = 80;}

	WD = WD+50;
	HG = HG+60;

	xpos = (window.screen.width-WD)/2;
	ypos = ((window.screen.height-HG)/2)-40; 

	window.open(URL,NAME,'width='+WD+',height='+HG+',left='+xpos+',top='+ypos+',screenx='+xpos+',screeny='+ypos+',resizable=1,'+options);
}


function WriteTemplate(TEMPLATE_NAME){

	if (TEMPLATE_NAME=="Copyright"){
		document.write('Minden jog fenntartva. &copy; 2003-2006. VEGAcom')
	}

	if (TEMPLATE_NAME=="Footer"){
		document.write('Ide jön a lábléc')
	}

	if (TEMPLATE_NAME=="NettoArak"){
		document.write('A fenti árak nettó árak, nem tartalmazzák az Általános Forgalmi Adót!<BR>A fenti árak forintban értendők.')
	}

}	

function checkOS() {
  if(navigator.userAgent.indexOf('Linux') != -1)
    { var OpSys = "Linux"; }
  else if((navigator.userAgent.indexOf('Win') != -1) &&
  (navigator.userAgent.indexOf('95') != -1))
    { var OpSys = "Windows95"; }
  else if(navigator.userAgent.indexOf('Win') != -1)
    { var OpSys = "Windows3.1 or NT"; }
  else if(navigator.userAgent.indexOf('Mac') != -1)
    { var OpSys = "Macintosh"; }
  else { var OpSys = "other"; }
  return OpSys;
}

var OpSys = checkOS();
// convert all characters to lowercase to simplify testing 
var agt=navigator.userAgent.toLowerCase(); 
// *** BROWSER VERSION *** 
// note: on IE5, these return 4, so use is_ie5up to detect IE5. 
var is_major = parseInt(navigator.appVersion); 
var is_minor = parseFloat(navigator.appVersion); 
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
            && (agt.indexOf('webtv')==-1)); 
var is_nav4 = (is_nav && (is_major == 4)); 
var is_nav4up = (is_nav && (is_major >= 4)); 
var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) || 
                      (agt.indexOf("; nav") != -1)) ); 
var is_nav5 = (is_nav && (is_major == 5)); 
var is_nav5up = (is_nav && (is_major >= 5)); 
var is_ie   = (agt.indexOf("msie") != -1); 
var is_ie3  = (is_ie && (is_major < 4)); 
var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
var is_ie4up  = (is_ie  && (is_major >= 4)); 
var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
var is_ie5up  = (is_ie  && !is_ie3 && !is_ie4); 
var isIE4, isIE4PC, isNav4PC, isNav4, isNav3;
if (is_ie4 || is_ie4up || is_nav5 || is_nav5up) {
        isIE4 = true;
        if (OpSys != "Macintosh") {
                isIE4PC = true;
        } 
} else if (is_nav4) {
        isNav4 = true;
        if (OpSys != "Macintosh") {
                isNav4PC = true;
        } 
} else if  (is_nav) {
        isNav3 = true;  
}
