var pss_direction = '';
var maxImgLimit = 4;
var maxImgLimitAdd = 9;

function changeStyle(elementId, styleName) {
    var element = document.getElementById(elementId);
    element.className = styleName;
}

function swap() {
    if (document.images) {
        for (var x = 0;
             x < swap.arguments.length;
             x += 2) {
            document[swap.arguments[x]].src = eval(swap.arguments[x + 1] + ".src");
        }
    }
}

function roll_over(img_name, img_src) {
    document[img_name].src = img_src;
}

	function goProjLink(ElemID)
	{
		obj = document.getElementById(ElemID);
		document.location.href = '/ru/mtmstyl/'+obj.alt+'?isfront=1';
		//return true;
	}

	function changeTxtObj(objID,id)
	{
		obj = document.getElementById(objID);
		obj2 = document.getElementById(objID+'_link');
		txt = pss_left_imgs_alt[id];
		obj.alt = txt;
		obj.title = txt;
		obj2.innerHTML = 'Проект '+ pss_left_imgs_name[id];
		
	}

    function changeImagesLeftB() {
        var img_length = pss_left_imgs.length;
        if (pss_left_direction == "forward") {
            pss_left_current = pss_left_current - maxImgLimit;
        }
        if (pss_left_current == null || pss_left_current < 0) {
            pss_left_current = 1;
        }
        var i = pss_left_current;
        
        crossfade1(document.getElementById('pss_left_image_1'), pss_left_imgs[i], '2');
        changeTxtObj('pss_left_image_1',i);
        i = i + 1;
        if (i >= img_length) {
            i = 0;
            pss_left_current = -1;
        }

        
        for(k=2;k<maxImgLimit;k++)
        {
            //k
            var funName = "crossfade"+k;
	        //crossfade2(document.getElementById('pss_left_image_2'), pss_left_imgs[i], '2');
	        this[funName](document.getElementById('pss_left_image_'+k), pss_left_imgs[i], '2');
	        changeTxtObj('pss_left_image_'+k,i);
	        i = i + 1;
	        if (i >= img_length) { i = 0;}	
        }

        var funName = "crossfade"+maxImgLimit;
        
        this[funName](document.getElementById('pss_left_image_'+maxImgLimit), pss_left_imgs[i], '2');
        changeTxtObj('pss_left_image_'+maxImgLimit,i);
        
        pss_left_current = pss_left_current + 1;
        pss_left_direction = 'backward';
    }

    
    function changeImagesLetfF() {
        var img_length = pss_left_imgs.length;
        if (pss_left_direction == "backward") {
            pss_left_current = pss_left_current - (maxImgLimit-1);
        }
        if (pss_left_current == null || pss_left_current < 0) {
            pss_left_current = img_length - 1;
        }
        var i = pss_left_current;
        
        
        for(k=1;k<maxImgLimit;k++)
        {
            //k
            var funName = "crossfade"+k;
	        //crossfade2(document.getElementById('pss_left_image_2'), pss_left_imgs[i], '2');
	        this[funName](document.getElementById('pss_left_image_'+k), pss_left_imgs[i], '2');
	        changeTxtObj('pss_left_image_'+k,i);
	        i = i + 1;
	        if (i >= img_length) { i = 0;}	
        }
        var funName = "crossfade"+maxImgLimit;
        
        this[funName](document.getElementById('pss_left_image_'+maxImgLimit), pss_left_imgs[i], '2');
        changeTxtObj('pss_left_image_'+maxImgLimit,i);
        pss_left_current = pss_left_current - 1;
        pss_left_direction = 'forward';
    }    
    

function changeImagesAddB()
{
	
        var img_length = pss_imgs.length;
        if (pss_direction == "forward") {
            pss_current = pss_current - maxImgLimitAdd;
        }
        if (pss_current == null || pss_current < 0) {
            pss_current = 1;
        }
        var i = pss_current;
        crossfade1(document.getElementById('pss_image_1'), pss_imgs[i], '2');
        i = i + 1;
        if (i >= img_length) {
            i = 0;
            pss_current = -1;
        }

        for(k=2;k<maxImgLimitAdd;k++)
        {
	        var funName = "crossfade"+k;
        	this[funName](document.getElementById('pss_image_'+k), pss_imgs[i], '2');
    	    i = i + 1;
        	if (i >= img_length) {i = 0;}
        }

        var funName = "crossfade"+maxImgLimitAdd;
        this[funName](document.getElementById('pss_image_'+maxImgLimitAdd), pss_imgs[i], '2');
        pss_current = pss_current + 1;
        pss_direction = 'backward';	
}

function changeImagesAddF() {
        var img_length = pss_imgs.length;
        if (pss_direction == "backward") {
            pss_current = pss_current - (maxImgLimitAdd-1);
        }
        if (pss_current == null || pss_current < 0) {
            pss_current = img_length - 1;
        }
        var i = pss_current;

 		for(k=1;k<maxImgLimitAdd;k++)
        {        
        	var funName = "crossfade"+k;
        	this[funName](document.getElementById('pss_image_'+k), pss_imgs[i], '2');
        	i = i + 1;
        	if (i >= img_length) { i = 0;}
        }
        //alert(pss_direction);
        var funName = "crossfade"+maxImgLimitAdd;
       // alert(funName);
        this[funName](document.getElementById('pss_image_'+maxImgLimitAdd), pss_imgs[i], '2');
        pss_current = pss_current - 1;
        pss_direction = 'forward';
    }
    
    function stop(){ return false;}
    function drag(event){ return false;}
    function move(event){ return false;}

    

