var searchLink;
var searchError;
var imgs = new Array();
var imgshi = new Array();

function PopIt(url,width,height,options){
if(typeof(url)!='undefined'){
if(typeof(width)=='undefined')width=600;
if(typeof(height)=='undefined')height=500;
if(typeof(options)=='undefined')options='status=no,scrollbars=auto,location=no,menubar=no,resizable=yes,toolbar=0';
window.open(url,'IFAW','width='+width+',height='+height+','+options);
}
} 

function PopIt2(url,width,height,options){
if(typeof(url)!='undefined'){
if(typeof(width)=='undefined')width=600;
if(typeof(height)=='undefined')height=500;
if(typeof(options)=='undefined')options='status=no,scrollbars=auto,location=no,menubar=no,resizable=yes,toolbar=0';
oPopOut = window.open('','IFAW','width='+width+',height='+height+','+options);


oPopOut.document.writeln("<HTML><HEAD></HEAD><body bgcolor='#333333'><div align='center'><img src='" + url + "'></div></body></html>");
oPopOut.document.close();
}
} 



function Hightlight(i, img) { if (typeof(imgshi[i])!='undefined') img.src = imgshi[i].src; }
function DeHightlight(i, img) { img.src = imgs[i]; }

function PreLoad(i, dark, light) {
if (imgs[i] == null) {
imgs[i] = dark.src;
imgshi[i] = new Image();
imgshi[i].src = light;
}
}

function configureSearch(link, error) {
searchLink = link;
searchError = error;
}

function submitSearch(){
var val = document.forms[0]._txtSearch.value;
if(val!=''){
document.forms[0].hidTextSearch.value=val;
document.forms[0].newSearch.value='yes';
document.forms[0].action=searchLink;
document.forms[0].submit();
return false;
}
else{
alert(searchError);
}
}

function submitSearchOnEnter() {
if (event.keyCode == 13)  {
submitSearch();
return false;
}
}