<!--
function allhide() {
	document.getElementById('about').style.display='none';
	document.getElementById('services').style.display='none';
	document.getElementById('project').style.display='none';
	document.getElementById('portfolio').style.display='none';
	document.getElementById('quote').style.display='none';
	document.getElementById('contact').style.display='none';
	//document.getElementById('demo').style.display='none';
}
function titleshow(pagename) {
	//alert('hi');
	document.getElementById(pagename).style.display='block';
}
function showabout() {
	allhide();
	document.getElementById('about').style.display='block';
}
function showservices() {
	allhide();
	document.getElementById('services').style.display='block';
}
function showproject()	{
	allhide();
	document.getElementById('project').style.display='block';
}
function showportfolio()	{
	allhide();
	document.getElementById('portfolio').style.display='block';
}
function showquote()	{
	allhide();
	document.getElementById('quote').style.display='block';
}
function showcontact()	{
	allhide();
	document.getElementById('contact').style.display='block';
}
function showdemo()	{
	allhide();
	document.getElementById('demo').style.display='block';
}







if (top.frames.length!=0) top.location=self.document.location;
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function swSetup() {
	var img, sh, sn, sd
	for (var i = 0; (img = document.images[i]); i++) {
		if (img.getAttribute) {

			sn = img.getAttribute("src");
			sh = img.getAttribute("hsrc");
			sd = img.getAttribute("dsrc");

			if (sn != "" && sn != null) {
				img.n = new Image();
				img.n.src = img.src;
			
				if (sh != "" && sh != null) {
					img.h = new Image();
					img.h.src = sh;
					img.onmouseover = swSwapOn
					img.onmouseout  = swSwapOff
				}

				if (sd != "" && sd != null) {
					img.d = new Image();
					img.d.src = sd;
					img.onmousedown = swSwapDown
				}
			}
		}
	}
}

function swSwapOn() {
	this.src = this.h.src;
}

function swSwapOff() {
	this.src  = this.n.src;
}

function swSwapDown() {
	this.src  = this.d.src;
	this.temp = typeof(document.onmouseup) != 'undefined' && typeof(document.onmouseup) != 'unknown' ? document.onmouseup : "";
	swSwapUp.img = this;
	document.onmouseup = swSwapUp;
}

function swSwapUp() {
	var ths = swSwapUp.img;
	ths.src = ths.n.src;
	if (ths.temp) document.onmouseup = ths.temp;
}



var iEmail ="Please enter a valid email address (like foo@bar.com).";
function stripSpaces(x) {
X=x.value;
var a=X.replace(/^\W+/,'');
return a;
}

function isEmail (s1){
re=/\w+@\w+\.\w+/;
var a=re.test(s1);
	if(!a){
	return false;
	}
	else{
	return true;
	}
}
function warnInvalid (theField,s){
alert(s);
theField.focus();
return false;
}
function checkEmail (theField, emptyOK){
	if(!isEmail(theField.value)){
	return warnInvalid (theField,iEmail);
	}
	else{
	 return true;
	}
}
function blank(){
var name=stripSpaces(document.feedback.name);
var email=stripSpaces(document.feedback.email);
var phone=stripSpaces(document.feedback.phone);
var intersted=stripSpaces(document.feedback.intersted);
var enquiry=stripSpaces(document.feedback.enquiry);
var validator= stripSpaces(document.feedback.validator);
	if((name && email && phone && intersted && enquiry && validator)!='') {
	var checkmail=checkEmail(document.feedback.email,false);
	 if(checkmail) {
			        if (document.feedback.enquiry.value.length>550){
	                    alert('Your Enquiry/Comments is too long');
	                      return false;
	        }
            	else{
		           return true;
		}
	 }
	 else{
	   return false;
	 }
       }
       else {
		alert("Please fill all * marked fields.");
		return false;
       }
}

function members(){
var uname=stripSpaces(document.login.uname);
var pwd=stripSpaces(document.login.pwd);
if((uname && pwd) == ''){
alert('Please enter the Username and Password');
return false;
}
else{
return true;
}
}

