
var message="";

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")






// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 4

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'images/a_1.jpg'
Pic[1] = 'images/a_4.jpg'
Pic[2] = 'images/a_3.jpg'
Pic[3] = 'images/a_4.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//-->
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed2 = 3000

// Duration of crossfade (seconds)
var crossFadeDuration2 = 4

// Specify the image files
var Pic2 = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic2[0] = 'images/b_1.jpg'
Pic2[1] = 'images/b_2.jpg'
Pic2[2] = 'images/b_3.jpg'
Pic2[3] = 'images/b_3.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t2
var j2 = 0
var p2 = Pic2.length

var preLoad2 = new Array()
for (i = 0; i < p2; i++){
   preLoad2[i] = new Image()
   preLoad2[i].src = Pic2[i]
}

function runSlideShow2(){
   if (document.all){
      document.images.SlideShow2.style.filter="blendTrans(duration=2)"
      document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow2.filters.blendTrans.Apply()      
   }
   document.images.SlideShow2.src = preLoad2[j].src
   if (document.all){
      document.images.SlideShow2.filters.blendTrans.Play()
   }
   j2 = j2 + 1
   if (j2 > (p2-1)) j2=0
   t2 = setTimeout('runSlideShow2()', slideShowSpeed2)
}
//-->
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed3 = 4000

// Duration of crossfade (seconds)
var crossFadeDuration3 = 4

// Specify the image files
var Pic3 = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic3[0] = 'images/c_1.jpg'
Pic3[1] = 'images/c_2.jpg'
Pic3[2] = 'images/c_3.jpg'
Pic3[3] = 'images/c_4.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t3
var j3 = 0
var p3 = Pic3.length

var preLoad3 = new Array()
for (i = 0; i < p3; i++){
   preLoad3[i] = new Image()
   preLoad3[i].src = Pic3[i]
}

function runSlideShow3(){
   if (document.all){
      document.images.SlideShow3.style.filter="blendTrans(duration=2)"
      document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow3.filters.blendTrans.Apply()      
   }
   document.images.SlideShow3.src = preLoad3[j].src
   if (document.all){
      document.images.SlideShow3.filters.blendTrans.Play()
   }
   j3 = j3 + 1
   if (j3 > (p3-1)) j3=0
   t3 = setTimeout('runSlideShow3()', slideShowSpeed3)
}



//-->
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed4 = 3000

// Duration of crossfade (seconds)
var crossFadeDuration4 = 4

// Specify the image files
var Pic4 = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic4[0] = 'images/d_1.jpg'
Pic4[1] = 'images/d_4.jpg'
Pic4[2] = 'images/d_3.jpg'
Pic4[3] = 'images/d_3.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t4
var j4 = 0
var p4 = Pic4.length

var preLoad4 = new Array()
for (i = 0; i < p4; i++){
   preLoad4[i] = new Image()
   preLoad4[i].src = Pic4[i]
}

function runSlideShow4(){
   if (document.all){
      document.images.SlideShow4.style.filter="blendTrans(duration=2)"
      document.images.SlideShow4.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow4.filters.blendTrans.Apply()      
   }
   document.images.SlideShow4.src = preLoad4[j].src
   if (document.all){
      document.images.SlideShow4.filters.blendTrans.Play()
   }
   j4 = j4 + 1
   if (j4 > (p4-1)) j4=0
   t4 = setTimeout('runSlideShow4()', slideShowSpeed4)
}
//====>>


function checkEmailValid(emailStr,msg)
{
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	var errMsg="";   
	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) 
	{
	   errMsg=errMsg+"The "+msg+"email address seems incorrect!";
	   return errMsg;
	}
	else
	{
	  var user=matchArray[1]
	  var domain=matchArray[2]
	  if (user.match(userPat)==null) 
	  {
		errMsg=errMsg+"The "+msg+"email address seems incorrect!";
		return errMsg;       
	  }
	  var IPArray=domain.match(ipDomainPat)
	  if (IPArray!=null) 
	  {
		  for (var i=1;i<=4;i++) 
			  {
			if (IPArray[i]>255) 
				{
				errMsg=errMsg+"The "+msg+"email address seems incorrect!";
				return errMsg;
				}//IF
			  }//for
	   }//IP Array
	   var domainArray=domain.match(domainPat)
	   if (domainArray==null) 
	   {
		 errMsg=errMsg+"The "+msg+"email address seems incorrect!";
		 return errMsg;
	   }
	   var atomPat=new RegExp(atom,"g")
	   var domArr=domain.match(atomPat)
	   var len=domArr.length
	   if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3) 
	   {
		 errMsg=errMsg+"The "+msg+"email address seems incorrect!";
		 return errMsg;	
	   } 
	   if (len<2) 
	   {
		 errMsg=errMsg+"The "+msg+"email address seems incorrect!";
		 return errMsg;	 
	   } 
	 }//End  Match
	return "0";
}


function checkContactUs()
{
	if (document.frmData.strContactName.value=="" || document.frmData.strContactName.value==" " || document.frmData.strContactName.value=="-" || document.frmData.strContactName.value=="_" || document.frmData.strContactName.value==".")
	{
		alert("Please enter your contact name!");
		return false;
	}
	var e=document.frmData.strEmail.value;
	if(e=="" || e==" ")
	{
		alert("Please enter your email address!");
		return false;
	}
	if (checkEmailValid(e)!="0") 
	{
		alert(checkEmailValid(e,''));
		return false;	
	}
	if (document.frmData.strMessage.value=="" || document.frmData.strMessage.value==" " || document.frmData.strMessage.value=="-" || document.frmData.strMessage.value=="_" || document.frmData.strMessage.value==".")
	{
		alert("Please enter your message!");
		return false;
	}	
	return true;
}
