function Browser(){
	var ua = navigator.userAgent.toLowerCase(); 
	this.Gecko = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
	this.Safari = (ua.indexOf('safari') != - 1);
	this.IE = (ua.indexOf('msie') != -1 && !this.Opera && (ua.indexOf('webtv') == -1) ); 
	this.Firefox = ( (ua.indexOf('firebird/') != -1) || (ua.indexOf('firefox/') != -1) );
	this.IECompatible = ( (ua.indexOf('msie') != -1) && !this.IE);
	this.NSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.NS && !this.Mozilla);
	this.geckoVersion = ( (this.Gecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
	this.equivalentMozilla = ( (this.Gecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
	this.versionMinor = parseFloat(navigator.appVersion); 
	if (this.Gecko && !this.Mozilla) this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
	else if (this.Mozilla) this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
	else if (this.IE && this.versionMinor >= 4) this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
	else if (this.Safari) this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
	this.versionMajor = parseInt(this.versionMinor); 
	this.DOM1 = (document.getElementById);
	this.DOM2Event = (document.addEventListener && document.removeEventListener);
	this.mode = document.compatMode ? document.compatMode : 'BackCompat';
	this.Win = (ua.indexOf('win') != -1);
	this.Mac = (ua.indexOf('mac') != -1);
	this.NS6up = (this.NS && this.versionMajor >= 6);
	this.NS7up = (this.NS && this.versionMajor >= 7);
	this.IE4 = (this.IE && this.versionMajor == 4);
	this.IE5 = (this.IE && this.versionMajor == 5);
	this.IE55 = (this.IE && this.versionMinor == 5.5);
	this.IE5up = (this.IE && this.versionMajor >= 5);
	this.IE6x = (this.IE && this.versionMajor == 6);
	this.IE6up = (this.IE && this.versionMajor >= 6);
}
var is = new Browser();

var flashVersion = 0;
function getFlashVersion() {
	var latestFlashVersion = 12;
	var agent = navigator.userAgent.toLowerCase(); 
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object'){ 
			for (var i = latestFlashVersion; i >= 3; i--){
	            if (flashPlugin.description.indexOf(i + '.') != -1){
	               flashVersion = i;
	               break;
	            }
			}
		}
	}
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
		var doc = '<scr' + 'ipt language="VBScript"\> \n';
		doc += 'On Error Resume Next \n';
		doc += 'Dim obFlash \n';
		doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
		doc += '	Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
		doc += '	If IsObject(obFlash) Then \n';
		doc += '		flashVersion = i \n';
		doc += '		Exit For \n';
		doc += '	End If \n';
		doc += 'Next \n';
		doc += '</scr' + 'ipt\> \n';
		document.write(doc);
	} else {flashVersion = flashVersion_DONTKNOW; }
return flashVersion;
}
var flashVersion_DONTKNOW = -1;
function FlashObject(){
	this.ID=this.ID;
	this.maxVersion=this.maxVersion;
	this.noFlashRedirect;
	this.SwfFile;
	this.minVersion;
	this.altSwfFile;
	this.altImage;
	this.altImageAddAtribute;
	this.altImageHTML;
	this.width;
	this.height;
	this.menu;
	this.background;
	this.wmode;
}
FlashObject.prototype.rnd=function(){
	this.ranNum= Math.random()*255;
    return this.ranNum;
}
FlashObject.prototype.embed=function(){
	var buff;
	if(getFlashVersion()>=this.maxVersion){
		buff=''+
			'<OBJECT ID="'+this.ID+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.SwfFile+'"><PARAM NAME=menu VALUE='+this.menu+'><param name="wmode" value="'+this.wmode+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="'+this.background+'">'+
				'<EMBED name="'+this.ID+'" src="'+this.SwfFile+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality="high" bgcolor="'+this.background+'"  WIDTH="'+this.width+'" HEIGHT="'+this.height+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swLiveConnect="true"></EMBED>'+
			'</OBJECT>';
	}else if((getFlashVersion()> this.minVersion) && (getFlashVersion()< this.maxVersion) && this.altSwfFile){
		buff=''+
			'<OBJECT ID="'+this.ID+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.altSwfFile+'"><PARAM NAME=menu VALUE='+this.menu+'<param name="wmode" value="'+this.wmode+'">><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE='+this.background+'>'+
				'<EMBED name="'+this.ID+'" src="'+this.altSwfFile+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality=high bgcolor='+this.background+'  WIDTH='+this.width+' HEIGHT='+this.height+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swLiveConnect="true"></EMBED>'+
			'</OBJECT>';
	}else{
		if (this.noFlashRedirect != undefined && this.noFlashRedirect != null){
			window.location.href=this.noFlashRedirect;
		}
		this.altImageAddAtribute ? (buff='<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" '+this.altImageAddAtribute+' />'+this.altImageHTML) : (buff='<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" />');
	}
	document.write(buff);
}

function init(){
	if (!document.getElementsByTagName) return;
	imgArray = document.getElementsByTagName("img");
		for (i=0;i<imgArray.length;i++){
			if(imgArray[i].alt!=-1) imgArray[i].title=imgArray[i].alt;
		}
	aArray = document.getElementsByTagName("a");
		for (i=0;i<aArray.length;i++){
			if(aArray[i] && aArray[i].href && !aArray[i].title && aArray[i].childNodes[0])	aArray[i].title = aArray[i].childNodes[0].nodeValue;
		}
}



