<!--
   img = "";
wid = 0;
hi = 0;

function CaricaFoto(name, imgname){
 features = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + wid + ",height=" + hi;
 if (img != "") {
   dlg = window.open ("","Details",features);
   dlg.document.write("<htm");
   dlg.document.write("l><he");
   dlg.document.write("ad><ti");
   dlg.document.write("tle>" + name + " Zoom</title></head>");
   dlg.document.write("<body bgcolor=white topmargin=0 leftmargin=0><center>");
   dlg.document.write("<table align=center>");
   dlg.document.write("<tr><td align=center valign=middle>");
   dlg.document.write("<b><font size=2 face=Arial>" + name + "</font></b><br><br>");
   dlg.document.write("<img src=" + img + ">");
   dlg.document.write("</td></tr>");
   dlg.document.write("<tr><td align=center valign=middle>");
   dlg.document.write("<a href=# onClick=window.close();>");
   dlg.document.write("<font size=1 face=Arial>Click to close</font></a>");
   dlg.document.write("</td></tr>");
   dlg.document.write("</table></body></html>");
 }
}
function ImageSwap(smallimage, largeimage, popwid, pophi) {
 if (document.images) document.images['primaryimage'].src=smallimage;
 img = largeimage;
 wid = popwid;
 hi = pophi;
}//-->

<!--
	function verifyselection(form) 
	{
		// result function
		var blnResult = true;
		// temp name form control
		var nameControl = "";
		// array of name of radio form controls
		var arrNameControl = new Array();
		// array of value checked of radio form controls
		var arrValueControl = new Array();
		// flag existence form control in array
		var isExistOnArray = false;

		// loop on all elements of form
		for(i=0; i<form.elements.length; i++) {
			// check type form control
			if(form.elements[i].type=="radio") {
				// save name form control
				nameControl = form.elements[i].name;
				// reset flag existence form control in array
				isExistOnArray = false;
				// loop on all found radio form control
				for(j=0; j<arrNameControl.length; j++){
					// if giving form control is exist in array
					if(arrNameControl[j] == nameControl) {
						// set flag
						isExistOnArray = true;
						// break loop
						break;
					}
				}
				// if giving form control is not exist in array
				if(isExistOnArray == false){
					// set index of array
					j = arrNameControl.length;
					// add new element to arrays
					arrNameControl[j] = nameControl;
					arrValueControl[j] = 0;
				}
				// if giving radio form control is checked
				if(form.elements[i].checked == "1"){
					arrValueControl[j] = 1;
				}
			}
                        if ((form.elements[i].selectedIndex > -1)) {
                                if (form.elements[i].selectedIndex == 0) {
                                        var opttext = form.elements[i].value.toLowerCase();
                                        if (opttext.indexOf('optional') < 0) {        
                                                blnResult = false;
                                                alert('Please select a ' + form.elements[i].name.toLowerCase());
                                                break;
                                        }
                                }
                        }
		}
		// loop on all found radio form control
		if(blnResult==true) {
                        for(j=0; j<arrNameControl.length; j++){
			        // if radio group form control is checked
			        if(arrValueControl[j] != 1) {
				       // set result function
				       blnResult = false;
				       // show error message
				       alert("Please select a " + arrNameControl[j].toLowerCase());
				       break;
		       	       }
		       }
                }
		// return result function
		return blnResult;
	}
//-->

<!--

function getRVCookies(itemID, limit, itemsPerRow)
{
   var cContents = document.cookie.split(';');
   
   var cArgs = new Object();
   var cCount = 0;
   for(var i = 0; i < cContents.length; i++)
   {
      while(cContents[i].charAt(0)==' ')
         cContents[i]=cContents[i].substring(1,cContents[i].length);
		 
      var fields = cContents[i].split('=');
	  if (fields[0].substr(0,11) == 'ystrvitems-' && fields[0] != ('ystrvitems-' + itemID)) 
	  {
	     cArgs[cCount] = cContents[i].substring(fields[0].length+1,cContents[i].length);
		 cCount = cCount + 1;
	  }
   }

   if (document.getElementById("recentlyViewedHere") && cCount > 0)
   {
      var strToWrite = '<table width="125" class="yst-recently-viewed-table" align="right"><tr><td class="yst-recently-viewed-title" colspan="10">Recently Viewed Items</td></tr><tr class="yst-recently-viewed-row">';
	  var startCell = cCount - limit;
	  if (startCell < 0)
	     startCell = 0;
	  for (var i = startCell; i < cCount; i++)
	  {
             if ((i > 0) && ((i % itemsPerRow) == 0))
                {
	     strToWrite += '</tr><tr class="yst-recently-viewed-row"><td class="yst-recently-viewed-item" valign="bottom">' + cArgs[i] + '</td>';
                }
                else
                {
	     strToWrite += '<td class="yst-recently-viewed-item" valign="bottom">' + cArgs[i] + '</td>';
                }
	  }
      strToWrite += '</tr></table>';  	  
      document.getElementById("recentlyViewedHere").innerHTML = strToWrite;
   }
}

function storeRV(strToStore, itemID, limit, itemsPerRow) {
  getRVCookies(itemID, limit, itemsPerRow);
  if (itemID != '') {
    iFrameTags = '<iframe name=yahoo height=10 width=100 frameborder=1 src="http://www.racinglab.com/yst-recently-viewed-popup.html?limit=' + limit + '&id=' + escape(itemID) + '&html=' + escape(strToStore) + '" style=visibility:hidden;></iframe><iframe name=yahoo height=10 width=100 frameborder=1 src="http://store.racinglab.com/yst-recently-viewed-popup.html?limit=' + limit + '&id=' + escape(itemID) + '&html=' + escape(strToStore) + '" style=visibility:hidden;></iframe>';
    document.getElementById("cookiesHere").innerHTML = iFrameTags;
  }
}//-->
