var popupWindow = null;

function showScreenshot(url, txtElem) {

    window.name = "clcmain";
    
    var line = "screenshot.php?imgsrc=" + url;
    
    if (txtElem) {
    
	line = line + "&txtElem=" + txtElem;
    
    }
    
    var theWindow = window.open(line, "popup", 'scrollbars = yes, status = no, resizable = yes');
    
    if (theWindow) {
    
	theWindow.focus();
	popupWindow = theWindow;	
    
    }
    
}

function closePopupWindow() {

    if(popupWindow != null) {
    
	popupWindow.close();
	
    }
    
}

function showFlash(url) {

    var theWindow = window.open(url, "flash", 'width=785, height=529 scrollbars = no, status = no, resizable = yes');
    
    if (theWindow) {
    
	theWindow.focus();
	
    }

}

function showFlashNew(url) {

    var theWindow = window.open(url, "flash", 'width=856, height=592 scrollbars = no, status = no, resizable = yes');
    
    if (theWindow) {
    
	theWindow.focus();
	
    }

}

function checkNewsForm() {

    if ((document.newsletter.email.value == "") || (!document.newsletter.email.value.match(/^[\w\._\-]+@[\w\._\-]+[.][a-zA-Z]+$/))) {
    
	alert("Please write a valid email address");
	return false;
	
    }
					    
    return true;

}	

function checkSearchForm() {

    if ((document.searchform.searchword.value == "Enter your search here") || (document.searchform.searchword.value == "")) {
    
	alert("Please enter your search");
	return false;
	
    }
					    
    return true;

}	
			
