function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function showsvgtickets(){
o='toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,scrollbars=no,width=850,height=680';
   o+=',top=0,left=0'

wd=window.open('../svgtickets/posroom/login.php','tickets_frame',o);
wd.document.close();
wd.focus();

document.formName.action="../svgtickets/posroom/login.php"
document.formName.target = 'tickets_frame';
document.formName.submit()
document.formName.target = '_self';
document.formName.action = "furniture_retail_systems.php";
}


function getpage(page){
var message = 'Feature not yet listed\n\nPlease try this again soon         ';
n = document.formName.systemlogin.value;

if(page=="1" && n==1) document.formName.action="../epweb.php"
if(page=="1"  && n==2) document.formName.action="../spweb.php"
if(page=="3") document.formName.action="../epweb.php?S=Demostore&U=Demo&P=Demo"
if(page=="4") document.formName.action="../spweb.php?S=Demostore&U=Demo&P=Demo"
if(page=="5") document.formName.action="../x-web/catalogue.php?IN2SID=47a332c183b38"
if(page=="6") {
		showsvgtickets();
		return;
		}


if(page=="7") alert(message);
if(page=="8") alert(message);
if(page=="9") alert(message);
if(page=="10"){ show = 0; window.open("designer.php","_self");}
if(page=="11") alert(message);
if(page=="13") alert(message);
if(page=="14") alert(message);
if(page=="16") alert(message);

if(page=="12") document.formName.action="index.php";

if(page<7){
	document.formName.target="_blank";
	document.formName.method="Post";
	document.formName.submit();
	}

if(page==15){
	o='toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=750,height=450';
	o+=',top=50,left=50'

	win = window.open('','dload',o)
	document.formName.action = '../testtemplates/readmytemplate.php';
	document.formName.target = 'dload';
	document.formName.method="Post";
	document.formName.submit();
	document.formName.action = 'designer.php';
	document.formName.target = '_self';
	}

if(page == 12){
	window.open("../index.php","_self")
	}

if(page==17 || page==18 || page==21){
	document.formName.action="subscription_details.php"
	if(page=="17") document.formName.subtype.value = '1';
	if(page=="18") document.formName.subtype.value = '2';
	if(page=="21") document.formName.subtype.value = '3';

	if(!document.formName.cbconditions.checked){
		alert('You must accept the terms and conditions below\nbefore you can subscribe to using these systems.')
		}else{
		document.formName.target="_self";
		document.formName.method="Post";
		document.formName.submit();
		}
	}

if(page=="19") window.open('../ticketlibrary.php','_blank');
if(page=="20") window.open('free_range_chart.php','_blank');
}


function subscribe(n){
o='toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=900,height=550';
o+=',top=50,left=50'
if(n==250) window.open('https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=info%40in2retail%2ecom&item_name=Full access: In2Retail.com furniture retail systems&item_number=X-Margin:Full&no_shipping=1&no_note=1&currency_code=GBP&lc=GB&bn=PP%2dSubscriptionsBF&charset=UTF%2d8&a3=250%2e00&p3=3&t3=M&src=1&sra=1','dload',o)
if(n==125) window.open('https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=info%40in2retail%2ecom&item_name=Full access: In2Retail.com price ticketing system&item_number=Ticketing:Full&no_shipping=1&no_note=1&currency_code=GBP&lc=GB&bn=PP%2dSubscriptionsBF&charset=UTF%2d8&a3=125%2e00&p3=3&t3=M&src=1&sra=1','dload',o)
}


function getsubs(){
var errorstr = "";
if(!document.formName.DATA_name.value) errorstr = errorstr + "You must enter your name\n";
if(!document.formName.DATA_company.value) errorstr = errorstr + "You must enter your company name\n";
if(!document.formName.DATA_add1.value) errorstr = errorstr + "You must enter your company address\n";
if(!document.formName.DATA_postcode.value) errorstr = errorstr + "You must enter your company postcode or zip code\n";
if(!document.formName.DATA_country.value) errorstr = errorstr + "You must select the country that your company is registered\n";
if(!document.formName.DATA_email.value) errorstr = errorstr + "You must enter your company email address\n";
if(!document.formName.DATA_telephone.value) errorstr = errorstr + "You must enter your telephone number\n";


if(errorstr){
	alert(errorstr);
	return;
	}


	document.formName.hasposted.value='1';
	document.formName.submit();
}



function gettouch(){
window.open('../touch/index.php?S=bbaae3b22134&SID=4&RID=41','_blank');
}


function getdownload(){
o='toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=750,height=450';
o+=',top=50,left=50'

win = window.open('','dload',o)
document.formName.action = '../download_sample.php';
document.formName.target = 'dload';
document.formName.submit();
document.formName.action = 'designer.htm';
document.formName.target = '_self';
}

function getupload(){
o='toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=750,height=450';
o+=',top=50,left=50'

win = window.open('','dload',o)
document.formName.action = '../testtemplates/readmytemplate.php';
document.formName.target = 'dload';
document.formName.submit();
document.formName.action = 'designer.htm';
document.formName.target = '_self';
}
