var page= new Array(11);

page[0]="http://surmesure.3suisses.fr/start";
page[1]="http://surmesure.3suisses.fr/3sui_stoffen";
page[2]="http://surmesure.3suisses.fr/3sui_configurator";
page[3]="http://surmesure.3suisses.fr/3sui_monogram";
page[4]="http://surmesure.3suisses.fr/3sui_linosoft_heren";
page[5]="http://surmesure.3suisses.fr/3sui_save_cart";
page[6]="http://surmesure.3suisses.fr/3sui_shopping_basket";
page[7]="http://surmesure.3suisses.fr/3sui_levering";
page[8]="http://surmesure.3suisses.fr/3sui_factuur";
page[9]="http://surmesure.3suisses.fr/3sui_overzicht";
page[10]="http://www.shirtsdotnet.com/3suisses/3sui_ogonesha";
page[11]="http://surmesure.3suisses.fr/3sui_bedankt";

var popUpWin=0;
function popUpWindow(URLStr, name, width, height)
{
  if(popUpWin)
  {
	if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, name, 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=no,width='+width+',height='+height+'');
}



function SwitchPage(blz) {
var bivo=document.forms.form1.BIVO.value;
addstring="page="+blz;
Replace(bivo,addstring);
bivo=bivonew;
addstring="last=0";
Replace(bivo,addstring);
location.href = page[blz] +".asp?"+bivonew ;
}


function Back() {
blz=pagina;
blz=blz-1;
if (blz<1) {
blz=1; //first page
}
addstring="page="+blz;
var bivo=document.forms.form1.BIVO.value;
Replace(bivo,addstring);
bivo=bivonew;
addstring="last=0";
Replace(bivo,addstring);
location.href = page[blz] +".asp?"+bivonew;
}

function ForWard(addstring) {
var bivo=document.forms.form1.BIVO.value;
Replace(bivo,addstring);
bivo=bivonew;
blz=pagina;
blz=blz+1;
addstring="page="+blz;
Replace(bivo,addstring);
bivo=bivonew;
addstring="last=0";
Replace(bivo,addstring);
location.href = page[blz] +".asp?"+bivonew;
}

function Option(addstring) {
var bivo=document.forms.form1.BIVO.value;
Replace(bivo,addstring);
document.form1.BIVO.value=bivonew;
}

function Final() {
var bivo=document.forms.form1.BIVO.value;
addstring="page=18";
Replace(bivo,addstring);
location.href = page[18] +".asp?"+bivonew ;
}

function Taal(taal) {
blz=pagina;
var bivo=document.forms.form1.BIVO.value;
addstring="taal="+taal
Replace(bivo,addstring);
bivo=bivonew;
location.href = page[blz] +".asp?"+bivonew;
}

function Replace(bivo,addstring) {
addstring="&"+addstring;
theleft = addstring.indexOf("=");
theright = addstring.lastIndexOf(addstring);
string1=addstring.substring(0,theleft);
string2=addstring.substring(theleft+1,addstring.length);
theleft = bivo.indexOf(string1);
theright=bivo.substring(theleft+1,bivo.length);
if (bivo.indexOf(string1+"=")==-1) {
bivonew=bivo+ addstring;
return bivonew;
}
else {
   if (theright.indexOf("&")==-1) {
	  theleft=bivo.substring(0,theleft);
	  bivonew=theleft+ addstring;
	  return bivonew;
	  }
   else {
	   theright = theright.substring(theright.indexOf("&")+1,theright.length);
	   theleft=bivo.substring(0,theleft);
	   bivonew=theleft+ addstring+"&"+theright;
	  //alert(bivonew+" new WEL bestaand");
	  return bivonew;
	  }
}
}

// * Dependencies * 
// this function requires the following snippet:
// JavaScript/readable_MM_functions/findObj
function setHeight(objName)
{
  obj = findObj(objName);
  if (obj.style)
  {
  if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
	obj.style.height = window.innerHeight - 96;
	obj.style.width = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	//IE 6+ in 'standards compliant mode'
	obj.style.height = document.documentElement.clientHeight - 96;
	obj.style.width = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	//IE 4 compatible
	obj.style.height = document.body.clientHeight - 96;
	obj.style.width = document.body.clientWidth;
  }
   
  }
}

// Example: obj = findObj("image1");
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
	theDoc = parent.frames[theObj.substring(p+1)].document;
	theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
	foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
	foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}

function radioValue(temp)
{
	for (i=0;i<temp.length;i++)
	{
		  if (temp[i].checked)
		  {
				 return temp[i].value;
		  }
	}
}