/* 
	var secureprefix  = "http://192.168.1.200";
	var regularprefix = "http://192.168.1.200";
	var archiveprefix = "http://192.168.1.200";

 */
/* */
	var secureprefix = "https://www.testmart.com";
	var regularprefix = "http://www.testmart.com";
	var archiveprefix = "http://archive.testmart.com";
/* */	
	
	function trim(txtObj)
	{
		// trim leading spaces
		while(''+txtObj.value.charAt(0)==' ')
			txtObj.value=txtObj.value.substring(1,txtObj.value.length);		
			
		// trim trailing spaces
		while(''+txtObj.value.charAt(txtObj.value.length-1)==' ')
			txtObj.value=txtObj.value.substring(0,txtObj.value.length-1);
			
		return 	txtObj.value;
	}

	function open_window(url) 
	{
		if (((new String(url)).indexOf("http") == -1) && ((new String(url)).indexOf("https") == -1))
			url = "http://" + url;
		
		window.open(url,"win",'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=500,height=450');
	}

/*** This array will defined all the pages that need to 
	be served from http://archive.navicpmart.com 
	that is the Document Server which is in the 
	varaible  archiveserver***/
	var archivePages = new Array();
	archivePages[0] = "mfgdocview.cfm";
	archivePages[1] = "spec.cfm";
	archivePages[2] = "mfgcatalogrslt.cfm";	
	archivePages[3] = "catalogrslt.cfm";	


	function isRequiredArchive(actionTxt,targetPageStr)
	{
		for (var i=0; i < archivePages.length ; i++)
		{
			if (((new String(actionTxt)).indexOf(archivePages[i]) > -1) || ((new String(targetPageStr)).indexOf(archivePages[i]) > -1))
			{
					return true;
			}	
		}
		return false;
	
	}

	var secPages = new Array();	
	secPages[0] = "personaltmp.cfm";
	secPages[1] = "shippingtmp.cfm";
	secPages[2] = "billingtmp.cfm";
	secPages[3] = "shipdtl.cfm";
	secPages[4] = "payinfo.cfm";
	secPages[5] = "paydtl.cfm";
	secPages[6] = "orderverify.cfm";
	secPages[7] = "reqconfirm.cfm";
	secPages[8] = "loginvalidate.cfm";
	secPages[9] = "registration.cfm";
	secPages[10] = "regconfirm.cfm";
	secPages[11] = "login.cfm";	
	secPages[12] = "shippingmethod.cfm";
	secPages[13] = "creditcard.cfm";
	secPages[14] = "purchaseorder.cfm";
	secPages[15] = "shippinginfo.cfm";
	secPages[16] = "reqcreditaccount.cfm";
	secPages[17] = "otherpayment.cfm";
	secPages[18] = "notices.cfm";
	secPages[19] = "noticestmp.cfm";
	secPages[20] = "myprofile.cfm";
	secPages[21] = "personal.cfm";
	secPages[22] = "shipbill.cfm";	
	secPages[23] = "eblandmine.cfm";
	secPages[24] = "ebcategories.cfm";
	secPages[25] = "eblistidentity.cfm";
	secPages[26] = "customeraccount.cfm";
	secPages[27] = "profile.cfm";
	secPages[28] = "passwordview.cfm";
	secPages[29] = "password.cfm";
	secPages[30] = "selleqp.cfm";
	secPages[31] = "mdfyeqp.cfm";
	secPages[32] = "sellinventory.cfm";

	function isSecured(actionTxt,targetPageStr)
	{		
		for (var i=0; i < secPages.length ; i++)
			if (((new String(actionTxt)).indexOf(secPages[i]) > -1) || ((new String(targetPageStr)).indexOf(secPages[i]) > -1))
				return true;
				
		return false;
	}
		

	function setStatus(statusTxt)
	{
		// window.status = statusTxt;
		return true;		
	}


	function setSubmitValue(actionTxt,targetPageStr)
	{
		document.forms[1].targetPage.value = targetPageStr;	
		if (actionTxt == "")
			actionTxt = document.forms[1].pageName.value;

		if (isSecured(actionTxt,targetPageStr))
			document.forms[1].action = secureprefix + actionTxt;
		else
		if (isRequiredArchive(actionTxt,targetPageStr))
			document.forms[1].action = archiveprefix + actionTxt;
		else
			document.forms[1].action = regularprefix + actionTxt;

		return true;
	}
	function setSubmitValue0(actionTxt,targetPageStr)
	{
		document.forms[0].targetPage.value = targetPageStr;	
		if (actionTxt == "")
			actionTxt = document.forms[0].pageName.value;

		if (isSecured(actionTxt,targetPageStr))
			document.forms[0].action = secureprefix + actionTxt;
		else
			document.forms[0].action = regularprefix + actionTxt;

		return true;
	}
	function linkSubmitForm0(actionTxt,targetPageStr,paramValue1,paramValue2,paramValue3,paramValue4,paramValue5)
	{
		var str = navigator.userAgent; 
		if (navigator.appName != 'Microsoft Internet Explorer')
		{ 
				document.forms[0].targetPage.value = targetPageStr;	
				document.forms[0].param1.value = paramValue1;
				document.forms[0].param2.value = paramValue2;
				document.forms[0].param3.value = paramValue3;
				document.forms[0].param4.value = paramValue4;
				document.forms[0].param5.value = paramValue5;
		}
		else 
		{
			document.forms[0].targetPage.value = targetPageStr;			
			document.forms[0].param1.value = paramValue1;
			document.forms[0].param2.value = paramValue2;
			document.forms[0].param3.value = paramValue3;
			document.forms[0].param4.value = paramValue4;
			document.forms[0].param5.value = paramValue5;
		}
			
		if (actionTxt == "")
			actionTxt = document.forms[0].pageName.value;

		if (isSecured(actionTxt,targetPageStr))
			document.forms[0].action = secureprefix + actionTxt;
		else
			document.forms[0].action = regularprefix + actionTxt;
			
		document.forms[0].submit();
	}


	function linkSubmitForm(actionTxt,targetPageStr,paramValue1,paramValue2,paramValue3,paramValue4,paramValue5)
	{  
		var str = navigator.userAgent; 
		if (navigator.appName != 'Microsoft Internet Explorer')
		{ 
			//if (targetPageStr != null)
				document.forms[1].targetPage.value = targetPageStr;	
			//if (paramValue1 != null)
				document.forms[1].param1.value = paramValue1;
			//if (paramValue2 != null)
				document.forms[1].param2.value = paramValue2;
			//if (paramValue3 != null)
				document.forms[1].param3.value = paramValue3;
			//if (paramValue4 != null)
				document.forms[1].param4.value = paramValue4;
			//if (paramValue5 != null)
				document.forms[1].param5.value = paramValue5;
		}
		else 
		{
			document.forms[1].targetPage.value = targetPageStr;			
			document.forms[1].param1.value = paramValue1;
			document.forms[1].param2.value = paramValue2;
			document.forms[1].param3.value = paramValue3;
			document.forms[1].param4.value = paramValue4;
			document.forms[1].param5.value = paramValue5;
		}
			
		if (actionTxt == "")
			actionTxt = document.forms[1].pageName.value;

		if (isSecured(actionTxt,targetPageStr))
			document.forms[1].action = secureprefix + actionTxt;
		else
		if (isRequiredArchive(actionTxt,targetPageStr))
			document.forms[1].action = archiveprefix + actionTxt;
		else
			document.forms[1].action = regularprefix + actionTxt;
			
		document.forms[1].submit();
	}

	function emailCheck (emailStr) {
/* The following pattern is used to check if the entered e-mail address
   fits the user@domain format.  It also is used to separate the username
   from the domain. */
var emailPat=/^(.+)@(.+)$/
/* The following string represents the pattern for matching all special
   characters.  We don't want to allow special characters in the address. 
   These characters include ( ) < > @ , ; : \ " . [ ]    */
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
/* The following string represents the range of characters allowed in a 
   username or domainname.  It really states which chars aren't allowed. */
var validChars="\[^\\s" + specialChars + "\]"
/* The following pattern applies if the "user" is a quoted string (in
   which case, there are no rules about which characters are allowed
   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
   is a legal e-mail address. */
var quotedUser="(\"[^\"]*\")"
/* The following pattern applies for domains that are IP addresses,
   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
   e-mail address. NOTE: The square brackets are required. */
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
/* The following string represents an atom (basically a series of
   non-special characters.) */
var atom=validChars + '+'
/* The following string represents one word in the typical username.
   For example, in john.doe@somewhere.com, john and doe are words.
   Basically, a word is either an atom or quoted string. */
var word="(" + atom + "|" + quotedUser + ")"
// The following pattern describes the structure of the user
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
/* The following pattern describes the structure of a normal symbolic
   domain, as opposed to ipDomainPat, shown above. */
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")


/* Finally, let's start trying to figure out if the supplied address is
   valid. */

/* Begin with the coarse pattern to simply break up user@domain into
   different pieces that are easy to analyze. */
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
  /* Too many/few @'s or something; basically, this address doesn't
     even fit the general mould of a valid e-mail address. */
//	alert("Email address seems incorrect (check @ and .'s)")
	return false
}
var user=matchArray[1]
var domain=matchArray[2]