function changeImagesB() {
        var img_length = pss_imgs.length;
        if (pss_direction == "forward") {
            pss_current = pss_current - 3;
        }
        if (pss_current == null || pss_current < 0) {
            pss_current = 1;
        }
        var i = pss_current;
        crossfade1(document.getElementById('pss_image_1'), pss_imgs[i], '2');
        i = i + 1;
        if (i >= img_length) {
            i = 0;
            pss_current = -1;
        }
        crossfade2(document.getElementById('pss_image_2'), pss_imgs[i], '2');
        i = i + 1;
        if (i >= img_length) {
            i = 0;
        }
        crossfade3(document.getElementById('pss_image_3'), pss_imgs[i], '2');
        pss_current = pss_current + 1;
        pss_direction = 'backward';
    }

    function changeImagesF() {
        var img_length = pss_imgs.length;
        if (pss_direction == "backward") {
            pss_current = pss_current - 2;
        }
        if (pss_current == null || pss_current < 0) {
            pss_current = img_length - 1;
        }
        var i = pss_current;
        crossfade1(document.getElementById('pss_image_1'), pss_imgs[i], '2');
        i = i + 1;
        if (i >= img_length) {
            i = 0;
        }
        crossfade2(document.getElementById('pss_image_2'), pss_imgs[i], '2');
        i = i + 1;
        if (i >= img_length) {
            i = 0;
        }
        crossfade3(document.getElementById('pss_image_3'), pss_imgs[i], '2');
        pss_current = pss_current - 1;
        pss_direction = 'forward';
    }
    
    function stop(){ return false;}
    function drag(event){ return false;}
    function move(event){ return false;}

	var iScroll = 840;
    function shw_auth(el_id)
    {
		//alert(el_id);
    	if(el_id!='')
		{
    		obj = document.getElementById(el_id);
    		objNew = document.getElementById('imgplace');
			lenStr = obj.src.length;
    		tmpImgSrc = obj.src.substr(0,lenStr-4);
    		tmpImgObj = new Image();
    		tmpImgObj.src = tmpImgSrc+'big.gif';
    		tmpImgSrc = tmpImgSrc+'.gif';
    		Docname =(tmpImgSrc.substring(tmpImgSrc.lastIndexOf("\/")+1,tmpImgSrc.lastIndexOf("\."))) 
    		eval('tmpTxt = txt'+Docname+'');
    		objNew.src = tmpImgObj.src;
    		
    		objNewTxt = document.getElementById('imgplacetxt');
    		objNewTxt.innerHTML = tmpTxt;
    		
		}
    
		if (document.getElementById('hphoto').style.display == 'none')
    	{
			document.getElementById('hphoto').style.display = 'block';
			arr_sel = document.getElementsByTagName('select');
			for (i=0;i<arr_sel.length;i++){ arr_sel[i].style.visibility = 'hidden';}
			
			arr_sel2 = document.getElementById('whytmv');
			objOff(arr_sel2);
			//scroller.onmousedown = drag;
			//window.onmousemove = move;
			//document.body.style.overflow = 'hidden';
			//**document.onmousewheel=stop;
			//**window.onscroll=function() { window.scrollTo(0,840); }

    	} else {
			document.getElementById('hphoto').style.display = 'none';
			arr_sel = document.getElementsByTagName('select');
			for (i=0;i<arr_sel.length;i++){ arr_sel[i].style.visibility = 'visible';}
			arr_sel3 = document.getElementById('mainbg');
			arr_sel3.style.position='';
			
			arr_sel2 = document.getElementById('whytmv');
			objOn(arr_sel2);
			//document.body.style.overflow = 'auto';
			//**document.onmousewheel='';
			//**window.onscroll='';
		}
		//if(el_id!=''){ document.location.href = "#hphoto";}
		//else{ document.location.href = "#hphoto";}
		window.scrollTo(0,iScroll);
	}
	
	

// IXF1.11 :: Image cross-fade 
// *****************************************************
// DOM scripting by brothercake -- http://www.brothercake.com/
//******************************************************
//global object
var ixf1 = { 'clock' : null, 'count' : 1 }
var ixf2 = { 'clock' : null, 'count' : 1 }
var ixf3 = { 'clock' : null, 'count' : 1 }
var ixf4 = { 'clock' : null, 'count' : 1 }
var ixf5 = { 'clock' : null, 'count' : 1 }
var ixf6 = { 'clock' : null, 'count' : 1 }
var ixf7 = { 'clock' : null, 'count' : 1 }
var ixf8 = { 'clock' : null, 'count' : 1 }
var ixf9 = { 'clock' : null, 'count' : 1 }
var ixf10 = { 'clock' : null, 'count' : 1 }
var ixf11 = { 'clock' : null, 'count' : 1 }
var ixf12 = { 'clock' : null, 'count' : 1 }
var ixf13 = { 'clock' : null, 'count' : 1 }
var ixf14 = { 'clock' : null, 'count' : 1 }
var ixf15 = { 'clock' : null, 'count' : 1 }

/*******************************************************



/*****************************************************************************
 List the images that need to be cached
*****************************************************************************/

ixf1.imgs = [];
ixf2.imgs = [];
ixf3.imgs = [];
ixf4.imgs = [];
ixf5.imgs = [];
ixf6.imgs = [];
ixf7.imgs = [];
ixf8.imgs = [];
ixf9.imgs = [];
ixf10.imgs = [];
ixf11.imgs = [];
ixf12.imgs = [];
ixf13.imgs = [];
ixf14.imgs = [];
ixf15.imgs = [];


/*****************************************************************************
*****************************************************************************/



//cache the images
ixf1.cache = [];
ixf2.cache = [];
ixf3.cache = [];
ixf4.cache = [];
ixf5.cache = [];
ixf6.cache = [];
ixf7.cache = [];
ixf8.cache = [];
ixf9.cache = [];
ixf10.cache = [];
ixf11.cache = [];
ixf12.cache = [];
ixf13.cache = [];
ixf14.cache = [];
ixf15.cache = [];

for(k=1;k<16;k++)
{
	this['ixf'+k].imgsLen = this['ixf'+k].imgs.length;
	for(var i=0; i<this['ixf'+k].imgsLen; i++)
	{
		this['ixf'+k].cache[i] = new Image;
		this['ixf'+k].cache[i].src = this['ixf'+k].imgs[i];
	}
}


