function OpenNewWindow(val) {	window.open(val,'Detail','width=400,height=500,top=20,left=20,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,copyhistory=yes,resizable=yes'); }

function IsEmailValid(FormName,ElemName)
{
var EmailOk  = true
var Temp     = document.forms[FormName].elements[ElemName]
var AtSym    = Temp.value.indexOf('@')
var Period   = Temp.value.lastIndexOf('.')
var Space    = Temp.value.indexOf(' ')
var Length   = Temp.value.length - 1   // Array is from 0 to length-1

if ((AtSym < 1) ||                     // '@' cannot be in first position
    (Period <= AtSym+1) ||             // Must be atleast one valid char btwn '@' and '.'
    (Period == Length ) ||             // Must be atleast one valid char after '.'
    (Space  != -1))                    // No empty spaces permitted
   {  
      EmailOk = false
      Temp.focus()
   }
return EmailOk
}

function GoTo(box) {
if ((-1 < box.selectedIndex) && (box.options[box.selectedIndex].value != 'nil')) {
	val = box.options[box.selectedIndex].value;
	if (val.lastIndexOf(',') != -1) {
		window.location = ((val.substring(0,val.lastIndexOf(","))), (val.substring((val.lastIndexOf(",")+1) , val.length)));
	} else {
		window.location = (val);
		}
	}
	return true;
}



//Rotate the flags.
adImages = new Array("/images/translations/japan.gif","/images/translations/china.gif","/images/translations/russia.gif","/images/translations/germany.gif","/images/translations/italy.gif","/images/translations/brazil.gif","/images/translations/netherlands.gif","/images/translations/spain.gif","/images/translations/thailand.gif","/images/translations/southkorea.gif")
quote = new Array("International chemical industry knowledge","International chemical industry knowledge","International chemical industry knowledge","International chemical industry knowledge","International chemical industry knowledge","International chemical industry knowledge","International chemical industry knowledge","International chemical industry knowledge","International chemical industry knowledge","International chemical industry knowledge")

thisAd = 0
imgCt = adImages.length
quoteCt = quote.length

function rotate() {
  if (document.images) {
    if (document.cycle.complete) {
	  thisAd++
	  if (thisAd == imgCt && thisAd == quoteCt) {
	    thisAd = 0
	  }
	  document.cycle.src = adImages[thisAd];
      window.defaultStatus = quote[thisAd];
	}
	// This sets the interval to which the images and quotes are rotated. 1000 equals 1 second
	setTimeout("rotate()", 3500)
  }
}


