// JavaScript Document

//Opening popup1 "artworks_product" and positioning to the center of the screen - use in wannabuy.htm and in popup2 "artworks_buyit"
function openpopup1(nr,nr2) {
	
	if (nr==1){
	  title='ss2008collection.htm'
	}
	else if (nr==2){
	  title='jetsetrock.htm'
	}
	else if (nr==3){
	  title='bagtodiffer.htm'
	}
	else if (nr==4){
	  title='tripaway.htm'
	}
	else if (nr==5){
	  title='ledeluge.htm'
	} 	
	else if (nr==6){
	  title='slowboat.htm'
	}
	else if (nr==7){
	  title='shapes.htm'
	}	
	else if (nr==8){
	  title='rockthecasbah.htm'
	}
	else if (nr==9){
	  title='riviera.htm'
	}
	else if (nr==10){
	  title='leonde.htm'
	}
	else if (nr==995){
	  title='artshop_links.htm'
	}	
	else if (nr==996){
	  title='artshop_collaborate.htm'
	}
	else if (nr==997){
	  title='artshop_showroom.htm'
	}
	else if (nr==998){
	  title='artshop_events.htm'
	}
	else if (nr==999){
	  title='artshop_press.htm' + nr2
	}
	else if (nr==1000){
	  //title='artshop_club.php'
	  title='artshop_club.htm'
	}
	else if (nr==1001){
	  //title='artshop_club.php'
	  if (nr2==0){
	   title='registration.htm'
	  }
	  else if (nr2==1){
	   title='login.php'
	  }
	}	
	else if (nr==1002){
	  //title='artshop_club.php'
	  title= 'item.php?scode=' + nr2 + 's01'
	}	
	else if (nr==1003){
	  //title='somelink.htm'
	  if (nr2==0){
	   title='http://www.katelynaslett.com/'
	  }
	  else if (nr2==1){
	   title='http://www.collezioneprivatagioielli.com/'
	  }
	  else if (nr2==2){
	   title='http://www.dexigner.com/'
	  }
	  else if (nr2==3){
	   title='http://www.iqons.com/'
	  }
	  else if (nr2==4){
	   title='http://www.retailcon.de/index.html'
	  }
	  else if (nr2==5){
	   title='http://72smalldive.wordpress.com/'
	  }
	  else if (nr2==6){
	   title='http://www.singaporedesignfestival.com/'
	  } 
	  else if (nr2==7){
	   title='http://www.designsingapore.org/'
	  }
	  else if (nr2==8){
	   title='http://slowretail.com/'
	  }
	  else if (nr2==9){
	   title='http://whydontu.blogspot.com/'
	  }
	  else if (nr2==10){
	   title='http://charminglychic.com/'
	  } 
    else if (nr2==11){
	   title='http://www.theblackmarket.sg/'
	  }  
    else if (nr2==12){
	   title='http://www.labcostume.it/'
	  } 	  
	} 
  else if (nr==1004){
    title='forgotpw.php'
  } 
  else if (nr==1005){
    title='delivery.htm'
  }  
  else if (nr==1006){
    title='item2.php?scode=' + nr2
  }	
  else if (nr==1007){
    title='custom_order.htm'
  }
  else if (nr==1008){
    title='item3.php'
  }
else if (nr==1009){
    title='item4.php?item=' + nr2
  }
  else if (nr==1010){
    title='ask.htm'
	 }

  /*var browserName = "";
  var ua = navigator.userAgent.toLowerCase();
  if ( ua.indexOf( "safari" ) != -1 ) {
    if (nr != 1003){
    	browserName = "safari";
  		title = 'http://www.72smalldive.com/' + title;
    }	
  } */ 	

	//ss2008collection
	if (nr==1) {
	y1 = (screen.height - 350)/2;
	x1 = (screen.width - 450)/2; 
  pop2=window.open(title,"Popup_ss","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=450,height=350,top="+y1+",left="+x1); 
  pop2.focus(); 	
	}   
  //collections
  else if (nr >= 2 && nr <= 10) {
	y1 = (screen.height - 500)/2;
	x1 = (screen.width - 500)/2; 
  pop1=window.open(title,"Popup_coll","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=500,height=500,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}  	
	//artshop_links
  else if (nr==995) {
	y1 = (screen.height - 300)/2;
	x1 = (screen.width - 650)/2; 
  pop1=window.open(title,"Popup_info","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=650,height=300,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}	
	//artshop_collaborate
  else if (nr==996) {
	y1 = (screen.height - 300)/2;
	x1 = (screen.width - 650)/2; 
  pop1=window.open(title,"Popup_info","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=650,height=300,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}
	//artshop_showroom
  else if (nr==997) {
	y1 = (screen.height - 300)/2;
	x1 = (screen.width - 650)/2; 
  pop1=window.open(title,"Popup_info","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=650,height=300,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}
	//artshop_events
  else if (nr==998) {
	y1 = (screen.height - 300)/2;
	x1 = (screen.width - 650)/2; 
  pop1=window.open(title,"Popup_info","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=650,height=300,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}	
	//artshop_press
  else if (nr==999) {
	y1 = (screen.height - 300)/2;
	x1 = (screen.width - 650)/2; 
  pop1=window.open(title,"Popup_info","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=650,height=300,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}
	//club
	else if (nr==1000) {
	y1 = (screen.height - 400)/2;
	x1 = (screen.width - 400)/2; 
  pop2=window.open(title,"Popup_form","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=400,top="+y1+",left="+x1); 
  pop2.focus(); 	
	}	
  //registration
	else if (nr==1001) {
	y1 = (screen.height - 400)/2;
	x1 = (screen.width - 760)/2; 
  pop1=window.open(title,"Popup_eshop","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=760,height=400,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}
	//item
	else if (nr==1002) {
	y1 = (screen.height - 440)/2;
	x1 = (screen.width - 760)/2; 
  pop1=window.open(title,"Popup_picture","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=760,height=440,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}	
	//link
	else if (nr==1003) {  
	y1 = 0;
	x1 = 0;
	h1 = screen.height;
  w1 = screen.width;  
  pop1=window.open(title,"Popup_link","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width="+w1+",height="+h1+",top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}
	//forgot password
	else if (nr==1004) {
	y1 = (screen.height - 200)/2;
	x1 = (screen.width - 400)/2; 
  pop2=window.open(title,"Popup_pw","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=200,top="+y1+",left="+x1); 
  pop2.focus(); 	
	}
	//policies
	else if (nr==1005) {
	y1 = (screen.height - 440)/2;
	x1 = (screen.width - 650)/2; 
  pop2=window.open(title,"Popup_pol","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=650,height=440,top="+y1+",left="+x1); 
  pop2.focus(); 	
	}	
	//item
	else if (nr==1006) {
	y1 = (screen.height - 440)/2;
	x1 = (screen.width - 760)/2; 
  pop1=window.open(title,"Popup_picture","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=760,height=440,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}
	//custom_order
	else if (nr==1007) {
	y1 = (screen.height - 400)/2;
	x1 = (screen.width - 400)/2; 
  pop3=window.open(title,"Popup_customorder","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=400,top="+y1+",left="+x1); 
  pop3.focus(); 	
	}	
  //item
	else if (nr==1008) {
	y1 = (screen.height - 440)/2;
	x1 = (screen.width - 760)/2; 
  pop1=window.open(title,"Popup_picture","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=760,height=440,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}  
	//item
	else if (nr==1009) {
	y1 = (screen.height - 440)/2;
	x1 = (screen.width - 760)/2; 
  pop1=window.open(title,"Popup_picture","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=760,height=440,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}  //item
	else if (nr==1010) {
	y1 = (screen.height - 440)/2;
	x1 = (screen.width - 760)/2; 
  pop1=window.open(title,"Popup_ask","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=760,height=440,top="+y1+",left="+x1);
  pause = setTimeout("pop1.focus()", 100)
	}	
}

