function swon(c,v)
{;
}
function  embedFlash(fileName, lib, tm, w, h)
{

/*
(c) Flash ActiveX IE fix by Ivan Turuk. http://www.newagelab.com
Put this function in external js file

fileName - path to flash file
lib - flash variables
tm - flash timestamp for anticaching
w - width
h - height
*/

var flob='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+w+'" height="'+h+'" id="picture" align="middle">';
flob+='<param name="allowScriptAccess" value="sameDomain" />';
flob+='<param name="movie" value="'+fileName+'?' + tm + '" />';
flob+='<param name="quality" value="high" />';
flob+='<PARAM NAME=FlashVars VALUE="'+lib+'">';
flob+='<PARAM NAME=wmode VALUE="transparent">';
flob+='<param name="bgcolor" value="#eaeff4" />';
flob+='<embed src="'+fileName+'?' + tm + '" quality="high" wmode="transparent" FlashVars="'+lib+'" bgcolor="#eaeff4" width="'+w+'" height="'+h+'" name="picture" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
flob+='</object>';
document.write(flob);
}

function submit_form (id){
	  document.getElementById(id).submit();
}


function testMailAndPopup(email, msg){
	var splitted = email.match("^(.+)@(.+)$");
	if(splitted == null) {
		alert(msg);
		return false;
	}
	if(splitted[1] != null) {
		var regexp_user=/^\"?[\w-_\.]*\"?$/;
		if(splitted[1].match(regexp_user) == null) {
			alert(msg);
			return false;
		}
	}
	if(splitted[2] != null) {
		var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
		if(splitted[2].match(regexp_domain) == null) {
			var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
			if(splitted[2].match(regexp_ip) == null) {
				alert(msg);
				return false;
			}
		}
		var w = 260;
		var h = 180;
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		if (navigator.appName=="Netscape") {
			winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,' +
			'location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
		} else {
			winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,' +
			'location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no';
		}
		win = window.open( 'about:blank', 'popup', winprops);
		document.forms['sendform'].target = 'popup';
		return true;
	}
	alert(msg);
	return false;
}

// JavaScript Document
function timeSource(){
   x=new Date(timeNow().getUTCFullYear(),timeNow().getUTCMonth(),timeNow().getUTCDate(),timeNow().getUTCHours(),timeNow().getUTCMinutes(),timeNow().getUTCSeconds());
   x.setTime(x.getTime()+7200000);
   return x;
}
function timeNow(){
   return new Date();
}
function leadingZero(x){
   return (x>9)?x:'0'+x;
}
function displayTime(){
   document.getElementById('disp').innerHTML=eval(outputTime);
   setTimeout('displayTime()',1000);
}
var outputTime="leadingZero(timeSource().getHours()+1)+':'+leadingZero(timeSource().getMinutes())+':'+leadingZero(timeSource().getSeconds())";

function strt()
{
	displayTime();
}


function OpenPopup(popupurl,windowwidth,windowheight)
{
	var popWidth = 0;
	var popHeight= 0;
	popWidth = 870;

	if(windowwidth  == "") windowwidth = 670;
	if(windowheight == "") windowheight = 502;

	// add 0.01 to windowwidth as X40 ASP rounding slightly differs from Javascript rounding
	popHeight=Math.round((popWidth*windowheight)/(parseFloat(windowwidth)+0.01));

	if(windowwidth > popWidth || windowheight > popHeight){
		windowwidth  = popWidth;
		windowheight = popHeight;
	}	

	if(popEnlarge!=null && !popEnlarge.closed){ 
	popEnlarge.close(); 
	}
	var URL = popupurl;				
  var windowName = "EnlargedImage";
	
	{if(windowheight != "0") windowheight = parseInt(windowheight) + 80;}
  var features = "top=10,left=10,width=" + windowwidth + ",height=" + windowheight + ",menubar=no,location=no,resizable=no,scrollbars=no,toolbar=no,status=yes";

  popEnlarge = window.open (URL, windowName, features);
  popEnlarge.focus();
}