window.onload=init;
var l=0;
var flag=0;
var lowerLimit=-430;
var upperLimit=430;
var to="";
var isExtended = 0;
function slideSideBar(){
	new Effect.toggle('sideBarContents', 'blind', {scaleX: 'true', scaleY: 'true;', scaleContent: false});
	if(isExtended==0){
		$('sideBarTab').childNodes[0].src = $('sideBarTab').childNodes[0].src.replace(/(\.[^.]+)$/, '-active$1');
		new Effect.Fade('sideBarContents',
   		{ duration:1.0, from:0.0, to:1.0 });
		isExtended++;
	}
	else{
		$('sideBarTab').childNodes[0].src = $('sideBarTab').childNodes[0].src.replace(/-active(\.[^.]+)$/, '$1');
		new Effect.Fade('sideBarContents',
   		{ duration:1.0, from:1.0, to:0.0 });
		isExtended=0;
	}
}
function $$$(o) { return document.getElementById(o); }
function init(){
    if($$$('flashdiv2')){
        var fo = new SWFObject("index.swf", "flashdiv2", "1263","690", "9.0.0", "#000000");
    	fo.addParam("wmode", "opaque");
		fo.addParam("scale", "exactfit");
		
    	fo.write("flashdiv2");
    }
    if($$$('gmap')){
        var fo = new SWFObject("gmap.swf", "gmap", "970","620", "9.0.0", "#000000");
    	fo.addParam("wmode", "opaque");
    	fo.write("gmap");
    }
	/*Event.observe('sideBarTab', 'click', slideSideBar, true);
	$$$('flashdiv2').style.zIndex="9999"; $$$('flashdiv2').style.zIndex=99;*/
}
function validate(){
	var n=$$$('fname').value;
	var e=$$$('email').value;
	if(n.length<4){ $$$('msg').innerHTML="Please enter your full name"; return false;}
	if(!rochak.isValidEmail(e)){ $$$('msg').innerHTML="Please enter a valid email"; return false;}
	return true;
}