//crossfade setup function
function crossfade1()
{
	//if the timer is not already going
	if(ixf1.clock == null)
	{
		//copy the image object 
		ixf1.obj = arguments[0];
		
		//copy the image src argument 
		ixf1.src = arguments[1];
		
		//store the supported form of opacity
		if(typeof ixf1.obj.style.opacity != 'undefined')
		{
			ixf1.type = 'w3c';
		}
		else if(typeof ixf1.obj.style.MozOpacity != 'undefined')
		{
			ixf1.type = 'moz';
		}
		else if(typeof ixf1.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf1.type = 'khtml';
		}
		else if(typeof ixf1.obj.filters == 'object')
		{
			//weed out win/ie5.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf1.type = (ixf1.obj.filters.length > 0 && typeof ixf1.obj.filters.alpha == 'object' && typeof ixf1.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf1.type = 'none';
		}
		else
		{
			ixf1.type = 'none';
		}
		
		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf1.obj.alt = arguments[3];
		}
		
		//if any kind of opacity is supported
		if(ixf1.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf1.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf1.newimg.className = 'idupe';
			
			//set src to new image src
			ixf1.newimg.src = ixf1.src

			//move it to superimpose original image
			ixf1.newimg.style.left = ixf1.getRealPosition(ixf1.obj, 'x') + 'px';
			ixf1.newimg.style.top = ixf1.getRealPosition(ixf1.obj, 'y') + 'px';
			
			//copy and convert fade duration argument 
			ixf1.length = parseInt(arguments[2], 10) * 100;
			
			//create fade resolution argument as 20 steps per transition
			ixf1.resolution = parseInt(arguments[2], 10) * 20;
			
			//start the timer
			ixf1.clock = setInterval('ixf1.crossfade()', ixf1.length/ixf1.resolution);
		}
		
		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf1.obj.src = ixf1.src;
		}
		
	}
};


