function echeck(str)	
	{
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1)
		  { 
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
		{
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
		{
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1)
		 {
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
		 {
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1)
		 {
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1)
		 {
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 //return true					
	}				
function Display_weather(){
	
var str = '<br><br><br>{literal}<script type="text/javascript" src="http://www.showmyweather.com/weather_widget.php?type=js&country=ca&state=Ontario&city=Ottawa&smallicon=1&current=1&forecast=1&background_color=ffffff&color=000000&width=175&padding=10&border_width=1&border_color=000000&font_size=11&font_family=Verdana&showicons=1&measure=C&d=2011-03-04"></script></a><div style="width:197px;text-align:center;font-size:0.6em;margin-top:0.5em;"><a href="http://www.showmyweather.com/">Powered by Show My Weather</a></div>{/literal}';
/*var str='<br><br><br>{literal}<script type="text/javascript" src="http://weather.ibegin.com/js/us/ky/canada/0/1/1/1/0/custom.js&background_color=ffffff&color=000000&width=175&padding=10&border_width=1&border_color=000000&font_size=11&font_family=Verdana&showicons=1"></script><noscript>View <a href="http://weather.ibegin.com/us/ky/canada/">Weather for Canada, KY</a></noscript>{/literal}';*/
	document.getElementById('weather_div').innerHTML='';
	document.getElementById('weather_div').innerHTML=str;
	document.getElementById('weather_div').style.display='';
}
function ShowWidgetStock(){
	 zxcMaxYScroll=0;
	window.onscroll=zxcStopScroll ;	
	document.getElementById('widgetdiv').style.display='';
	//document.getElementById('widgetframe').style.marginWidth='25px';
	var parentdiv = document.getElementById('parentdiv');
	parentdiv.style.position = 'absolute';
	parentdiv.style.height='440px';
	parentdiv.style.marginTop='-220px';
	parentdiv.style.width='280px';
	parentdiv.style.marginLeft='-140px';
	parentdiv.style.top='50%';
	parentdiv.style.left='50%';
	var widgetframe = document.getElementById('widgetframe');
	widgetframe.src='http://www.sanebull.com/widget_world_watch.jsp?market=all';
	
	widgetframe.width='210';
	widgetframe.height='410'; 
}
function ShowWidgetWeather(){
	 zxcMaxYScroll=0;
	window.onscroll=zxcStopScroll ;
	var parentdiv = document.getElementById('parentdiv');
	var widgetframe = document.getElementById('widgetframe');
	widgetframe.style.width = '900px';
	document.getElementById('widgetdiv').style.display='';
	//widgetframe.src='http://www.amchamcanada.ca/index.php?action=weather';
	widgetframe.src='../weather.html';
	
	parentdiv.style.position = 'absolute';
	parentdiv.style.top='50px';
	parentdiv.style.left='50%';
	parentdiv.style.width='1000px';
	parentdiv.style.marginLeft='-417px';
	widgetframe.width='835';
	
	parentdiv.style.height='720px';
	parentdiv.style.marginTop='0px';
	widgetframe.style.align='middle';
	widgetframe.height='700'; 
}
function ShowWidgetCurrency()
{
	 zxcMaxYScroll=0;
	window.onscroll=zxcStopScroll ;
	var parentdiv = document.getElementById('parentdiv');
	var widgetframe = document.getElementById('widgetframe');
	parentdiv.style.position = 'absolute';
	parentdiv.style.top='50%';
	parentdiv.style.left='50%';
	document.getElementById('widgetdiv').style.display='';
	//widgetframe.src='http://freeserv.dukascopy.com/chart/?ql=9&interval=60&points_number=10&view_type=line&width=337&height=220&osc_type=-1&osc_height=100&p1=2&p2=3&p3=7&c=&rfi=false&show_labels=true&show_border=true';
	//widgetframe.src='http://www.currencyhouse.com/amcham-rates.php';
	widgetframe.src='../currency.html';
	//widgetframe.src='http://gocurrency.com/v2/table_t.php?cur=USD;EUR;GBP;JPY;CAD;AUD&v=1';

	parentdiv.style.width='400px';
	parentdiv.style.marginLeft='-200px';
	parentdiv.style.marginTop='-200px';
	parentdiv.style.height='400px';

	widgetframe.width='400';
	widgetframe.style.width='400px';
	widgetframe.height='380'; 
}

function ShowWidgetEvent(){
	 zxcMaxYScroll=0;
	window.onscroll=zxcStopScroll ;
	var parentdiv = document.getElementById('parentdiv');
	var widgetframe = document.getElementById('widgetframe');
	parentdiv.style.position = 'absolute';
	parentdiv.style.top='50%';
	parentdiv.style.left='50%';
	document.getElementById('widgetdiv').style.display='';

	parentdiv.style.width='340px';
	parentdiv.style.marginLeft='-170px';
	parentdiv.style.marginTop='-142px';
	parentdiv.style.height='285px';
	widgetframe.src='http://www.amchamcanada.ca/index.php?action=eventwidget';
	widgetframe.width='340';
	widgetframe.height='270'; 
}

var zxcMaxYScroll=0;
var zxcWS;

function zxcStopScroll(){
	if (document.all){ 
		zxcWS=document.body.scrollTop; 
	}else { 
		zxcWS=window.pageYOffset; 
	}
	//alert(zxcMaxYScroll);
	//alert(zxcWS);
	//
	if (zxcWS>zxcMaxYScroll){ 
		window.scroll(0,zxcMaxYScroll); 
		window.Mousewheel(0,zxcMaxYScroll); 
	}
}


function CloseWidget()
 {
 	document.getElementById('widgetdiv').style.display='none';
	document.getElementById('widgetframe').src='';
	
	zxcWS=-1;
	zxcMaxYScroll=300;
	//alert("zxcWS"+zxcWS);
 }


