var Lan = 0;
function OnTheLan()
{
	Lan = 1;
}

function ftp()
{
	var url;
	if (Lan==0){
		//on the net
		url = 'ftp://industrial-robotics.co.uk/public';
	}else{
		//on the lan
		url = 'ftp://192.168.1.36/public';
	}
	//alert(url);
	window.open(url);
}

function autofitIframe(id){ // v.1.0
//copyright 2004 Eddie Traversa http://www.dhtmlnirvana.com/
if (!window.opera && !document.mimeType && document.all && document.getElementById){
parent.document.getElementById(id).style.height=this.document.body.offsetHeight+"px";
}
else if(document.getElementById) {
parent.document.getElementById(id).style.height=this.document.body.scrollHeight+"px"
}
}

function RunMovie(robot)
{
	var i = 0;
	var target;
	var	source = window.location.hostname;
	if (source==""){
		//on pc
		do
		   {
			if (PC[i]==robot){
				target = PC[i+1];
				i=(PC.length-1);
			}else{
				i=i+2;
			}
		   }
		while (i<=(PC.length-1));
		location.href="B:/IR/web-content"+target
	}else{
		//on net
		do
		   {
			if (MovieList[i]==robot){
				target = MovieList[i+1];
				i=(MovieList.length-1);
			}else{
				i=i+2;
			}
		   }
		while (i<=(MovieList.length-1));
		//alert(target);
		location.href=target
	}
}

PC = new Array(
	"RV6SL","/video/rv6sl.mpg",
	"RH6SH","/video/rh6sh.mpg",
	"RV12SL","/video/kingspan.mpg",
	"RV12SL-2","/video/kingspan_L2.mpg",
	"RV12SL-3","/video/jxg_full.avi",
	"RV3S","/video/reed_hycalog.mpg",
	"RV3S-2","/video/jxj.avi",
	"RP1","/video/legrand.mpg",
	"RP3","/video/RP3_AH.mpg",
	"RP5","/video/rp5_ah.mpg",
	"RP5-2","/video/rp5_tower_of_hanoi.mpg",
	"SSR4","/video/tema.mpg",
	"SSR6","/video/powder_dispenser.mpg",
	"SSR8","/video/jaq_quads.mpg",
	"RV2A","/video/itw.mpg",
	"RV2A-2","/video/cast_loader.mpg",
	"RV3AL","/video/hdk_rv3al.mpg",
	"RV3AL-2","/video/hdk2_rv3al.mpg",
	"RV4A","/video/spray_dry.mpg",
	"RV4A-2","/video/finishing_line.mpg",
	"RV4A-3","/video/powder_dispenser.mpg",
	"AR8","/video/ar8.mpg",
	"SR4","/video/jaq_sr4.mpg",
	"SR4-2","/video/tema.mpg",
	"SR6","/video/sprue_cutter.mpg",
	"SR6-2","/video/bosch_demo.mpg",
	"SR6-3","/video/wire_cropper.mpg",
	"SR8","/video/jaq_transfer.mpg",
	"SR8-2","/video/glass_line.mpg",
	"SR8-3","/video/jaq_quads.mpg",
	"TX60","/video/tx60.mpg",
	"RX60L","/video/rx60l.mpg",
	"RX90L","/video/rx_90l.mpg",
	"PS","/video/power_scara.mpg",
	"RV3S-SIM","/simulation/jlj.mpg",
	"RX90L-SIM","/simulation/jrm.mpg",
	"BUILD","/video/build.mpg",
	"HNQ-SIM","/simulation/hnq.mpg",
	"JVL-HAND","/video/JVL_manual.mpg",
	"JVL-SIM","/simulation/jvl.mpg",
	"JVQ-SIM","/simulation/jvq.mpg",
	"JPG-SIM","/simulation/jpg.mpg",
	"JXG-SIM","/simulation/jxg.mpg",
	"JXG2-SIM","/simulation/jxg2.mpg",
	"KCX-SIM","/simulation/kcx.avi"
);

