function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.v = parseInt(navigator.appVersion)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
	if (this.ie5) this.v = 5
	this.min = (this.ns||this.ie)
}

// automatically create the "is" object
is = new BrowserCheck()

function css(id,left,top,width,height,color,vis,z,other) {
	if (id=="START") return '<STYLE TYPE="text/css">\n'
	else if (id=="END") return '</STYLE>'
	var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;'
	if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;'
	if (arguments.length>=5 && height!=null) {
		str += ' height:'+height+'px;'
		if (arguments.length<9 || other.indexOf('clip')==-1) str += ' clip:rect(0px '+width+'px '+height+'px 0px);'
	}
	if (arguments.length>=6 && color!=null) str += (document.layers)? ' layer-background-color:'+color+';' : ' background-color:'+color+';'
	if (arguments.length>=7 && vis!=null) str += ' visibility:'+vis+';'
	if (arguments.length>=8 && z!=null) str += ' z-index:'+z+';'
	if (arguments.length==9 && other!=null) str += ' '+other
	str += '}\n'
	return str
}
function writeCSS(str,showAlert) {
	str = css('START')+str+css('END')
	document.write(str)
	if (showAlert) alert(str)
}

function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}
function changeImage(layer,imgName,imgObj) {
	if (document.images) {
		if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src')
		else document.images[imgName].src = eval(imgObj+".src")
	}
}


preload('imageA','images/1.gif')
preload('imageB','images/2.gif')
preload('imageC','images/3.gif')
preload('imageD','images/4.gif')
preload('imageE','images/5.gif')
preload('imageF','images/6.gif')
preload('imageG','images/7.gif')
preload('imageH','images/8.gif')
preload('imageI','images/9.gif')
preload('imageJ','images/10.gif')
preload('imageK','images/11.gif')
preload('imageL','images/12.gif')
preload('imageM','images/13.gif')
preload('imageN','images/14.gif')
preload('imageO','images/15.gif')

function changeToA() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageA.src
	else document.images["myImg"].src = imageA.src
}
function changeToB() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageB.src
	else document.images["myImg"].src = imageB.src
}
function changeToC() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageC.src
	else document.images["myImg"].src = imageC.src
}
function changeToD() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageD.src
	else document.images["myImg"].src = imageD.src
}
function changeToE() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageE.src
	else document.images["myImg"].src = imageE.src
}
function changeToF() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageF.src
	else document.images["myImg"].src = imageF.src
}
function changeToG() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageG.src
	else document.images["myImg"].src = imageG.src
}
function changeToH() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageH.src
	else document.images["myImg"].src = imageH.src
}
function changeToI() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageI.src
	else document.images["myImg"].src = imageI.src
}
function changeToJ() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageJ.src
	else document.images["myImg"].src = imageJ.src
}
function changeToK() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageK.src
	else document.images["myImg"].src = imageK.src
}
function changeToL() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageL.src
	else document.images["myImg"].src = imageL.src
}
function changeToM() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageM.src
	else document.images["myImg"].src = imageM.src
}
function changeToN() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageN.src
	else document.images["myImg"].src = imageN.src
}
function changeToO() {
	if (document.layers) document.imgDiv.document.images["myImg"].src = imageO.src
	else document.images["myImg"].src = imageO.src
}

function findWH() {
	winW = (is.ns)? window.innerWidth : document.body.offsetWidth-20
	winH = (is.ns)? window.innerHeight : document.body.offsetHeight-4
}
function makeLiquid() {
	if ((is.ns && (winW!=window.innerWidth || winH!=window.innerHeight)) || is.ie)
	history.go(0)
}