//crossfade timer function
ixf1.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf1.count -= (1 / ixf1.resolution);

	//if the counter has reached the bottom
	if(ixf1.count < (1 / ixf1.resolution))
	{
		//clear the timer
		clearInterval(ixf1.clock);
		ixf1.clock = null;

		//reset the counter
		ixf1.count = 1;

		//set the original image to the src of the new image
		ixf1.obj.src = ixf1.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf1.type)
	{
		case 'ie' :
			ixf1.obj.filters.alpha.opacity = ixf1.count * 100;
			ixf1.newimg.filters.alpha.opacity = (1 - ixf1.count) * 100;
			break;

		case 'khtml' :
			ixf1.obj.style.KhtmlOpacity = ixf1.count;
			ixf1.newimg.style.KhtmlOpacity = (1 - ixf1.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf1.obj.style.MozOpacity = (ixf1.count == 1 ? 0.9999999 : ixf1.count);
			ixf1.newimg.style.MozOpacity = (1 - ixf1.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf1.obj.style.opacity = (ixf1.count == 1 ? 0.9999999 : ixf1.count);
			ixf1.newimg.style.opacity = (1 - ixf1.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf1.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf1.newimg.style.left = ixf1.getRealPosition(ixf1.obj, 'x') + 'px';
	ixf1.newimg.style.top = ixf1.getRealPosition(ixf1.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf1.count == 1)
	{
		//remove the duplicate image
		ixf1.newimg.parentNode.removeChild(ixf1.newimg);
	}
};



//get real position method
ixf1.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};

//crossfade setup function
function crossfade2()
{
	//if the timer is not already going
	if(ixf2.clock == null)
	{
		//copy the image object
		ixf2.obj = arguments[0];

		//copy the image src argument
		ixf2.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf2.obj.style.opacity != 'undefined')
		{
			ixf2.type = 'w3c';
		}
		else if(typeof ixf2.obj.style.MozOpacity != 'undefined')
		{
			ixf2.type = 'moz';
		}
		else if(typeof ixf2.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf2.type = 'khtml';
		}
		else if(typeof ixf2.obj.filters == 'object')
		{
			//weed out win/ie5.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf2.type = (ixf2.obj.filters.length > 0 && typeof ixf2.obj.filters.alpha == 'object' && typeof ixf2.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf2.type = 'none';
		}
		else
		{
			ixf2.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf2.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf2.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf2.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf2.newimg.className = 'idupe';

			//set src to new image src
			ixf2.newimg.src = ixf2.src

			//move it to superimpose original image
			ixf2.newimg.style.left = ixf2.getRealPosition(ixf2.obj, 'x') + 'px';
			ixf2.newimg.style.top = ixf2.getRealPosition(ixf2.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf2.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf2.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf2.clock = setInterval('ixf2.crossfade()', ixf2.length/ixf2.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf2.obj.src = ixf2.src;
		}

	}
};


//crossfade timer function
ixf2.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf2.count -= (1 / ixf2.resolution);

	//if the counter has reached the bottom
	if(ixf2.count < (1 / ixf2.resolution))
	{
		//clear the timer
		clearInterval(ixf2.clock);
		ixf2.clock = null;

		//reset the counter
		ixf2.count = 1;

		//set the original image to the src of the new image
		ixf2.obj.src = ixf2.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf2.type)
	{
		case 'ie' :
			ixf2.obj.filters.alpha.opacity = ixf2.count * 100;
			ixf2.newimg.filters.alpha.opacity = (1 - ixf2.count) * 100;
			break;

		case 'khtml' :
			ixf2.obj.style.KhtmlOpacity = ixf2.count;
			ixf2.newimg.style.KhtmlOpacity = (1 - ixf2.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf2.obj.style.MozOpacity = (ixf2.count == 1 ? 0.9999999 : ixf2.count);
			ixf2.newimg.style.MozOpacity = (1 - ixf2.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf2.obj.style.opacity = (ixf2.count == 1 ? 0.9999999 : ixf2.count);
			ixf2.newimg.style.opacity = (1 - ixf2.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf2.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf2.newimg.style.left = ixf2.getRealPosition(ixf2.obj, 'x') + 'px';
	ixf2.newimg.style.top = ixf2.getRealPosition(ixf2.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf2.count == 1)
	{
		//remove the duplicate image
		ixf2.newimg.parentNode.removeChild(ixf2.newimg);
	}
};



//get real position method
ixf2.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};

//crossfade setup function
function crossfade3()
{
	//if the timer is not already going
	if(ixf3.clock == null)
	{
		//copy the image object
		ixf3.obj = arguments[0];

		//copy the image src argument
		ixf3.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf3.obj.style.opacity != 'undefined')
		{
			ixf3.type = 'w3c';
		}
		else if(typeof ixf3.obj.style.MozOpacity != 'undefined')
		{
			ixf3.type = 'moz';
		}
		else if(typeof ixf3.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf3.type = 'khtml';
		}
		else if(typeof ixf3.obj.filters == 'object')
		{
			//weed out win/ie5.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf3.type = 'none';
		}
		else
		{
			ixf3.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf3.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf3.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf3.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf3.newimg.className = 'idupe';

			//set src to new image src
			ixf3.newimg.src = ixf3.src

			//move it to superimpose original image
			ixf3.newimg.style.left = ixf3.getRealPosition(ixf3.obj, 'x') + 'px';
			ixf3.newimg.style.top = ixf3.getRealPosition(ixf3.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf3.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf3.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf3.clock = setInterval('ixf3.crossfade()', ixf3.length/ixf3.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf3.obj.src = ixf3.src;
		}

	}
};


//crossfade timer function
ixf3.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf3.count -= (1 / ixf3.resolution);

	//if the counter has reached the bottom
	if(ixf3.count < (1 / ixf3.resolution))
	{
		//clear the timer
		clearInterval(ixf3.clock);
		ixf3.clock = null;

		//reset the counter
		ixf3.count = 1;

		//set the original image to the src of the new image
		ixf3.obj.src = ixf3.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf3.type)
	{
		case 'ie' :
			ixf3.obj.filters.alpha.opacity = ixf3.count * 100;
			ixf3.newimg.filters.alpha.opacity = (1 - ixf3.count) * 100;
			break;

		case 'khtml' :
			ixf3.obj.style.KhtmlOpacity = ixf3.count;
			ixf3.newimg.style.KhtmlOpacity = (1 - ixf3.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf3.obj.style.MozOpacity = (ixf3.count == 1 ? 0.9999999 : ixf3.count);
			ixf3.newimg.style.MozOpacity = (1 - ixf3.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf3.obj.style.opacity = (ixf3.count == 1 ? 0.9999999 : ixf3.count);
			ixf3.newimg.style.opacity = (1 - ixf3.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf3.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf3.newimg.style.left = ixf3.getRealPosition(ixf3.obj, 'x') + 'px';
	ixf3.newimg.style.top = ixf3.getRealPosition(ixf3.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf3.count == 1)
	{
		//remove the duplicate image
		ixf3.newimg.parentNode.removeChild(ixf3.newimg);
	}
};



//get real position method
ixf3.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};


//crossfade setup function
function crossfade4()
{
	//if the timer is not already going
	if(ixf4.clock == null)
	{
		//copy the image object
		ixf4.obj = arguments[0];

		//copy the image src argument
		ixf4.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf4.obj.style.opacity != 'undefined')
		{
			ixf4.type = 'w3c';
		}
		else if(typeof ixf4.obj.style.MozOpacity != 'undefined')
		{
			ixf4.type = 'moz';
		}
		else if(typeof ixf4.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf4.type = 'khtml';
		}
		else if(typeof ixf4.obj.filters == 'object')
		{
			//weed out win/ie5.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf4.type = 'none';
		}
		else
		{
			ixf4.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf4.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf4.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf4.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf4.newimg.className = 'idupe';

			//set src to new image src
			ixf4.newimg.src = ixf4.src

			//move it to superimpose original image
			ixf4.newimg.style.left = ixf4.getRealPosition(ixf4.obj, 'x') + 'px';
			ixf4.newimg.style.top = ixf4.getRealPosition(ixf4.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf4.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf4.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf4.clock = setInterval('ixf4.crossfade()', ixf4.length/ixf4.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf4.obj.src = ixf4.src;
		}

	}
};


//crossfade timer function
ixf4.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf4.count -= (1 / ixf4.resolution);

	//if the counter has reached the bottom
	if(ixf4.count < (1 / ixf4.resolution))
	{
		//clear the timer
		clearInterval(ixf4.clock);
		ixf4.clock = null;

		//reset the counter
		ixf4.count = 1;

		//set the original image to the src of the new image
		ixf4.obj.src = ixf4.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf4.type)
	{
		case 'ie' :
			ixf4.obj.filters.alpha.opacity = ixf4.count * 100;
			ixf4.newimg.filters.alpha.opacity = (1 - ixf4.count) * 100;
			break;

		case 'khtml' :
			ixf4.obj.style.KhtmlOpacity = ixf4.count;
			ixf4.newimg.style.KhtmlOpacity = (1 - ixf4.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf4.obj.style.MozOpacity = (ixf4.count == 1 ? 0.9999999 : ixf4.count);
			ixf4.newimg.style.MozOpacity = (1 - ixf4.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf4.obj.style.opacity = (ixf4.count == 1 ? 0.9999999 : ixf4.count);
			ixf4.newimg.style.opacity = (1 - ixf4.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf4.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf4.newimg.style.left = ixf4.getRealPosition(ixf4.obj, 'x') + 'px';
	ixf4.newimg.style.top = ixf4.getRealPosition(ixf4.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf4.count == 1)
	{
		//remove the duplicate image
		ixf4.newimg.parentNode.removeChild(ixf4.newimg);
	}
};



//get real position method
ixf4.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};

//crossfade setup function
function crossfade5()
{
	//if the timer is not already going
	if(ixf5.clock == null)
	{
		//copy the image object
		ixf5.obj = arguments[0];

		//copy the image src argument
		ixf5.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf5.obj.style.opacity != 'undefined')
		{
			ixf5.type = 'w3c';
		}
		else if(typeof ixf5.obj.style.MozOpacity != 'undefined')
		{
			ixf5.type = 'moz';
		}
		else if(typeof ixf5.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf5.type = 'khtml';
		}
		else if(typeof ixf5.obj.filters == 'object')
		{
			//weed out win/ie5.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf5.type = 'none';
		}
		else
		{
			ixf5.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf5.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf5.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf5.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf5.newimg.className = 'idupe';

			//set src to new image src
			ixf5.newimg.src = ixf5.src

			//move it to superimpose original image
			ixf5.newimg.style.left = ixf5.getRealPosition(ixf5.obj, 'x') + 'px';
			ixf5.newimg.style.top = ixf5.getRealPosition(ixf5.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf5.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf5.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf5.clock = setInterval('ixf5.crossfade()', ixf5.length/ixf5.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf5.obj.src = ixf5.src;
		}

	}
};


//crossfade timer function
ixf5.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf5.count -= (1 / ixf5.resolution);

	//if the counter has reached the bottom
	if(ixf5.count < (1 / ixf5.resolution))
	{
		//clear the timer
		clearInterval(ixf5.clock);
		ixf5.clock = null;

		//reset the counter
		ixf5.count = 1;

		//set the original image to the src of the new image
		ixf5.obj.src = ixf5.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf5.type)
	{
		case 'ie' :
			ixf5.obj.filters.alpha.opacity = ixf5.count * 100;
			ixf5.newimg.filters.alpha.opacity = (1 - ixf5.count) * 100;
			break;

		case 'khtml' :
			ixf5.obj.style.KhtmlOpacity = ixf5.count;
			ixf5.newimg.style.KhtmlOpacity = (1 - ixf5.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf5.obj.style.MozOpacity = (ixf5.count == 1 ? 0.9999999 : ixf5.count);
			ixf5.newimg.style.MozOpacity = (1 - ixf5.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf5.obj.style.opacity = (ixf5.count == 1 ? 0.9999999 : ixf5.count);
			ixf5.newimg.style.opacity = (1 - ixf5.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf5.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf5.newimg.style.left = ixf5.getRealPosition(ixf5.obj, 'x') + 'px';
	ixf5.newimg.style.top = ixf5.getRealPosition(ixf5.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf5.count == 1)
	{
		//remove the duplicate image
		ixf5.newimg.parentNode.removeChild(ixf5.newimg);
	}
};



//get real position method
ixf5.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};

//crossfade setup function
function crossfade6()
{
	//if the timer is not already going
	if(ixf6.clock == null)
	{
		//copy the image object
		ixf6.obj = arguments[0];

		//copy the image src argument
		ixf6.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf6.obj.style.opacity != 'undefined')
		{
			ixf6.type = 'w3c';
		}
		else if(typeof ixf6.obj.style.MozOpacity != 'undefined')
		{
			ixf6.type = 'moz';
		}
		else if(typeof ixf6.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf6.type = 'khtml';
		}
		else if(typeof ixf6.obj.filters == 'object')
		{
			//weed out win/ie6.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf6.type = 'none';
		}
		else
		{
			ixf6.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf6.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf6.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf6.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf6.newimg.className = 'idupe';

			//set src to new image src
			ixf6.newimg.src = ixf6.src

			//move it to superimpose original image
			ixf6.newimg.style.left = ixf6.getRealPosition(ixf6.obj, 'x') + 'px';
			ixf6.newimg.style.top = ixf6.getRealPosition(ixf6.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf6.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf6.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf6.clock = setInterval('ixf6.crossfade()', ixf6.length/ixf6.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf6.obj.src = ixf6.src;
		}

	}
};


//crossfade timer function
ixf6.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf6.count -= (1 / ixf6.resolution);

	//if the counter has reached the bottom
	if(ixf6.count < (1 / ixf6.resolution))
	{
		//clear the timer
		clearInterval(ixf6.clock);
		ixf6.clock = null;

		//reset the counter
		ixf6.count = 1;

		//set the original image to the src of the new image
		ixf6.obj.src = ixf6.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf6.type)
	{
		case 'ie' :
			ixf6.obj.filters.alpha.opacity = ixf6.count * 100;
			ixf6.newimg.filters.alpha.opacity = (1 - ixf6.count) * 100;
			break;

		case 'khtml' :
			ixf6.obj.style.KhtmlOpacity = ixf6.count;
			ixf6.newimg.style.KhtmlOpacity = (1 - ixf6.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf6.obj.style.MozOpacity = (ixf6.count == 1 ? 0.9999999 : ixf6.count);
			ixf6.newimg.style.MozOpacity = (1 - ixf6.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf6.obj.style.opacity = (ixf6.count == 1 ? 0.9999999 : ixf6.count);
			ixf6.newimg.style.opacity = (1 - ixf6.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf6.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf6.newimg.style.left = ixf6.getRealPosition(ixf6.obj, 'x') + 'px';
	ixf6.newimg.style.top = ixf6.getRealPosition(ixf6.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf6.count == 1)
	{
		//remove the duplicate image
		ixf6.newimg.parentNode.removeChild(ixf6.newimg);
	}
};



//get real position method
ixf6.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};



////////////////////// 

//crossfade setup function
function crossfade7()
{
	//if the timer is not already going
	if(ixf7.clock == null)
	{
		//copy the image object
		ixf7.obj = arguments[0];

		//copy the image src argument
		ixf7.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf7.obj.style.opacity != 'undefined')
		{
			ixf7.type = 'w3c';
		}
		else if(typeof ixf7.obj.style.MozOpacity != 'undefined')
		{
			ixf7.type = 'moz';
		}
		else if(typeof ixf7.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf7.type = 'khtml';
		}
		else if(typeof ixf7.obj.filters == 'object')
		{
			//weed out win/ie7.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf7.type = 'none';
		}
		else
		{
			ixf7.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf7.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf7.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf7.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf7.newimg.className = 'idupe';

			//set src to new image src
			ixf7.newimg.src = ixf7.src

			//move it to superimpose original image
			ixf7.newimg.style.left = ixf7.getRealPosition(ixf7.obj, 'x') + 'px';
			ixf7.newimg.style.top = ixf7.getRealPosition(ixf7.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf7.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf7.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf7.clock = setInterval('ixf7.crossfade()', ixf7.length/ixf7.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf7.obj.src = ixf7.src;
		}

	}
};


//crossfade timer function
ixf7.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf7.count -= (1 / ixf7.resolution);

	//if the counter has reached the bottom
	if(ixf7.count < (1 / ixf7.resolution))
	{
		//clear the timer
		clearInterval(ixf7.clock);
		ixf7.clock = null;

		//reset the counter
		ixf7.count = 1;

		//set the original image to the src of the new image
		ixf7.obj.src = ixf7.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf7.type)
	{
		case 'ie' :
			ixf7.obj.filters.alpha.opacity = ixf7.count * 100;
			ixf7.newimg.filters.alpha.opacity = (1 - ixf7.count) * 100;
			break;

		case 'khtml' :
			ixf7.obj.style.KhtmlOpacity = ixf7.count;
			ixf7.newimg.style.KhtmlOpacity = (1 - ixf7.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf7.obj.style.MozOpacity = (ixf7.count == 1 ? 0.9999999 : ixf7.count);
			ixf7.newimg.style.MozOpacity = (1 - ixf7.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf7.obj.style.opacity = (ixf7.count == 1 ? 0.9999999 : ixf7.count);
			ixf7.newimg.style.opacity = (1 - ixf7.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf7.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf7.newimg.style.left = ixf7.getRealPosition(ixf7.obj, 'x') + 'px';
	ixf7.newimg.style.top = ixf7.getRealPosition(ixf7.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf7.count == 1)
	{
		//remove the duplicate image
		ixf7.newimg.parentNode.removeChild(ixf7.newimg);
	}
};



//get real position method
ixf7.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};


////////////////////// 

//crossfade setup function
function crossfade8()
{
	//if the timer is not already going
	if(ixf8.clock == null)
	{
		//copy the image object
		ixf8.obj = arguments[0];

		//copy the image src argument
		ixf8.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf8.obj.style.opacity != 'undefined')
		{
			ixf8.type = 'w3c';
		}
		else if(typeof ixf8.obj.style.MozOpacity != 'undefined')
		{
			ixf8.type = 'moz';
		}
		else if(typeof ixf8.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf8.type = 'khtml';
		}
		else if(typeof ixf8.obj.filters == 'object')
		{
			//weed out win/ie8.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf8.type = 'none';
		}
		else
		{
			ixf8.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf8.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf8.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf8.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf8.newimg.className = 'idupe';

			//set src to new image src
			ixf8.newimg.src = ixf8.src

			//move it to superimpose original image
			ixf8.newimg.style.left = ixf8.getRealPosition(ixf8.obj, 'x') + 'px';
			ixf8.newimg.style.top = ixf8.getRealPosition(ixf8.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf8.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf8.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf8.clock = setInterval('ixf8.crossfade()', ixf8.length/ixf8.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf8.obj.src = ixf8.src;
		}

	}
};


//crossfade timer function
ixf8.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf8.count -= (1 / ixf8.resolution);

	//if the counter has reached the bottom
	if(ixf8.count < (1 / ixf8.resolution))
	{
		//clear the timer
		clearInterval(ixf8.clock);
		ixf8.clock = null;

		//reset the counter
		ixf8.count = 1;

		//set the original image to the src of the new image
		ixf8.obj.src = ixf8.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf8.type)
	{
		case 'ie' :
			ixf8.obj.filters.alpha.opacity = ixf8.count * 100;
			ixf8.newimg.filters.alpha.opacity = (1 - ixf8.count) * 100;
			break;

		case 'khtml' :
			ixf8.obj.style.KhtmlOpacity = ixf8.count;
			ixf8.newimg.style.KhtmlOpacity = (1 - ixf8.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf8.obj.style.MozOpacity = (ixf8.count == 1 ? 0.9999999 : ixf8.count);
			ixf8.newimg.style.MozOpacity = (1 - ixf8.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf8.obj.style.opacity = (ixf8.count == 1 ? 0.9999999 : ixf8.count);
			ixf8.newimg.style.opacity = (1 - ixf8.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf8.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf8.newimg.style.left = ixf8.getRealPosition(ixf8.obj, 'x') + 'px';
	ixf8.newimg.style.top = ixf8.getRealPosition(ixf8.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf8.count == 1)
	{
		//remove the duplicate image
		ixf8.newimg.parentNode.removeChild(ixf8.newimg);
	}
};



//get real position method
ixf8.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};



////////////////////// 

//crossfade setup function
function crossfade9()
{
	//if the timer is not already going
	if(ixf9.clock == null)
	{
		//copy the image object
		ixf9.obj = arguments[0];

		//copy the image src argument
		ixf9.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf9.obj.style.opacity != 'undefined')
		{
			ixf9.type = 'w3c';
		}
		else if(typeof ixf9.obj.style.MozOpacity != 'undefined')
		{
			ixf9.type = 'moz';
		}
		else if(typeof ixf9.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf9.type = 'khtml';
		}
		else if(typeof ixf9.obj.filters == 'object')
		{
			//weed out win/ie9.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf9.type = 'none';
		}
		else
		{
			ixf9.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf9.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf9.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf9.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf9.newimg.className = 'idupe';

			//set src to new image src
			ixf9.newimg.src = ixf9.src

			//move it to superimpose original image
			ixf9.newimg.style.left = ixf9.getRealPosition(ixf9.obj, 'x') + 'px';
			ixf9.newimg.style.top = ixf9.getRealPosition(ixf9.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf9.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf9.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf9.clock = setInterval('ixf9.crossfade()', ixf9.length/ixf9.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf9.obj.src = ixf9.src;
		}

	}
};


//crossfade timer function
ixf9.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf9.count -= (1 / ixf9.resolution);

	//if the counter has reached the bottom
	if(ixf9.count < (1 / ixf9.resolution))
	{
		//clear the timer
		clearInterval(ixf9.clock);
		ixf9.clock = null;

		//reset the counter
		ixf9.count = 1;

		//set the original image to the src of the new image
		ixf9.obj.src = ixf9.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf9.type)
	{
		case 'ie' :
			ixf9.obj.filters.alpha.opacity = ixf9.count * 100;
			ixf9.newimg.filters.alpha.opacity = (1 - ixf9.count) * 100;
			break;

		case 'khtml' :
			ixf9.obj.style.KhtmlOpacity = ixf9.count;
			ixf9.newimg.style.KhtmlOpacity = (1 - ixf9.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf9.obj.style.MozOpacity = (ixf9.count == 1 ? 0.9999999 : ixf9.count);
			ixf9.newimg.style.MozOpacity = (1 - ixf9.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf9.obj.style.opacity = (ixf9.count == 1 ? 0.9999999 : ixf9.count);
			ixf9.newimg.style.opacity = (1 - ixf9.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf9.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf9.newimg.style.left = ixf9.getRealPosition(ixf9.obj, 'x') + 'px';
	ixf9.newimg.style.top = ixf9.getRealPosition(ixf9.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf9.count == 1)
	{
		//remove the duplicate image
		ixf9.newimg.parentNode.removeChild(ixf9.newimg);
	}
};



//get real position method
ixf9.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};



////////////////////// 

//crossfade setup function
function crossfade10()
{
	//if the timer is not already going
	if(ixf10.clock == null)
	{
		//copy the image object
		ixf10.obj = arguments[0];

		//copy the image src argument
		ixf10.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf10.obj.style.opacity != 'undefined')
		{
			ixf10.type = 'w3c';
		}
		else if(typeof ixf10.obj.style.MozOpacity != 'undefined')
		{
			ixf10.type = 'moz';
		}
		else if(typeof ixf10.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf10.type = 'khtml';
		}
		else if(typeof ixf10.obj.filters == 'object')
		{
			//weed out win/ie10.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf10.type = 'none';
		}
		else
		{
			ixf10.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf10.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf10.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf10.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf10.newimg.className = 'idupe';

			//set src to new image src
			ixf10.newimg.src = ixf10.src

			//move it to superimpose original image
			ixf10.newimg.style.left = ixf10.getRealPosition(ixf10.obj, 'x') + 'px';
			ixf10.newimg.style.top = ixf10.getRealPosition(ixf10.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf10.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf10.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf10.clock = setInterval('ixf10.crossfade()', ixf10.length/ixf10.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf10.obj.src = ixf10.src;
		}

	}
};


//crossfade timer function
ixf10.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf10.count -= (1 / ixf10.resolution);

	//if the counter has reached the bottom
	if(ixf10.count < (1 / ixf10.resolution))
	{
		//clear the timer
		clearInterval(ixf10.clock);
		ixf10.clock = null;

		//reset the counter
		ixf10.count = 1;

		//set the original image to the src of the new image
		ixf10.obj.src = ixf10.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf10.type)
	{
		case 'ie' :
			ixf10.obj.filters.alpha.opacity = ixf10.count * 100;
			ixf10.newimg.filters.alpha.opacity = (1 - ixf10.count) * 100;
			break;

		case 'khtml' :
			ixf10.obj.style.KhtmlOpacity = ixf10.count;
			ixf10.newimg.style.KhtmlOpacity = (1 - ixf10.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf10.obj.style.MozOpacity = (ixf10.count == 1 ? 0.9999999 : ixf10.count);
			ixf10.newimg.style.MozOpacity = (1 - ixf10.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf10.obj.style.opacity = (ixf10.count == 1 ? 0.9999999 : ixf10.count);
			ixf10.newimg.style.opacity = (1 - ixf10.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf10.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf10.newimg.style.left = ixf10.getRealPosition(ixf10.obj, 'x') + 'px';
	ixf10.newimg.style.top = ixf10.getRealPosition(ixf10.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf10.count == 1)
	{
		//remove the duplicate image
		ixf10.newimg.parentNode.removeChild(ixf10.newimg);
	}
};



//get real position method
ixf10.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};





//////////////////////
//crossfade setup function
function crossfade11()
{
	//if the timer is not already going
	if(ixf11.clock == null)
	{
		//copy the image object
		ixf11.obj = arguments[0];

		//copy the image src argument
		ixf11.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf11.obj.style.opacity != 'undefined')
		{
			ixf11.type = 'w3c';
		}
		else if(typeof ixf11.obj.style.MozOpacity != 'undefined')
		{
			ixf11.type = 'moz';
		}
		else if(typeof ixf11.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf11.type = 'khtml';
		}
		else if(typeof ixf11.obj.filters == 'object')
		{
			//weed out win/ie11.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf11.type = 'none';
		}
		else
		{
			ixf11.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf11.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf11.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf11.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf11.newimg.className = 'idupe';

			//set src to new image src
			ixf11.newimg.src = ixf11.src

			//move it to superimpose original image
			ixf11.newimg.style.left = ixf11.getRealPosition(ixf11.obj, 'x') + 'px';
			ixf11.newimg.style.top = ixf11.getRealPosition(ixf11.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf11.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf11.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf11.clock = setInterval('ixf11.crossfade()', ixf11.length/ixf11.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf11.obj.src = ixf11.src;
		}

	}
};


//crossfade timer function
ixf11.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf11.count -= (1 / ixf11.resolution);

	//if the counter has reached the bottom
	if(ixf11.count < (1 / ixf11.resolution))
	{
		//clear the timer
		clearInterval(ixf11.clock);
		ixf11.clock = null;

		//reset the counter
		ixf11.count = 1;

		//set the original image to the src of the new image
		ixf11.obj.src = ixf11.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf11.type)
	{
		case 'ie' :
			ixf11.obj.filters.alpha.opacity = ixf11.count * 100;
			ixf11.newimg.filters.alpha.opacity = (1 - ixf11.count) * 100;
			break;

		case 'khtml' :
			ixf11.obj.style.KhtmlOpacity = ixf11.count;
			ixf11.newimg.style.KhtmlOpacity = (1 - ixf11.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf11.obj.style.MozOpacity = (ixf11.count == 1 ? 0.9999999 : ixf11.count);
			ixf11.newimg.style.MozOpacity = (1 - ixf11.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf11.obj.style.opacity = (ixf11.count == 1 ? 0.9999999 : ixf11.count);
			ixf11.newimg.style.opacity = (1 - ixf11.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf11.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf11.newimg.style.left = ixf11.getRealPosition(ixf11.obj, 'x') + 'px';
	ixf11.newimg.style.top = ixf11.getRealPosition(ixf11.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf11.count == 1)
	{
		//remove the duplicate image
		ixf11.newimg.parentNode.removeChild(ixf11.newimg);
	}
};



//get real position method
ixf11.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};

//////////////////////
//crossfade setup function
function crossfade12()
{
	//if the timer is not already going
	if(ixf12.clock == null)
	{
		//copy the image object
		ixf12.obj = arguments[0];

		//copy the image src argument
		ixf12.src = arguments[1];

		//store the supported form of opacity
		if(typeof ixf12.obj.style.opacity != 'undefined')
		{
			ixf12.type = 'w3c';
		}
		else if(typeof ixf12.obj.style.MozOpacity != 'undefined')
		{
			ixf12.type = 'moz';
		}
		else if(typeof ixf12.obj.style.KhtmlOpacity != 'undefined')
		{
			ixf12.type = 'khtml';
		}
		else if(typeof ixf12.obj.filters == 'object')
		{
			//weed out win/ie12.0 by testing the length of the filters collection (where filters is an object with no data)
			//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
			//then the returned value type, which should be a number, but in mac/ie5 is an empty string
			//ixf3.type = (ixf3.obj.filters.length > 0 && typeof ixf3.obj.filters.alpha == 'object' && typeof ixf3.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			ixf12.type = 'none';
		}
		else
		{
			ixf12.type = 'none';
		}

		//change the image alt text if defined
		if(typeof arguments[3] != 'undefined' && arguments[3] != '')
		{
			ixf12.obj.alt = arguments[3];
		}

		//if any kind of opacity is supported
		if(ixf12.type != 'none')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixf12.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixf12.newimg.className = 'idupe';

			//set src to new image src
			ixf12.newimg.src = ixf12.src

			//move it to superimpose original image
			ixf12.newimg.style.left = ixf12.getRealPosition(ixf12.obj, 'x') + 'px';
			ixf12.newimg.style.top = ixf12.getRealPosition(ixf12.obj, 'y') + 'px';

			//copy and convert fade duration argument
			ixf12.length = parseInt(arguments[2], 10) * 100;

			//create fade resolution argument as 20 steps per transition
			ixf12.resolution = parseInt(arguments[2], 10) * 20;

			//start the timer
			ixf12.clock = setInterval('ixf12.crossfade()', ixf12.length/ixf12.resolution);
		}

		//otherwise if opacity is not supported
		else
		{
			//just do the image swap
			ixf12.obj.src = ixf12.src;
		}

	}
};


//crossfade timer function
ixf12.crossfade = function()
{
	//decrease the counter on a linear scale
	ixf12.count -= (1 / ixf12.resolution);

	//if the counter has reached the bottom
	if(ixf12.count < (1 / ixf12.resolution))
	{
		//clear the timer
		clearInterval(ixf12.clock);
		ixf12.clock = null;

		//reset the counter
		ixf12.count = 1;

		//set the original image to the src of the new image
		ixf12.obj.src = ixf12.src;
	}

	//set new opacity value on both elements
	//using whatever method is supported
	switch(ixf12.type)
	{
		case 'ie' :
			ixf12.obj.filters.alpha.opacity = ixf12.count * 100;
			ixf12.newimg.filters.alpha.opacity = (1 - ixf12.count) * 100;
			break;

		case 'khtml' :
			ixf12.obj.style.KhtmlOpacity = ixf12.count;
			ixf12.newimg.style.KhtmlOpacity = (1 - ixf12.count);
			break;

		case 'moz' :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf12.obj.style.MozOpacity = (ixf12.count == 1 ? 0.9999999 : ixf12.count);
			ixf12.newimg.style.MozOpacity = (1 - ixf12.count);
			break;

		default :
			//restrict max opacity to prevent a visual popping effect in firefox
			ixf12.obj.style.opacity = (ixf12.count == 1 ? 0.9999999 : ixf12.count);
			ixf12.newimg.style.opacity = (1 - ixf12.count);
	}

	//now that we've gone through one fade iteration
	//we can show the image that's fading in
	ixf12.newimg.style.visibility = 'visible';

	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixf12.newimg.style.left = ixf12.getRealPosition(ixf12.obj, 'x') + 'px';
	ixf12.newimg.style.top = ixf12.getRealPosition(ixf12.obj, 'y') + 'px';

	//if the counter is at the top, which is just after the timer has finished
	if(ixf12.count == 1)
	{
		//remove the duplicate image
		ixf12.newimg.parentNode.removeChild(ixf12.newimg);
	}
};



//get real position method
ixf12.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}

	return this.pos;
};