function conf()
{
  if( confirm( 'Are you sure?' ) ) return true
  else return false;
}

function openAWindow2( pageToLoad, winName, width, height, center){

xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 ) &&(center)){
 xposition = (screen.width - width) / 8;
 yposition = (screen.height - height) / 3;
}

args = "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=1,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //NN Only
+ "screeny=" + yposition + "," //NN Only
+ "left=" + xposition + "," //IE Only
+ "top=" + yposition; //IE Only

window.open( pageToLoad, winName, args );

}

function openAWindow( pageToLoad, winName, width, height, center){

xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 ) &&(center)){
 xposition = (screen.width - width) / 8;
 yposition = (screen.height - height) / 3;
}

args = "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=0,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //NN Only
+ "screeny=" + yposition + "," //NN Only
+ "left=" + xposition + "," //IE Only
+ "top=" + yposition; //IE Only

window.open( pageToLoad, winName, args );

}

function void_() {
}

function xget(id) {
	if(document.getElementById) return document.getElementById(id);
	if(document.all) return document.all[id];
	return null;
}

var i_curent1=1;
var i_curent2=1;
var i_curent3=1;
function set_banner (obj,razdel){
	if (xget('banner'+obj.id))
	{
			for (var i=0;i<=10; i++)
			{
				if (xget('banner_'+razdel+'_'+i))
				{
					xget('banner_'+razdel+'_'+i).style.display='none';
					xget('_'+razdel+'_'+i).src='/images/new2009/banners_other.gif';
					if (('_'+razdel+'_'+i)==obj.id) eval('i_curent'+razdel+'=i;');
				}
		}
		xget('banner'+obj.id).style.display='block';
		obj.src='/images/new2009/banners_current.gif';
	}
}
function set_banner_next(bann){
	if (xget('_'+bann+'_'+(eval('i_curent'+bann)+1))) set_banner (xget('_'+bann+'_'+(eval('i_curent'+bann)+1)), bann);
}
function set_banner_prev(bann){
	if (xget('_'+bann+'_'+(eval('i_curent'+bann)-1))) set_banner (xget('_'+bann+'_'+(eval('i_curent'+bann)-1)), bann);
}

var i_curent_port=0;

function show_desc (id){
	if (xget('port_'+id) && xget('port_temp'))
	{
		detect_user_agent();
		str='<table width="100%" border="0" cellspacing="0" cellpadding="0">';
		if (navigator.IE6) 
        	str+='<tr><td><img src="/images/new2009/e.gif" alt="" width="219" height="21" class="png" /></td></tr>';		
		else		
        	str+='<tr><td><img src="/images/new2009/gallery/table5_1.png" alt="" width="219" height="21" class="png" /></td></tr>';
		if (navigator.IE6) 
			 str+='<tr><td class="center_bg_">';
		else		
			 str+='<tr><td class="center_bg">';
		str+=xget('port_'+id).innerHTML.replace('class="text display_none"','class="text"')
		str+='</td></tr>';
		if (navigator.IE6) 
        	str+='<tr><td><img src="/images/new2009/e.gif" alt="" width="219" height="21" class="png" /></td></tr>';		
		else
        	str+='<tr><td><img src="/images/new2009/gallery/table5_3.png" alt="" width="219" height="21" class="png" /></td></tr>';
		str+='</table>';
		xget('port_temp').innerHTML=str;
		
		if (navigator.IE6) 
		{
			xget('port_temp').style.top=(xget('port_'+id).offsetTop+178)+'px';
			xget('port_temp').style.left=(xget('port_'+id).offsetLeft+32)+'px';					
		}
		else
		{
			xget('port_temp').style.top=xget('port_'+id).offsetTop+'px';
			xget('port_temp').style.left=xget('port_'+id).offsetLeft+'px';					
		}
				
		xget('port_temp').style.display='block';		
	}
}

