var arImages=new Array('','');

function preloadImages()
{
	var argv = preloadImages.arguments;
	
	for (var i = 0; i < argv.length; i++)
	{
		arImages[i]=new Image();
		arImages[i].src=argv[i];
	}

}


function highlightOn(obj, idx)
{
	obj.style.backgroundImage = 'url('+arImages[idx].src+')';
}

function highlightOff(obj)
{
	obj.style.backgroundImage = '';
}

function writeMail(user, domain, style)
{
	this.document.write('<a href="mailto: '+user+'@'+domain+'" class='+style+'>'+user+'@'+domain+'</a>');
}

function openblankwin(url,wn,width,height)
{
	window.open(url,wn,'width=' + width + ',height=' + height + ',top=150, left=250, scrollbars');
}

function opiswin( aURL, aWinName )
{
   var wOpen;
   var sOptions;

   sOptions = 'status=0,menubar=0,scrollbars=1,resizable=1,toolbar=0';
   sOptions = sOptions + ',width=800';
   sOptions = sOptions + ',height=600';
   sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

   wOpen = window.open( '', aWinName, sOptions );
   wOpen.location = aURL;
   wOpen.focus();
   wOpen.moveTo( 0, 0 );
   
}


function opiswinfull( aURL, aWinName )
{
   var wOpen;
   var sOptions;

   sOptions = 'status=0,menubar=1,scrollbars=1,resizable=1,toolbar=0';
   sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
   sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
   sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

   wOpen = window.open( '', aWinName, sOptions );
   wOpen.location = aURL;
   wOpen.focus();
   wOpen.moveTo( 0, 0 );
   wOpen.resizeTo( screen.availWidth, screen.availHeight );
}


function hint_win (event, url) 
{
	var width = 350;
	var height = 400;
	var padding = 20;
	
	var x = event.clientX + padding;
	var y = event.clientY + padding;
	var right = x + width;
	var bottom = y + height;
	
	if (bottom > 700) y = 700 - height;
	if (y < 0) y = 0;
	if (right > 1000) x = 1000 - width;

	
	window.open(url,'faq','left='+x+',top='+y+',width='+width+',height='+height+',toolbar=no,statusbar=no,scrollbars=yes');
	return false;
	
	
}