// See if "user" is valid 
if (user.match(userPat)==null) {
    // user is not valid
//    alert("The username doesn't seem to be valid.")
    return false
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
   host name) make sure the IP address is valid. */
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
    // this is an IP address
	  for (var i=1;i<=4;i++) {
	    if (IPArray[i]>255) {
//	        alert("Destination IP address is invalid!")
		return false
	    }
    }
    return true
}

// Domain is symbolic name
var domainArray=domain.match(domainPat)
if (domainArray==null) {
//	alert("The domain name doesn't seem to be valid.")
    return false
}

/* domain name seems valid, but now make sure that it ends in a
   three-letter word (like com, edu, gov) or a two-letter word,
   representing country (uk, nl), and that there's a hostname preceding 
   the domain or country. */

/* Now we need to break up the domain to get a count of how many atoms
   it consists of. */
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>4) {
   // the address must end in a two letter or three letter word.
   //alert("The address must end in a three-letter domain, or two letter country.")
   return false
}

// Make sure there's a host name preceding the domain.
if (len<2) {
   var errStr="This address is missing a hostname!"
//   alert(errStr)
   return false
}

// If we've gotten this far, everything's valid!
return true;
}


function processenterkey(keypressed) {
        // The Docment Object Model event we need is only available inf Javascript 1.2, MSIE4+ and NN4+
        // This functions is the onKeyPress event handler for the password field

        var key;
        
        // Test of MSIE DOM without all that parsing of the agent string
        // NN and MSIE use different DOMs
        if (document.all) {
            key=window.event.keyCode;
              }
        else {
            key=keypressed.which;
              };
                      
        // Check each key pressed for character code 13 (carriage return), AND
        // then SUBMIT the form for the user
        if (key==13) {
			email = trim(document.forms[0].subsremail);
			if (email==""){
				alert("Please enter the e-mail address");
				return;
			}
			else if (emailCheck(email) == false)
			{
				alert("Please enter a valid e-mail address");
				return;
			}
			else
          //document.Signon.submit();
    	   	subscribeNewsletter();
        }

}

