function conf()
{
  if( confirm( 'Are you sure?' ) ) return true
  else return false;
}
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 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=1,"
+ "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 void_() {
}

function xget(id) {
	if(document.getElementById) return document.getElementById(id);
	if(document.all) return document.all[id];
	return null;
}

var slideshow=1;
var i_curent=1;
function show_tab (obj){
	slideshow=0;
	if (xget('conten'+obj.id))
	{
		for (var i=0;i<=10; i++)
		{
			if (xget('content'+i))
			{
				xget('content'+i).style.display='none';
				xget('t'+i).className='tab';
				if (('t'+i)==obj.id) i_curent=i;
			}
		}
		xget('conten'+obj.id).style.display='block';
		obj.className='tab_a';
	}
}
function show_tab_ (obj){
	if (xget('conten'+obj.id))
	{
		for (var i=0;i<=10; i++)
		{
			if (xget('content'+i))
			{
				xget('content'+i).style.display='none';
				xget('t'+i).className='tab';
				if (('t'+i)==obj.id) i_curent=i;
			}
		}
		xget('conten'+obj.id).style.display='block';
		obj.className='tab_a';
	}
}

function set_tab_next_(){
	if (xget('t'+(i_curent+1))) show_tab_ (xget('t'+(i_curent+1)));
}

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 set_tab_slideshow()
{
	if (slideshow==1)
	{		
		if (!xget('t'+(i_curent+1))) {i_curent=-1}
		set_tab_next_();
		if (i_curent>=0) {
			setTimeout("set_tab_slideshow();",5000);	
		}
	}
}
function set_tab_slideshow_()
{
	setTimeout("set_tab_slideshow();",5000);	
}	

if (navigator.userAgent.toLowerCase().indexOf('gecko') != -1) {
     window.attachEvent = function(eventName, delegate) {
         this.addEventListener(eventName.substring(2), delegate, false);
     }
 
     window.detachEvent = function(eventName, delegate) {
         this.removeEventListener(eventName.substring(2), delegate, false);
     }
 
     window.document.attachEvent = function(eventName, delegate) {
         this.addEventListener(eventName.substring(2), delegate, false);
     }
     
     window.document.detachEvent = function(eventName, delegate) {
         this.removeEventListener(eventName.substring(2), delegate, false);
     }
 
     HTMLElement.prototype.attachEvent = function(eventName, delegate) {
         this.addEventListener(eventName.substring(2), delegate, false);
     }
 
     HTMLElement.prototype.detachEvent = function(eventName, delegate) {
         this.removeEventListener(eventName.substring(2), delegate, false);
     }
 
     HTMLElement.prototype.fireEvent = function(eventName, eventInstance) {
         var events = this.ownerDocument.createEvent("events");
         events.initEvent(eventName.substring(2), false, true);
         this.dispatchEvent(ev);
     }
     
     Event.prototype.__defineGetter__("srcElement", function () {
        var node = this.target;
        while (node.nodeType != 1) node = node.parentNode;
        return node;
     })
 }
	
if (window.attachEvent) {window.attachEvent("onload", set_tab_slideshow_);}
