var slid_to;
var unslid = 0;
function slide( slide_to ){
	size();

	var img;
	if( slid_to != null ){
		document.all('img_'+slid_to).style.display = 'none';
		img_off = document.all('tic_'+slid_to+'_off');
		img_on = document.all('tic_'+slid_to+'_on');

		img_off.style.display = 'block';
		img_on.style.display = 'none';

	}

	document.all('img_'+slide_to).style.display = 'block';
	img_off = document.all('tic_'+slide_to+'_off');
	img_on = document.all('tic_'+slide_to+'_on');

	img_off.style.display = 'none';
	img_on.style.display = 'block';

	slid_to = slide_to;
}

var sized = 0;
var imageResize = new Array();
var imageShrink = new Array();

function size(){
	if( sized ) return;
	var tmp;
	var src;
	if ( document.body.clientWidth < 700 ){
		tmp = document.all('item_table_lg');
		if( tmp != null ) tmp.removeNode(true);

		//document.write( "<LINK id='styles_sm' REL=stylesheet HREF='styles_sm.css' type='text/css'>" );

		tmp = document.all('logo')
		if( tmp != null ) tmp.src = 'graphics/logo_sm.jpg';

		if( imageResize != null ){
			for( var i = 0; i < imageResize.length; i++){
				tmp = document.all( imageResize[i] )
				if( tmp != null ){
					src = tmp.src;
					src = src.substring(0,src.length-4);
					src = src + "_sm.jpg";
					tmp.src = src;
				}
			}
		}

		if( imageShrink != null ){
			for( var i = 0; i < imageShrink.length; i++){
				tmp = document.all( imageShrink[i] )
				if( tmp != null ){
					//tmp.style.width = '50%';
					tmp.width *= .80;
				}
			}
		}
		/*
		tmp = document.all('img_splash')
		if( tmp != null ) tmp.src = 'images/splash_01_sm.jpg';
		tmp = document.all('drive_splash_01')
		if( tmp != null ) tmp.src = 'images/drive_splash_01_sm.jpg';
		tmp = document.all('drive_splash_03')
		if( tmp != null ) tmp.src = 'images/drive_splash_03_sm.jpg';
		tmp = document.all('hover_splash_01')
		if( tmp != null ) tmp.src = 'images/hover_splash_01_sm.jpg';
		tmp = document.all('hover_splash_02')
		if( tmp != null ) tmp.src = 'images/hover_splash_03_sm.jpg';
		tmp = document.all('hover_splash_03')
		if( tmp != null ) tmp.src = 'images/hover_splash_03_sm.jpg';
		*/

	}else{
		tmp = document.all('item_table_sm');
		if( tmp != null ) tmp.removeNode(true);

		//document.write( "<LINK id='styles_lg' REL=stylesheet HREF='styles_lg.css' type='text/css'>" );
	}
	document.all('body_table').refresh();
	sized = 1;

}

var loaded_img;
function load_img(img){
	if( loaded_img != null ){
loaded_img.parentElement.style.border = "2px solid white";
	}

	var load_img = document.all("img_"+img);
	if( load_img != null ){
		document.all("img_main").src = load_img.src;
load_img.parentElement.style.border = "2px solid #66A7B9";

		loaded_img = load_img
	}
}




var loaded_set;
function load_set(set){
	if( loaded_set != null ){
		unload_set(loaded_set);
	}

	var load_set = document.all("set_"+set);
	if( load_set != null ){
		load_set.style.display = "block";

		loaded_set = set;
	}

	var load_set_icon = document.all("icon_"+set);
	if( load_set_icon != null ){
		load_set_icon.style.border = "2px solid #66A7B9";
	}

	
	load_img( set + "_01" );
}

function unload_set(set){

	var unload_set = document.all("set_"+set);
	if( unload_set != null ){
		unload_set.style.display = "none";
	}

	var unload_set_icon = document.all("icon_"+set);
	if( unload_set_icon != null ){
		unload_set_icon.style.border = "2px solid white";
	}

}



