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_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_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 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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Submitkeyword(){
	var frm=document.KeywordSearch;
	if (frm.Keyword.value==""){
		alert("Please enter a keyword.")
		frm.Keyword.focus();
		return;
	}
	frm.submit();
}
function open_win(fname) {
	var newWindow;
	newWindow = window.open(fname, "", "width=520,height=250,toolbar=no,scrollbars=yes");
}

function CheckItem(mycheckbox,strTrackNO) {
	if (mycheckbox.checked) {
		open_win("Detail_popup.asp?Trackno="+strTrackNO);
	}
	else {
		window.location="TakeOffCart.asp?id=" + strTrackNO;
	}
}


function confirmDelete(msg,url,type) {

if (confirm('Are you sure you want to delete ' + msg + '?'))
	{
		if ((type==1) || (type=='1')) {
			fncjslocalsubmit(url);
		}

		else if ((type==2) || (type=='2')) {
			window.location=url;
		}
	}

}

/*************************************************************************
  This code is from Dynamic Web Coding at dyn-web.com
  Copyright 2003-5 by Sharon Paine
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

//var fToolTipFirstTime = true;
//var colSelects;
//var colStyles;

function doTooltip(e, msg, fHideSelects) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready) return;

//  if (fToolTipFirstTime)
//  {
//  	fToolTipFirstTime = false;
//	colSelects = document.getElementsByTagName('select');
//  }

//  //alert (msg.length);
//  var iWidth;
//
//  iWidth = msg.length * 2;
//  iWidth = Math.max(iWidth, 240);
//  iWidth = Math.min(iWidth, 600);
////  iWidth = 650;

//  document.getElementById(Tooltip.tipID).style.width = iWidth;
  if (null == fHideSelects)
  	fHideSelects = false;
  Tooltip.show(e, msg, fHideSelects);

//  if (true) //fHideSelects)
//  {
// 	var t=setTimeout("toggleSelects('hidden');", 1000);
//  }
}


//function toggleSelects(value)
//{
//	alert("toggle " + value);
//	 for (var i=0; i<colSelects.length; i++)
//	 {
//		var el = colSelects[i];
//		el.style.visibility = value;
//	 }
//}

function hideTip()
{
// for (var i=0; i<colSelects.length; i++)
// {
//	var el = colSelects[i];
//	el.style.visibility = 'visible';
// }

  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}

// variables for tooltip content
var tip1 = 'You can create your own customized catalog that can be printed or e-mailed. The contents of your selection basket is used to create your catalog.<br><br>If you log in, you can save your catalogs to use over and over again, or modify them later. If you do not login, you must first finish your catalog in one session.<br><br>It is easy. Try it once, and you will be hooked.'
var tip2 = 'This will be in the header of each page and on the front cover.'
var tip3 = 'This should be the e-mail address that the user of this catalog would contact to place orders or reach you.'
var tip4 = 'This note will appear on the cover of the catalog. It is a great place to put any messages that must be reviewed along with the images. Terms, conditions, and more.'
var tip5 = 'Choose no if you don\'t want the cover page to be viewable.'
var tip6 = 'Most people leave this as is. But if you want a non-US dollar currency, this is where you put in the exchange rate. Another use is to mark up or down our prices. So if you want to show a price that is double our retail, put 2 in this box.'
var tip7 = 'We can automatically sort the images you choose in several different orders.<br><br>1. \"Order added\" is the order you chose them and put them in your selection basket.<br><br>2. \"Artist\" sorts by artist\'s last name, with newer works by an artist coming first.<br><br>3. \"Size\" sorts with big prints first, then by artist, with an artist\'s newest works coming first.<br><br>4. \"Date\" with new works coming first, grouped by artist.<br><br>5. \"Hand Sorted\" is the order you create when you are viewing the entries in the catalog you are making.'
var tip8 = 'Choose how many pictures you want on each page. 8 is good for showing lots of images (but they are small) whereas for important presentations of a preselected small number of images, use two per page. Or split the difference and use 4 or 6 per page.'
var tip9 = 'Show the print title of each image displayed.'
var tip10 = 'Show the image size of each image displayed.'
var tip11 = 'Indicate if canvas transfers are allowed.'
var tip12 = 'Display all sizes as either inches or centimeters.'
var tip13 = 'Show the part number of each print or canvas displayed.'
var tip14 = 'Show the artist name of each print displayed.'
var tip15 = 'This is for advanced users. It outputs a CSV file that lists the data for all the items in your catalog. Most people import it into Excel for their own internal purposes.'
var tip16 = 'Click here to build your catalog. It will be in an Adobe PDF format, ready for you to download (or it will be e-mailed to you if not logged in.'
var tip17 = '- View what images are going to be in your catalog.<br>- Change or set the order of the images in your catalog<br>- Delete certain images from your catalog'
var tip18 = 'Pick some more lovely art to add to your catalog.'
var tip19 = 'Change the numbers on any line than you want to appear elsewhere in the catalog. For example, if you want the top item, (probably numbered 10) to appear after the item numbered 50, change the number to 51. After making all the changes, hit the update button at the botom of the page, and re-check your work.'
var tip20 = 'This column tells you where on the page the image will land. This way, you can see if pairs will be side by side, for example.'
var tip21 = 'Sometimes it helps to add a blank in the catalog, so that items following will look nice. Click the \"Insert Blank\" button to insert a blank spot right above the button.'
var tip22 = 'Go back to the \"main page\" for managing your catalog.'
var tip23 = 'Go to Expanded Search to select more entries to add to your selection basket. After adding them, you must view your selection basket, then scroll down and push the button to add new entries to your catalog.'
var tip24 = 'If you already know the number of the item you want added to your catalog, type it in here. It is a quick way to add items.'
var tip25 = 'The catalogs shown here are your saved catalogs from earlier sessions. Select one to modify it, or click the button below to create a new catalog.'
var tip26 = 'This is an advanced option. If you have a list of Bentley part numbers (or tracking numbers) in your computer already, you can use this option to import that list and create a catalog from it.<br><br>First, you must save that list in a special format called CSV or comma separated values. Most people do this by using Excel\'s SAVE AS feature.<br><br><b>WHAT IS MOST IMPORTANT IS THAT THE FIRST COLUMN MUST CONTAIN THE PART NUMBERS.</b>'
var tip27 = 'If you have imported a list of part numbers from a CSV, or are using a saved catalog made a long time ago, some of the images may not be available anymore. Click here to see the list of images that cannot show up in your catalog.'
var tip28 = 'If you are about to import a list of tracking numbers, there are possibly many prints that match that tracking number. The program can put all the prints into your catalog, or just some of them. Please check the appropriate boxes before uploading.'
var tip29 = 'Choose to work with another one of the catalogs you saved earlier.'
var tip30 = 'Go back to the login screen where you entered your username and password.'
var tip31 = 'After selecting the catalog of your choice, you may view its content by clicking here.'
var tip32 = 'This is for advanced users. It outputs a csv file that lists the data for all the items in your catalog. Most people import it into Excel for their own internal purposes.'
var tip33 = '- View what images are going to be in your catalog.<br><br>- Change or set the order of the images in your catalog.<br><br>- Delete certain images from your catalog.'
var tip34 = 'Make a duplicate of the catalog you have selected.'
var tip35 = 'Delete the catalog you have selected.'
var tip36 = 'You can create your own customized catalog that can be printed or e-mailed. The contents of your selection basket is used to cerate your catalog.<br><br>If you log in, you can save your catalogs to use over and over again, or modify them later. If you don\'t log in, you must finish your catalog in one session.<br><br>It\'s easy. Try it once and you\'ll be hooked.'
var tip37 = 'Delete a catalog that has expired.'
var tip38 = 'This is an advanced option. If you have a list of Bentley part numbers (or tracking numbers) in your computer already, you can use this option to import that list and create a catalog from it.<br><br>First, you must save that list in a special format called CSV or comma separated values. Most people do this by using Excel\'s SAVE AS feature.<br><br><b>WHAT IS MOST IMPORTANT IS THAT THE FIRST COLUMN MUST CONTAIN THE PART NUMBERS.</b>'
var tip39 = 'This is the information that will print on your catalog. Type in your own info or click on one of the buttons to display our info.'
var tip40 = 'Use Bentley publishing information for the form below.'
var tip41 = 'Use Bentley licensing information for the form below.'
var tip42 = 'Save the changes you have made to your catalog.'
var tip43 = 'This is for advanced users. It outputs a csv file that lists the data for all the items in your catalog. Most people import it into Excel for their own internal purpose.'
var tip44 = 'Click Here to build your catalog. It will be in Adobe PDF format, ready for you to download \(or it will be e-mailed to you if you are not logged in\).'
var tip45 = '- View what images are going to be in your catalog.<br><br>- Change or set the order of the images in your catalog.<br><br>- Delete certain images from your catalog.'
var tip46 = 'Pick some more lovely art to your catalog.'
var tip47 = 'Enter your company name here.'
var tip48 = 'Enter your address here.'
var tip49 = 'Enter the second line of your address - suite number\, etc.'
var tip50 = 'Enter your zip code\, or postal code if you do not live in the United States.'
var tip51 = 'Enter your country name - default is USA.'
var tip52 = 'Enter your phone number including your area code.'
var tip53 = 'Display the tracking number. Useful only for licensing requests, or re-sizing requests. If no print of an image has ever been made, this is the only identifying number available. This number is a unique ID for each image, regardless of the size of the print or canvas. This number is assigned before any print is ever made. With this number we know only what image was shown, but not its size.'
var tip54 = 'This will display the size of paper you use.'
var tip55 = 'This will show the number of products you have chosen.'
var tip56 = 'Quantity Offset.'
var tip57 = 'Clear the fields in which you have entered any information.'
var tip58 = 'Displays the name of the publisher. Bentley has many publishers in its group.'
var tip59 = 'Display the date the print was first published.'
var tip60 = 'Life cycle of this release.'
var tip61 = 'Rating of this product.'
var tip62 = 'The life cycle of this release.'
var tip63 = 'Choose the currency type you wish to use.'
var tip64 = 'Choose the type of price you want to use.'
var tip65 = 'This is the date that this catalog will be deleted automatically from the system.'
var tip66 = 'Enter your city.'
var tip67 = 'Enter your state.'
var tip68 = 'Thumbnail of your image.'
var tip69 = 'Item number and/or tracking number.'
var tip70 = 'Type of material.'
var tip71 = 'Refresh this page with the changes you have just made.'
var tip72 = 'Enter the contact name here.'
var tip73 = 'Hover over these words for help.'
var tip74 = 'Add items to your selection basket one at a time by checking the boxes above.'
var tip75 = 'Go back to your last search results and make more selections.'
var tip76 = 'If you edited the quantity field, you need to press "Update" for the changes to take effect.'
var tip77 = 'Your login in and password will be sent to this e-mail address.'
var tip78 = 'Please provide a description of your business.'
var tip79 = 'If you have worked with Bentley before, select "yes", otherwise, select "no".'
var tip80 = 'Send hot links of the items in your selection basket to others.  This option will not produce our special PDF catalog tool.'
var tip81 = 'View the items in your selection basket without adding the above item'
var tip83 = 'You’ve selected some new items and placed them in your selection basket.  Click here to add the new items into your catalog'
var tip84 = 'Make your own customized printable catalog\!  It\'s easy.<br><br>1. Put the images you want in your selection basket, then view "your selections" at the top of your screen.<br>2. Add the images in your selection basket to your catalog.<br>3. Fill out the on-line "Catalog Information" page to tell us what written information and page layout you want.<br>4. Create a PDF that you can send to others or print out.<br>5. If you log in first, you can save your catalog for re-use or modification later.<br><br><strong><font color="Red">Warning:</font> It is best to log on before beginning to load your selection basket, or after you have completed making your catalog. Logging in will ERASE your selection basket.</strong>'
var tip85 = 'This will import the csv file you’ve browsed to above into your catalog.  If your importing tracking numbers, use the radio buttons above to limit which items your catalog will show from your csv.  Make sure that the first column in your CSV contains either the item number (like AB5010 or AA5010 or other Bentley part numbers) or the tracking number.  And tracking numbers and part numbers can be mixed-no problem.'