function popitup_pict(pictId) {

	var pictures= new Array();
	
	pictures[0] = new Array(); pictures[0][0]="0.jpg"; pictures[0][1]="780"; pictures[0][2]="241";
	pictures[1] = new Array(); pictures[1][0]="1.jpg"; pictures[1][1]="450"; pictures[1][2]="464";
	pictures[2] = new Array(); pictures[2][0]="2.jpg"; pictures[2][1]="625"; pictures[2][2]="580";
	pictures[3] = new Array(); pictures[3][0]="3.jpg"; pictures[3][1]="780"; pictures[3][2]="379";
	pictures[4] = new Array(); pictures[4][0]="4.jpg"; pictures[4][1]="730"; pictures[4][2]="580";
	pictures[5] = new Array(); pictures[5][0]="5.jpg"; pictures[5][1]="780"; pictures[5][2]="241";
	pictures[6] = new Array(); pictures[6][0]="6.jpg"; pictures[6][1]="625"; pictures[6][2]="580";
	pictures[7] = new Array(); pictures[7][0]="7.jpg"; pictures[7][1]="780"; pictures[7][2]="537";
	pictures[8] = new Array(); pictures[8][0]="8.jpg"; pictures[8][1]="780"; pictures[8][2]="379";
	pictures[9] = new Array(); pictures[9][0]="9.jpg"; pictures[9][1]="730"; pictures[9][2]="580";
	pictures[10] = new Array(); pictures[10][0]="10.jpg"; pictures[10][1]="780"; pictures[10][2]="448";
	pictures[11] = new Array(); pictures[11][0]="11.jpg"; pictures[11][1]="780"; pictures[11][2]="564";
	pictures[12] = new Array(); pictures[12][0]="12.jpg"; pictures[12][1]="780"; pictures[12][2]="526";
	pictures[13] = new Array(); pictures[13][0]="13.jpg"; pictures[13][1]="539"; pictures[13][2]="580";
	pictures[14] = new Array(); pictures[14][0]="14.jpg"; pictures[14][1]="728"; pictures[14][2]="580";
	pictures[15] = new Array(); pictures[15][0]="15.jpg"; pictures[15][1]="780"; pictures[15][2]="277";
	pictures[16] = new Array(); pictures[16][0]="16.jpg"; pictures[16][1]="780"; pictures[16][2]="526";
	pictures[17] = new Array(); pictures[17][0]="17.jpg"; pictures[17][1]="780"; pictures[17][2]="446";
	pictures[18] = new Array(); pictures[18][0]="18.jpg"; pictures[18][1]="677"; pictures[18][2]="580";
	pictures[19] = new Array(); pictures[19][0]="19.jpg"; pictures[19][1]="780"; pictures[19][2]="414";
	pictures[20] = new Array(); pictures[20][0]="20.jpg"; pictures[20][1]="780"; pictures[20][2]="482";
	pictures[21] = new Array(); pictures[21][0]="21.jpg"; pictures[21][1]="780"; pictures[21][2]="548";
	pictures[22] = new Array(); pictures[22][0]="22.jpg"; pictures[22][1]="780"; pictures[22][2]="446";
	pictures[23] = new Array(); pictures[23][0]="23.jpg"; pictures[23][1]="677"; pictures[23][2]="580";
	pictures[24] = new Array(); pictures[24][0]="24.jpg"; pictures[24][1]="780"; pictures[24][2]="529";
	pictures[25] = new Array(); pictures[25][0]="25.jpg"; pictures[25][1]="780"; pictures[25][2]="548";
	pictures[26] = new Array(); pictures[26][0]="26.jpg"; pictures[26][1]="780"; pictures[26][2]="526";
	pictures[27] = new Array(); pictures[27][0]="27.jpg"; pictures[27][1]="780"; pictures[27][2]="448";
	pictures[28] = new Array(); pictures[28][0]="28.jpg"; pictures[28][1]="780"; pictures[28][2]="564";
	pictures[29] = new Array(); pictures[29][0]="29.jpg"; pictures[29][1]="727"; pictures[29][2]="580";
	pictures[30] = new Array(); pictures[30][0]="30.jpg"; pictures[30][1]="780"; pictures[30][2]="414";
	pictures[31] = new Array(); pictures[31][0]="31.jpg"; pictures[31][1]="780"; pictures[31][2]="526";
	pictures[32] = new Array(); pictures[32][0]="32.jpg"; pictures[32][1]="727"; pictures[32][2]="580";
	pictures[33] = new Array(); pictures[33][0]="33.jpg"; pictures[33][1]="780"; pictures[33][2]="526";
	pictures[34] = new Array(); pictures[34][0]="34.jpg"; pictures[34][1]="780"; pictures[34][2]="448";

	

	Popwin = window.open("pop_pict.html?" + pictures[pictId][0],"popwin","toolbar=0,width=" + pictures[pictId][1] + ", height=" + pictures[pictId][2] + "; location=0, directories=0, status=1, scrollbars=0, menubar=0, resizable=0, copyhistory=0");
	Popwin.focus();
}


function popitup_form(w,h,s) {
	if(s) w=w+17;
	Popwin = window.open("http://www.stargatekonutlari.com/form/contact.asp","popwin","toolbar=0,width=" + w + ", height=" + h + "; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=0, copyhistory=0");
	Popwin.focus();
}


function popitup_kroki() {
	w=430;
	h=550;
	
	Popwin = window.open("pop_kroki.html","popwin","toolbar=0,width=" + w + ", height=" + h + "; location=0, directories=0, status=1, scrollbars=0, menubar=0, resizable=0, copyhistory=0");
	Popwin.focus();
}

