// JavaScript Document
function AddToFavorites(url,title) {
	if(document.all) {window.external.AddFavorite(url,title);}
}

function PutMail(name,domain,subject,text) {
	if(!text) {text = name+'@'+domain;}
	if(subject) {subject = '?Subject='+subject;}
	document.write('<a href=\"mailto:'+name+'@'+domain+subject+'\">'+text+'</a>');
}

function OpenPictureWindow(imageName,imageWidth,imageHeight,alt,leaveOpened) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+(Math.round(window.screen.availWidth/2)-Math.round(imageWidth/2))+",top="+(Math.round(window.screen.availHeight/2)-Math.round(imageHeight/2)));
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"');
	if (!leaveOpened) {newWindow.document.write('onBlur="self.close()"');}
	newWindow.document.write('>'); 
	newWindow.document.write('<a href="javascript:;"');
	if (!leaveOpened) {newWindow.document.write(' onclick="self.close();"');}
	newWindow.document.write('><img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' border="0" alt=\"'+alt+'\"'+'galleryimg=\"no\"></a>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function OpenNewWindow(theURL,winWidth,winHeight,verticalScroll) {
	var newWindow
	var vScroll = verticalScroll ? "yes" : "no";
	newWindow = window.open(theURL,'',"width="+winWidth+",height="+winHeight+",scrollbars="+vScroll+",left="+(Math.round(window.screen.availWidth/2)-Math.round(winWidth/2))+",top="+(Math.round(window.screen.availHeight/2)-Math.round(winHeight/2)));
}

function hov(loc,cls){
	if(loc.className) { loc.className=cls; }
}