function quicksearch(keypressed) {
        // The Docment Object Model event we need is only available inf Javascript 1.2, MSIE4+ and NN4+
        // This functions is the onKeyPress event handler for the password field

        var key;
        
        // Test of MSIE DOM without all that parsing of the agent string
        // NN and MSIE use different DOMs
        if (document.all) {
            key=window.event.keyCode;
              }
        else {
            key=keypressed.which;
              };
                      
        // Check each key pressed for character code 13 (carriage return), AND
        // then SUBMIT the form for the user
        if (key==13) {
			searchtext = trim(document.forms[0].quiksrch_keywords);
			if (searchtext==""){
				return;
			}
			else	
    	   		linkSubmitForm0('/estore/searchtmp.cfm','../search/sitesearch.cfm','','','','','');
        }

}

function sellsearch(keypressed) {
        // The Docment Object Model event we need is only available inf Javascript 1.2, MSIE4+ and NN4+
        // This functions is the onKeyPress event handler for the password field

        var key;
        
        // Test of MSIE DOM without all that parsing of the agent string
        // NN and MSIE use different DOMs
        if (document.all) {
            key=window.event.keyCode;
              }
        else {
            key=keypressed.which;
              };
                      
        // Check each key pressed for character code 13 (carriage return), AND
        // then SUBMIT the form for the user
        if (key==13) {
			searchtext = trim(document.forms[0].txtSearch);
			if (searchtext==""){
				return;
			}
			else	
    	   		linkSubmitForm0('/estore/productstmp.cfm','../sell/sellrslt.cfm','','','','','');
        }

}

