
function openwin()
	{
	var sc= "";
	var avc = 0;
	var movtopge = "";
	var g = location;
	var uri_encode = encodeURIComponent(g);

	if (arguments[0] == 'WP')
				{
					var avc = (screen.width / screen.height);
								
								if (avc  < 1.35 && avc > 1.31)
									{
										var avc = 1.33;
										sc = ("4x3");
									}
									else if ( avc > 1.64 && avc < 1.68)
									{
										var avc = 1.66;
										sc = ("16x10");
									}							
									else if ( avc > 1.69 && avc < 1.71)
										{
										var avc = 1.70;
										sc = ("16x10");
										}
									else if ( avc == 1.25) 
										{
										sc = ("5x4e");
										}								
									else if ( avc == 1.6 ) 
										{
										sc = ("16x10");
										}
									else if ( avc == 1.60) 
										{
										avc = ("1.6");
										sc = ("16x10");
										}
									else if ((avc > 0.807) && (avc < 0.809)) 
										{
										avc = ("1.5");
										sc = ("3x2");
										}								
									else if (avc < 1.79 && avc > 1.75) 
										{
										avc = ("1.77");
										sc = ("16x10");
										}																			
									else if ( avc == 0.75 ) 
										{
										avc = (1.25);
										sc = ("5x4c");
										}
									else 										
										{
										sc = ("16x10");
										avc = ("1.6");
										}
										
						var g = location;
						var uri_encode = encodeURIComponent(g);
						var movtopge = ("prodcat_wp_" + sc + ".html?" + uri_encode ); 
							if (avc == 1.70 || 1.77 || 1.60 || 1.6 )
								{
									window.open(movtopge,'_self','','');
								}
							else if (avc == 1.25)
								{
									window.open(movtopge,'_self','','');
								}
							else if (avc == 1.33)
								{
									window.open(movtopge,'_self','','');
								}
				}  
			if (arguments[0] == 'CART')
				{
					var g = location;
					var uri_encode = encodeURIComponent(g);
					var movtopge = ("?" + uri_encode );
						window.open(movtopge,'_self',''); 
					alert ("this cart contains $100,000.00 in wallpaper sales");
				}
			else if (arguments[0] == 'STORE')
				{
					var movtopge = ("prodcat_1.html?" + uri_encode );
						window.open(movtopge,'_self','');
				}
			else if (arguments[0] == 'SITEMAP')
				{
					window.open("site_map_1.html",'_self','');
				} 
			else if (arguments[0] == 'HOME')
				{
					var movtopge = "index.html";
					window.open(movtopge, '_self','');
				}
			else if (arguments[0] == 'ABOUTUS')	
				{
					var g = location;
					var uri_encode = encodeURIComponent(g);
					var movtopge = ("aboutus_1.html?" + uri_encode );
						window.open(movtopge,'_self','');
				}
			else if (arguments[0] == 'SUPPORTFORM')
				{
					var brow = navigator.userAgent;
						var abc = ("http://www.digipiximagingstudio.com/support_form.php?" + avc + "&" + brow);
							window.open(abc,'_blank','');
				}
			else if (arguments[0] == 'CENTRALPARK')
				{
					window.open("http://www.centralpark.com/members/profile20356photos.html");	
				}
			else if (arguments[0] == 'TESTSTA')
				{
					var movtopge = ("test_station_1.html?" + uri_encode );
					window.open(movtopge,'_self','');
				}
			else if (arguments[0] == 'TECHSUPPORT')
				{
					window.open("support_1.html",'_self','');
				}
			else if (arguments[0] == 'CONTACTUS')
				{
					window.open("contactus_1.html",'_self','');
				}
			else if (arguments[0] == 'QANDA')
				{
					window.open("phogal_1.html",'_self','');
				}
			else if (arguments[0] == 'SHOANDEVE')
				{
					window.open("shoandeve_1.html",'_self','');
				}
			else if (arguments[0] == 'SPECIAL')
				{
					var movtopge = ("special_.html?" + uri_encode );
					window.open(movtopge,'_self','');
				}
			else if (arguments[0] == 'PRODREG')
				{
					var movtopge = ("emailreg_1.php?" + uri_encode );
					window.location.replace(movtopge,'_self','');
				}
			else if (arguments[0] == 'CONFM')
				{
					var movtopge = ("confm_1.php?" + uri_encode );
					window.location.replace(movtopge,'_blank','');
				}
			else if (arguments[0] == 'ABTUS')
				{
					window.open("asra.html",'_blank',"width=285,height=565,status=0, toolbar=0, copyhistory=0,menubar=0,location=0");
				}
			else if (arguments[0] == 'PRINTABTUS')
				{
					window.open("uploadfiles/abtus_pan_2.pdf",'_blank',"status=0, toolbar=0, copyhistory=0,menubar=0,location=0");
				}
	}
