/* WEBDESIGN & WEBSITE BY RANDHIR RAMAUTAR webarchitecture / http://webarchitecture.awardspace.com*/ 
/* DATE: 20-05-2008 / V1.0  BROWSER: IE 6.0, FF 1.0 / OS: WINDOWS / RESOLUTION: 1024x768 */
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")

function SwapOut() 
{document.imageflip.src = Image2.src; return true;
}
function SwapBack()
{document.imageflip.src = Image1.src; return true;
}


var useBSNns;

if (useBSNns) {
	 if (typeof(bsn) == "undefined")
		  bsn = {}
	   var _bsn = bsn;
} else {
	  var _bsn = this;
}

_bsn.Crossfader = function (divs, fadetime, delay ) {	
	 this.nAct = -1;
	 this.aDivs = divs;
	
	 for (var i=0;i<divs.length;i++) {
	   document.getElementById(divs[i]).style.opacity = 0;
   	document.getElementById(divs[i]).style.position = "absolute";
	   document.getElementById(divs[i]).style.filter = "alpha(opacity=0)";
 	  document.getElementById(divs[i]).style.visibility = "hidden";
	 }
	
	 this.nDur = fadetime;
  this.nDelay = delay;
  this._newfade();
}

function SwapOutb() 
{document.imageflipb.src = Image6.src; return true;
}
function SwapBackb() 
{document.imageflipb.src = Image5.src; return true;
}

_bsn.Crossfader.prototype._newfade = function() {
  if (this.nID1)
    clearInterval(this.nID1);
	   this.nOldAct = this.nAct;
    this.nAct++;

 	if (!this.aDivs[this.nAct])	this.nAct = 0;

 	if (this.nAct == this.nOldAct)
    return false;

  document.getElementById( this.aDivs[this.nAct] ).style.visibility = "visible";
  this.nInt = 50;
  this.nTime = 0;
  var p=this;
  this.nID2 = setInterval(function() { p._fade() }, this.nInt);
}

_bsn.Crossfader.prototype._fade = function() {
  this.nTime += this.nInt;
 	var ieop = Math.round( this._easeInOut(this.nTime, 0, 1, this.nDur) * 100 );
 	var op = ieop / 100;
 	document.getElementById( this.aDivs[this.nAct] ).style.opacity = op;
 	document.getElementById( this.aDivs[this.nAct] ).style.filter = "alpha(opacity="+ieop+")";

  if (this.nOldAct > -1) {
    document.getElementById( this.aDivs[this.nOldAct] ).style.opacity = 1 - op;
  		document.getElementById( this.aDivs[this.nOldAct] ).style.filter = "alpha(opacity="+(100 - ieop)+")";
	 }
	
	 if (this.nTime == this.nDur) {
		  clearInterval( this.nID2 );
		
  if (this.nOldAct > -1)
	   document.getElementById( this.aDivs[this.nOldAct] ).style.visibility = "hidden";	
    var p=this;
    this.nID1 = setInterval(function() { p._newfade() }, this.nDelay);
  }
}

_bsn.Crossfader.prototype._easeInOut = function(t,b,c,d) {
  return c/2 * (1 - Math.cos(Math.PI*t/d)) + b;
}

function SwapOuta() 
{document.imageflipa.src = Image4.src; return true;
}
function SwapBacka() 
{document.imageflipa.src = Image3.src; return true;
}
Image1= new Image(432,264)
Image1.src = "1.jpg"
Image2 = new Image(432,264)
Image2.src = "2.jpg"
Image3= new Image(432,264)
Image3.src = "3.jpg"
Image4 = new Image(432,264)
Image4.src = "4.jpg"
Image5 = new Image(432,264)
Image5.src = "5.jpg"
Image6 = new Image(432,264)
Image6.src = "6.jpg"