function quicksearch_NEW(keypressed) {
        // The Docment Object Model event we need is only available inf Javascript 1.2, MSIE4+ and NN4+
        // This functions is the onKeyPress event handler for the password field

        var key;
        
        // Test of MSIE DOM without all that parsing of the agent string
        // NN and MSIE use different DOMs
        if (document.all) {
            key=window.event.keyCode;
              }
        else {
            key=keypressed.which;
              };
                      
        // Check each key pressed for character code 13 (carriage return), AND
        // then SUBMIT the form for the user
        if (key==13) {
			searchtext = trim(document.forms[0].q);
			if (searchtext==""){
				return;
			}
			else{	
				document.forms[0].v.value='0';
				document.forms[0].submit();
			}	
    	   		//linkSubmitForm0('/estore/searchtmp.cfm','../search/sitesearch.cfm','','','','','');
        }

}
function agsrch(keypressed) {
        var key;
        if (document.all) {
            key=window.event.keyCode;
              }
        else {
            key=keypressed.which;
              };
        if (key==13) {
			searchtext = trim(document.forms[0].searchCriteria);
			if (searchtext==""){
				return;
			}
			else{
				box=document.forms[0].quotefilter;
				eval('document.forms[0].'+box.options[box.selectedIndex].value+'.value=document.forms[0].searchCriteria.value');
    	   		linkSubmitForm0('/estore/reqlisttmp.cfm','../reqlist/quotemanagement.cfm','','','','','');
			}	
        }
}

function sellsearch_NEW(keypressed) {
        // The Docment Object Model event we need is only available inf Javascript 1.2, MSIE4+ and NN4+
        // This functions is the onKeyPress event handler for the password field

        var key;
        
        // Test of MSIE DOM without all that parsing of the agent string
        // NN and MSIE use different DOMs
        if (document.all) {
            key=window.event.keyCode;
              }
        else {
            key=keypressed.which;
              };
                      
        // Check each key pressed for character code 13 (carriage return), AND
        // then SUBMIT the form for the user
        if (key==13) {
			searchtext = trim(document.forms[0].txtSearch);
			if (searchtext==""){
				return;
			}
			else{
				document.forms[0].action='http://search.testmart.com/search/';
				document.forms[0].q.value=searchtext;
				document.forms[0].v.value='2';
				document.forms[0].submit();			
			}
			
    	   		//linkSubmitForm0('/estore/productstmp.cfm','../sell/sellrslt.cfm','','','','','');
        }

}

