<!-- Hide script from old browsers
// Make sure file is not hosted in a different frameset
if ( top.location.href != window.location.href )
  { top.location.href=window.location.href }

    function openWindow(url, w, h) {
        var windowprops = "width=" + w + ",height=" + h + ",,left=10,top=10,scrollbars=yes,status=yes,toolbar=no,location=no,directories=no,resizable=yes";
          popup = window.open(url,'newWin',windowprops);
          popup.close();
          popup = window.open(url,'newWin',windowprops);
          popup.focus();
           } 
        
	function openPicture(pic,w,h) {
     
		var windowprops = "left=160,top=100,scrollbars=no,status=yes,toolbar=no,location=no,directories=no,resizable=yes,width=" + w + ",height=" + h;
          
		picture = window.open('','newPicture',windowprops);
		picture.close();
        picture = window.open('','newPicture',windowprops);  
        picture.focus();
        
		picture.document.write("<html><head><title>Picture<\/title><\/head><body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>")
		picture.document.writeln("<img src=" + pic + " width=" + w + " height=" + h + ">")
		picture.document.write("<\/body><\/html>")
	}                
 
function showdate()
{
	
	// Determine the current date and display it
   	var today = new Date();
   	var day = today.getDay();
   	var date = today.getDate();
   	var month = today.getMonth();
   	var year = today.getFullYear();
   	
   	if (month == 0) {month='Януари'};
   	if (month == 1) {month='Февруари'};
   	if (month == 2) {month='Март'};
   	if (month == 3) {month='Април'};
   	if (month == 4) {month='Май'};
   	if (month == 5) {month='Юни'};
   	if (month == 6) {month='Юли'};
   	if (month == 7) {month='Август'};
   	if (month == 8) {month='Септември'};
   	if (month == 9) {month='Октомври'};
   	if (month == 10) {month='Ноември'};
   	if (month == 11) {month='Декември'};
   
   	if (day == 0) {day='Неделя'};
   	if (day == 1) {day='Понеделник'};
   	if (day == 2) {day='Вторник'};
   	if (day == 3) {day='Сряда'};
   	if (day == 4) {day='Четвъртък'};
   	if (day == 5) {day='Петък'};
   	if (day == 6) {day='Събота'};
   
   if ( document.all ) {
		document.write ('<span class="small">&nbsp;&nbsp;' + day + ' ' + date +  ' ' + month + ' ' + year + 'г. ' + '&nbsp; -&nbsp; Русе 7000, пл. "Свобода" 6</span>');
	} else {
		document.write ('<span class="smallNC">&nbsp;&nbsp;' + day + ' ' + date +  ' ' + month + ' ' + year + 'г. ' + '&nbsp; -&nbsp; Русе 7000, пл. "Свобода" 6</span>');
	}
   
   
}

function copyrightYear(startYear)
{
	d = new Date();
	
	if (startYear != d.getFullYear())
		{
		return startYear + " - " + d.getFullYear();
		}
	else
		{
		return startYear;
		}
}
	

function switchClass(obj,strClassName) {
		obj.className	= strClassName;
	}



function newWindow(id, f)
{
	sUrl = 'shownews.php?id='+id+'&f='+f;
	
	MyWindow = window.open('','MyWindow'); 
	MyWindow.close();
	MyWindow = window.open('','MyWindow','toolbar=yes,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=600,height=400,left=20,top=20'); 
	MyWindow.location = sUrl;
	MyWindow.focus();
	
	return false;
}		

function validateEmail(email)
{
	if ((email.length < 3) || (email.length > 50) || 
			(email.charAt(0) == '@') || (email.charAt(email.length-1) == '@') || 
			(email.charAt(0) == '.') || (email.charAt(email.length-1) == '.') || 
			(email.indexOf('.') == -1) || (email.indexOf('@') == -1) ||
			(email.indexOf('@') != email.lastIndexOf('@')) || 
			(email.indexOf(' ') > 0) || (email.indexOf('?') > 0) || (email.indexOf('..') > 0)
			)
	{
		return false;
	}
	else
	{
		return true;
	}
} 


 	// End hiding script from old browsers -->