MovieList = new Array(
	"RV6SL","http://industrial-robotics.co.uk/video/rv6sl.mpg",
	"RH6SH","http://industrial-robotics.co.uk/video/rh6sh.mpg",
	"RV12SL","http://industrial-robotics.co.uk/video/kingspan.mpg",
	"RV12SL-2","http://industrial-robotics.co.uk/video/kingspan_L2.mpg",
	"RV12SL-3","http://industrial-robotics.co.uk/video/jxg_full.avi",
	"RV3S","http://industrial-robotics.co.uk/video/reed_hycalog.mpg",
	"RV3S-2","http://industrial-robotics.co.uk/video/jxj.avi",
	"RP1","http://industrial-robotics.co.uk/video/legrand.mpg",
	"RP3","http://industrial-robotics.co.uk/video/rp3_ah.mpg",
	"RP5","http://industrial-robotics.co.uk/video/rp5_ah.mpg",
	"RP5-2","http://industrial-robotics.co.uk/video/rp5_tower_of_hanoi.mpg",
	"SSR4","http://industrial-robotics.co.uk/video/tema.mpg",
	"SSR6","http://industrial-robotics.co.uk/video/powder_dispenser.mpg",
	"SSR8","http://industrial-robotics.co.uk/video/jaq_quads.mpg",
	"RV2A","http://industrial-robotics.co.uk/video/itw.mpg",
	"RV2A-2","http://industrial-robotics.co.uk/video/cast_loader.mpg",
	"RV3AL","http://industrial-robotics.co.uk/video/hdk_rv3al.mpg",
	"RV3AL-2","http://industrial-robotics.co.uk/video/hdk2_rv3al.mpg",
	"RV4A","http://industrial-robotics.co.uk/video/spray_dry.mpg",
	"RV4A-2","http://industrial-robotics.co.uk/video/finishing_line.mpg",
	"RV4A-3","http://industrial-robotics.co.uk/video/powder_dispenser.mpg",
	"AR8","http://industrial-robotics.co.uk/video/ar8.mpg",
	"SR4","http://industrial-robotics.co.uk/video/jaq_sr4.mpg",
	"SR4-2","http://industrial-robotics.co.uk/video/tema.mpg",
	"SR6","http://industrial-robotics.co.uk/video/sprue_cutter.mpg",
	"SR6-2","http://industrial-robotics.co.uk/video/bosch_demo.mpg",
	"SR6-3","http://industrial-robotics.co.uk/video/wire_cropper.mpg",
	"SR8","http://industrial-robotics.co.uk/video/jaq_transfer.mpg",
	"SR8-2","http://industrial-robotics.co.uk/video/glass_line.mpg",
	"SR8-3","http://industrial-robotics.co.uk/video/jaq_quads.mpg",
	"TX60","http://industrial-robotics.co.uk/video/tx60.mpg",
	"RX60L","http://industrial-robotics.co.uk/video/rx60l.mpg",
	"RX90L","http://industrial-robotics.co.uk/video/rx_90l.mpg",
	"PS","http://industrial-robotics.co.uk/video/power_scara.mpg",
	"RV3S-SIM","http://industrial-robotics.co.uk/simulation/jlj.mpg",
	"RX90L-SIM","http://industrial-robotics.co.uk/simulation/jrm.mpg",
	"BUILD","http://industrial-robotics.co.uk/video/build.mpg",
	"HNQ-SIM","http://industrial-robotics.co.uk/simulation/hnq.mpg",
	"JVL-HAND","http://industrial-robotics.co.uk/video/JVL_manual.mpg",
	"JVL-SIM","http://industrial-robotics.co.uk/simulation/jvl.mpg",
	"JVQ-SIM","http://industrial-robotics.co.uk/simulation/jvq.mpg",
	"JPG-SIM","http://industrial-robotics.co.uk/simulation/jpg.mpg",
	"JXG-SIM","http://industrial-robotics.co.uk/simulation/jxg.mpg",
	"JXG2-SIM","http://industrial-robotics.co.uk/simulation/jxg2.mpg",
	"KCX-SIM","http://industrial-robotics.co.uk/simulation/kcx.avi"
);
