function FIND(item) {
  if (document.all) return(document.all[item]);
  if (document.getElementById) return(document.getElementById(item));
  return(false);
}

function SWAP(a,b) {
	var path="";
	path=path+b;
	FIND(a).src=path;
}
function validate(Form){
	
	var name, mail, message;
	
	name=Form.name.value;
 	mail=Form.mail.value;
	message=Form.message.value;
	FIND('name').className='frmNoError';
	FIND('mail').className='frmNoError';
	FIND('message').className='frmNoError';
		
	if((name=="") || (mail=="") || (mail.indexOf("@")==-1) || (mail.indexOf(".")==-1) || (message=="")) {
		if (name=="") {FIND('name').className='frmError';}
		if ((mail=="") || (mail.indexOf("@")==-1) || (mail.indexOf(".")==-1)) {FIND('mail').className='frmError';}
		if (message=="") {FIND('message').className='frmError';}
		return false;		
	}
	else {Form.submit();}
}
function openWindow(URL,windowName) {
	features="width=800, height=600, toolbar=no, status=no, resizable=yes, menubar=no, location=no, scrollbars=yes";
  newwin=window.open(URL,'windowName','features');
  newwin.focus();
}
function popImage(imageURL,imageTitle){

PositionX = 0;
PositionY = 0;

defaultWidth  =10;
defaultHeight = 10;

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;


if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>'+imageTitle+'</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');

writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=123-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["product"].width;');writeln('window.innerHeight=document.images["product"].height;}}');
writeln('</sc'+'ript>');
writeln('</head><body style="margin:0px; overflow:hidden;" onload="reSizeToImage();self.focus();">')

writeln('<img name="product" src='+imageURL+' style="display:block"></body></html>');
close();		
}}