function genericValidation(fname,fields,messages,targetPage,param1,param2,param3,param4,param5){
 allFields = mockSplit(fields,",");
 allMessages = mockSplit(messages,",");
 
 for (i=0; i < fname.elements.length;i++){
	validateFlag = false;
	tempName = fname.elements[i].name;
	
	for (j=0; j<allFields.length; j++){
		if (tempName == allFields[j]){
			validateFlag = true;
			break;
		}// end of if	
	}// end of inner for
	
	if (validateFlag){
	// validate the field
//		alert(fname.elements[i].type);
		if ( (fname.elements[i].type == "text") || (fname.elements[i].type == "password") || (fname.elements[i].type == "textarea") ){
			if (trim(fname.elements[i]) == ""){
				alert(allMessages[j]);
				fname.elements[i].focus();
				return;
			}// end of if (fname.elements[i])	
			
			// e-mail validation 
			if ((fname.elements[i].name.indexOf("email")) > -1 ){
				if (!emailCheck(fname.elements[i].value)){
					alert("Please enter a valid e-mail address");				
					fname.elements[i].focus();
					return;
				}
			}
		}// end of if
		else
		if (fname.elements[i].type == "radio"){

			flag = false;
			for (k = 0; k < fname.elements[i].length; k++){
					if( fname.elements[i][k].checked )
					{	
						flag = true;
						break; 
					}
			}// end of for

			if (!flag){
				alert(allMessages[j]);
				fname.elements[i].focus();
				return;
			}
		}// end of if else type
		else
		if ((fname.elements[i].type.indexOf("select")) > -1 ){
			if (fname.elements[i][fname.elements[i].selectedIndex].value == ""){
				alert(allMessages[j]);
				fname.elements[i].focus();
				return;
			}
		}// end of select tag
     }// end of if (validateFlag)
 }// end of the for statement
 
	linkSubmitForm('/customerservice/customerservicetmp.cfm',targetPage,param1,param2,param3,param4,param5);

}
function mockSplit(strSourceString,strChar){
	var noOfChars = 1;
	for (var i=0; i<strSourceString.length; i++){
		if (strSourceString.charAt(i) == strChar)
			noOfChars++;					
	} // end of for statement		

	arr = new Array(noOfChars);
	i = 0; 
	var fromChar = 0;

	for (var j=0; j<strSourceString.length; j++){
		if (strSourceString.charAt(j) == strChar){
			arr[i++] = strSourceString.substring(fromChar,j);
			fromChar = j + 1;
		}	
	} // end of for statement		

	arr[i] = strSourceString.substring(fromChar);
	return arr;

}// end of function mockSplit
		
		
var genpopup=null;