function detect_user_agent(){
	navigator.DOM=!!(document.getElementById?1:0);
	navigator.OPERA=!!(window.opera);
	navigator.OPERA5=!!(navigator.OPERA&&navigator.userAgent.indexOf("pera 5")>0);
	navigator.OPERA6=	!!(navigator.OPERA&&navigator.userAgent.indexOf("pera 6")>0);
	navigator.IE8=		!!(navigator.appVersion.indexOf("IE 8")>0&&navigator.DOM&&!navigator.OPERA?1:0);
	navigator.IE7=		!!(navigator.appVersion.indexOf("IE 7")>0&&navigator.DOM&&!navigator.OPERA?1:0);
	navigator.IE6=		!!(navigator.appVersion.indexOf("IE 6")>0&&!navigator.IE7&&!navigator.IE8&&navigator.DOM&&!navigator.OPERA?1:0);
	navigator.IE5=		!!(navigator.appVersion.indexOf("IE 5")>0&&navigator.DOM&&!navigator.OPERA?1:0);
	navigator.IE4=		!!(document.all&&!navigator.DOM?1:0);
	navigator.IE=		!!(navigator.IE4||navigator.IE5||navigator.IE6);
	navigator.MAC=		!!(navigator.userAgent.indexOf("Mac")>0);
	navigator.NS6=		!!(navigator.DOM && parseInt(navigator.appVersion)>4?1:0);
	navigator.NS4=		!!(document.layers && !navigator.DOM?1:0);
	navigator.DOMCORE1=	!!(typeof(document.getElementsByTagName)!='undefined' && typeof(document.createElement)!='undefined');
	navigator.DOMCORE2=	!!(navigator.DOMCORE1 && typeof(document.getElementById) != 'undefined' && typeof(document.createElementNS) != 'undefined');
	navigator.DOMHTML=	!!(navigator.DOMCORE1 && typeof(document.getElementById) != 'undefined');
	navigator.DOMCSS1=	!!(navigator.NS6||navigator.IE)	;
	if(navigator.DOMCORE1&&!navigator.OPERA)
	{	var check_element=document.createElement('p');
		navigator.DOMCSS2=!!(typeof(check_element)=='object');
	} else	navigator.DOMCSS2=!!(false)	
	navigator.DETECTED=	(	navigator.OPERA||navigator.OPERA6||navigator.OPERA5||navigator.IE||navigator.IE6||navigator.IE5||navigator.IE4||navigator.MAC||navigator.NS6||navigator.NS4||navigator.DOM||navigator.DOMHTML||navigator.DOMCORE1||navigator.DOMCORE2||navigator.DOMCSS1||navigator.DOMCSS2	);
	}

  function makeHttpRequest(url, callback_function, return_xml,nnn) {
	  var http_request = false;

	  if (window.XMLHttpRequest) { // Mozilla, Safari,...
			http_request = new XMLHttpRequest();
			if (http_request.overrideMimeType && return_xml == 'xml') {
				 http_request.overrideMimeType('text/xml');
			}
	  } else if (window.ActiveXObject) { // IE
			try {
				 http_request = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				 try {
					  http_request = new ActiveXObject("Microsoft.XMLHTTP");
				 } catch (e) {}
			}
	  }

	  if (!http_request) {
			alert('Unfortunately your browser doesn\'t support this feature.');
			return false;
	  }

	  http_request.onreadystatechange = function() {
			if (http_request.readyState == 4) {
				 if (http_request.status == 200) {
					  if (return_xml == 'xml') {
							eval(callback_function + '(http_request.responseXML,\''+nnn+'\')');
					  } else {
							eval(callback_function + '(http_request.responseText,\''+nnn+'\')');
					  }
				 } else {
					  alert('There was a problem with the request. (Code: ' + http_request.status + ')');
				 }
			}
	  }
	  http_request.open('GET', url, true);
	  http_request.send(null);
  }
  
  function getTestimonial(stat,nnn) {
	var obj=document.getElementById('model'+nnn);
	while (obj.options.length>1)
		obj.remove(1);

	obj.options[0]=new Option("Please Wait!!!","");

	obj.selectedIndex=obj.options.length-1;
	obj.disabled=true;  
   makeHttpRequest('/support/checkProduct.asp?id_parent='+stat, 'displayTestimonial', 'text',nnn);
}

function displayTestimonial(text,nnn) {   
	obj=document.getElementById('model'+nnn);
	obj.disabled=false;
	obj.selectedIndex=obj.options.length-1;
	while (obj.options.length>1)
		obj.remove(1);   
	eval(text);		
}