function showpopup(){

  var section = "";	
  var hash = "";
  section = arguments[0];
   if (arguments.length == 2)
	  hash = "#"+arguments[1];
	  
	var pagename = "genpopup";
	WindowName = pagename + document.forms[1].sessionID.value;
	self.name = WindowName;

	if ((genpopup == null)||(genpopup.closed)){
		var wtop  = ( screen.height - 465)/2;
		var wleft = ( screen.width - 400)/2 ;
		genpopup = window.open(regularprefix+ '/include/popup.cfm?param1='+section+hash,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,height=465,top='+wtop+',left='+wleft);
		genpopup.opener = self;
		genpopup.focus();
	}
	else{
		genpopup.focus();
	}

}

function vldCat1(){
  flag = false;
  usertype = document.forms[1].usertype;
  for (i=0;i<usertype.length;i++){
  	if(usertype[i].checked){
		flag = true;
		break;
	}
  }
  
  if (!flag){
    alert("Please select 'employee' or 'contractor'");
	return;
  }
  
  email = trim(document.forms[1].catalogemail);
  if (email == ""){
  	alert("Please enter email address");
	document.forms[1].catalogemail.focus();
	return;
  }
  
  if (!emailCheck(email)){
  	alert("Please enter a valid email address");
	document.forms[1].catalogemail.focus();
	return;
  }
  
  linkSubmitForm('/estore/productstmp.cfm','../estore/reqcatalog.cfm','catalogemail','','','','');

}

function vldCat2(){
  flag = false;
 
  
  
  
  email = trim(document.forms[1].catalogemail);
  if (email == ""){
  	alert("Please enter email address");
	document.forms[1].catalogemail.focus();
	return;
  }
  
  if (!emailCheck(email)){
  	alert("Please enter a valid email address");
	document.forms[1].catalogemail.focus();
	return;
  }
  
  linkSubmitForm('/estore/productstmp.cfm','../estore/reqcatalog.cfm','catalogemail','','','','');

}

function vldSendQuote(){
  flag = false;

  makemodel = trim(document.forms[1].makemodel);
  if (makemodel == ""){
  	alert("Please enter product information");
	document.forms[1].makemodel.focus();
	return;
  }

  if (makemodel.length > 3000){
  	alert("Please enter make/model details shorter than 3000 characters");
	document.forms[1].makemodel.focus();
  	return;
  }
  
  name = trim(document.forms[1].name);
  if (name == ""){
  	alert("Please enter your name");
	document.forms[1].name.focus();
	return;
  }

  email = trim(document.forms[1].email);
  if (email == ""){
  	alert("Please enter email address");
	document.forms[1].email.focus();
	return;
  }
  
  if (!emailCheck(email)){
  	alert("Please enter a valid email address");
	document.forms[1].email.focus();
	return;
  }
  
  phone = trim(document.forms[1].phone);
  if (phone == ""){
  	alert("Please enter your phone");
	document.forms[1].phone.focus();
	return;
  }

  if (document.forms[1].country.options[document.forms[1].country.selectedIndex].value == ""){
  	alert("Please select a valid country");
	document.forms[1].country.focus();
	return;
  }
  
  linkSubmitForm('/estore/productstmp.cfm','../customerservice/qtrequest.cfm','fromsubmit','','','','');

}
function inventoryOverride(){
	var pagename = "overrideinventory";
	curdate = new Date();
	WindowName = curdate.setTime(Date.parse(curdate));

	var wtop  = ( screen.height - 450)/2;
	var wleft = ( screen.width - 550)/2 ;

	var windowprops = 'toolbar=0,location=0,directories=0,status=0,titlebar=no' +
			'menubar=0,scrollbars=1,resizable=0,width=550,height=450,top='+wtop+',left='+wleft;
	self.name = WindowName;
	overrideWindow = window.open("/reqlist/overrideinventory.cfm","overrideinventory",windowprops);

			if ( overrideWindow != null )
			{
				if ( overrideWindow.opener == null )
				{ overrideWindow.opener = self;  } 
			
				if (arguments.length == 3){
					document.forms[1].param1.value = arguments[0];
					document.forms[1].param2.value = arguments[1];
					document.forms[1].param3.value = arguments[2];
					document.forms[1].param4.value = '../reqlist/reqlist.cfm';
				}
				else if (arguments.length == 4){
					document.forms[1].param1.value = arguments[0];
					document.forms[1].param2.value = arguments[1];
					document.forms[1].param3.value = arguments[2];
					document.forms[1].param4.value = arguments[3];
				}
				else{
					document.forms[1].param1.value = "";
					document.forms[1].param2.value = "";
					document.forms[1].param3.value = "";
					document.forms[1].param4.value = '../reqlist/reqlist.cfm';
				}	
				document.forms[1].action="/estore/reqlisttmp.cfm?ttype=";
				document.forms[1].targetPage.value = "../reqlist/overrideinventory.cfm";
				document.forms[1].target="overrideinventory";
				document.forms[1].method="post";
				document.forms[1].submit();
				overrideWindow.focus(); 
			}
	overrideWindow.opener = self;  
	overrideWindow.focus();
}	
function ChangeImageForward(id){
	var newid =  parseInt(document.getElementById("currentimage").value);
	 if (newid == 25)
	 { newid = 0;}
     ChangeImage2(newid);
}	
function ChangeImageBack(id){ 
	 var newid  = parseInt(document.getElementById("currentimage").value) - 2;
	 if (newid == -1)
	 {newid = 25;} 
     ChangeImage2(newid);
	
}
function ChangeImage(id){
	var newid =  document.getElementById("currentimage").value;
     ChangeImage2(newid);		
}



function ChangeImage2(id){
       if (id == 25) 
	   {  id=0;} 
	   var txtimage = images[id];
	   var txtlink =links[id];
	   var txttarget = parseInt(id) +1;
	   if (id == "")
	     { txtimage = '/webdata/img/GSAMart_TopSellers_S332D.jpg';
		   txtlink =  'http://search.testmart.com?q=S332D&cn=new';
		   txtarget =  1;
		  }
		  
	   document.getElementById("pilot").src = txtimage;
	   document.getElementById("pilotlink").href = txtlink;
	   document.getElementById("currentimage").value = txttarget;
	
	   
   } 


   
   
   function PreLoadImages(){
      var randomnumber=Math.floor(Math.random()*25)
	  document.getElementById("currentimage").value = randomnumber;
	  var i=0;
	  imageObj = new Image();
	  images = new Array();
	  links = new Array();
	  images[0]="/webdata/img/GSAMart_TopSellers_S332D.jpg";
	  images[1]="/webdata/img/GSAMart_TopSellers_199C-AN.jpg";
	  images[2]="/webdata/img/GSAMart_TopSellers_2400.jpg";
	  images[3]="/webdata/img/GSAMart_TopSellers_2945B.jpg";
	  images[4]="/webdata/img/GSAMart_TopSellers_2947A.jpg";
	  images[5]="/webdata/img/GSAMart_TopSellers_33220A-H01.jpg";
	  images[6]="/webdata/img/GSAMart_TopSellers_34401A.jpg";
	  images[7]="/webdata/img/GSAMart_TopSellers_3458A.jpg";
	  images[8]="/webdata/img/GSAMart_TopSellers_34970A.jpg";
	  images[9]="/webdata/img/GSAMart_TopSellers_4410A520.jpg";
	  images[10]="/webdata/img/GSAMart_TopSellers_53131A.jpg";
	  images[11]="/webdata/img/GSAMart_TopSellers_E3631A.jpg";
	  images[12]="/webdata/img/GSAMart_TopSellers_E4407B.jpg";
	  images[13]="/webdata/img/GSAMart_TopSellers_E4418B.jpg";
	  images[14]="/webdata/img/GSAMart_TopSellers_FSH6-N.jpg";
	  images[15]="/webdata/img/GSAMart_TopSellers_FSP-38.jpg";
	  images[16]="/webdata/img/GSAMart_TopSellers_MG3694B.jpg";
	  images[17]="/webdata/img/GSAMart_TopSellers_MS2711D.jpg";
	  images[18]="/webdata/img/GSAMart_TopSellers_MT-8200-60A.jpg";
	  images[19]="/webdata/img/GSAMart_TopSellers_OPVS3-GIG.jpg";
	  images[20]="/webdata/img/GSAMart_TopSellers_S332D.jpg";
	  images[21]="/webdata/img/GSAMart_TopSellers_S820D.jpg";
	  images[22]="/webdata/img/GSAMart_TopSellers_SML03.jpg";
	  images[23]="/webdata/img/GSAMart_TopSellers_53131A.jpg";
	  images[24]="/webdata/img/GSAMart_TopSellers_S332D.jpg";
	  
	  links[0]="http://search.testmart.com?q=S332D&cn=new";
	  links[1]="http://search.testmart.com?q=199C-AN&cn=new";
	  links[2]="http://search.testmart.com?q=2400&cn=new";
	  links[3]="http://search.testmart.com?q=2945B&cn=new";
	  links[4]="http://search.testmart.com?q=2947A&cn=new";
	  links[5]="http://search.testmart.com?q=33220A-H01&cn=new";
	  links[6]="http://search.testmart.com?q=34401A&cn=new";
	  links[7]="http://search.testmart.com?q=3458A&cn=new";
	  links[8]="http://search.testmart.com?q=34970A&cn=new";
	  links[9]="http://search.testmart.com?q=4410A520&cn=new";
	  links[10]="http://search.testmart.com?q=53131A&cn=new";
	  links[11]="http://search.testmart.com?q=E3631A&cn=new";
	  links[12]="http://search.testmart.com?q=E4407B&cn=new";
	  links[13]="http://search.testmart.com?q=E4418B&cn=new";
	  links[14]="http://search.testmart.com?q=FSH6-N&cn=new";
	  links[15]="http://search.testmart.com?q=FSP-38&cn=new";
	  links[16]="http://search.testmart.com?q=MG3694B&cn=new";
	  links[17]="http://search.testmart.com?q=MS2711D&cn=new";
	  links[18]="http://search.testmart.com?q=MT-8200-60A&cn=new";
	  links[19]="http://search.testmart.com?q=OPVS3-GIG&cn=new";
	  links[20]="http://search.testmart.com?q=S332D&cn=new";
	  links[21]="http://search.testmart.com?q=S820D&cn=new";
	  links[22]="http://search.testmart.com?q=SML03&cn=new";
	  links[23]="http://search.testmart.com?q=53131A&cn=new";
	  links[24]="http://search.testmart.com?q=S332D&cn=new";
	  
	  
	   
   } 


