function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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];}}
}
//Checks if the supplied fields are empty and highlights field in red if so
function ContactFormValidation (sFieldIDs) {
	var i;
	var arrFields = sFieldIDs.split(":");
	var currField;
	var borderstyle = "1px solid #000000";
	var bgcolorstyle = "#759DA9";
	var bSubmitForm = true;
	var email= /^[\w-\.]+\@[\w\.-]+\.[a-zA-Z]{2,4}$/;
	
	for (i = 0; i < arrFields.length; i++) {
		// Get form field reference
		currField = document.getElementById(arrFields[i]);
		
		// Check for null in the case of a non existing html element
		if (currField != null) {
			// Set fields style to default
			SetBorderStyle(currField, "default");
			
			// If field is empty then set the style to red background and border
			if (currField.name.toLowerCase() == "email" && (!(email.test(currField.value)))) {
				SetBorderStyle(currField, "error");
				bSubmitForm = false;
			}
			else if (currField.value == "") {
				SetBorderStyle(currField, "error");
				bSubmitForm = false;
			}
		}
	}
	return bSubmitForm;
}
function SetBorderStyle(fldFormField, fDefaultOrError){
	if (fDefaultOrError.toLowerCase() == "error") {
		borderstyle = "1px solid #ea172a";
		bgcolorstyle = "#ffc0c0";
	}
	else if (fDefaultOrError.toLowerCase() == "default") {
		borderstyle = "1px solid #a7a6aa";
		bgcolorstyle = "#FFFFFF";
	}
	
	fldFormField.style.border = borderstyle;
	fldFormField.style.background = bgcolorstyle;
}

function hide_sub() {
	document.getElementById("arrow").style.visibility="hidden";
	document.getElementById("sub_profile").style.left="-13999px";	
	document.getElementById("sub_client").style.left="-12999px";	
	document.getElementById("sub_services").style.left="-10999px";	
	document.getElementById("arrow").style.right = "545px";
	}

function display_profile_sub() {
	document.getElementById("arrow").style.visibility="visible";
	document.getElementById("sub_profile").style.left="auto";	
	document.getElementById("sub_client").style.left="-12999px";	
	document.getElementById("sub_services").style.left="-10999px";	
	document.getElementById("arrow").style.right = "545px";
	}
	
function display_whatsnew_sub() {
	document.getElementById("arrow").style.visibility="visible";
	document.getElementById("sub_profile").style.left="-13999px";	
	document.getElementById("sub_client").style.left="-12999px";	
	document.getElementById("sub_services").style.left="-10999px";	
	document.getElementById("arrow").style.right = "160px";
	}

function display_clients_sub() {
	document.getElementById("arrow").style.visibility = "visible";
	document.getElementById("sub_profile").style.left="-13999px";	
	document.getElementById("sub_client").style.left="auto";	
	document.getElementById("sub_services").style.left="-10999px";	
	document.getElementById("arrow").style.right = "260px";
	}
	
function display_services_sub() {
	document.getElementById("arrow").style.visibility = "visible";
	document.getElementById("sub_profile").style.left="-13999px";	
	document.getElementById("sub_client").style.left="-12999px";	
	document.getElementById("sub_services").style.left="auto";	
	document.getElementById("arrow").style.right="460px";
	}
	
function bold_sub_active_link() {
	
	var url = location.href;
	var links = document.links;
	for (i=0; i< links.length; i++) {
		
		
		
		if(links[i].href == url)
			{
				links[i].style.fontWeight = "bold";
			}
			
		
			
		}
	
	}


function map_about_us_img() {
	
	
var img = "http://connetik.com/webcura/files/242026_img_banner_about_us.jpg";

var img2 = "http://www.connetik.com/webcura/files/242026_img_banner_about_us.jpg";
var img3 = "http://connetik.com/webcura/files/243559_img_banner_contact_us.jpg";
var img4 = "http://www.connetik.com/webcura/files/243559_img_banner_contact_us.jpg";

var imgArray = document.images;

for (i=0; i< imgArray.length; i++) {

		if(imgArray[i].src == img || imgArray[i].src == img2 || imgArray[i].src == img3 || imgArray[i].src == img4)
			{
				
				imgArray[i].name = "about_us";
				imgArray[i].useMap = "#Map";
				document.getElementById('map').innerHTML = '<map name="Map">  <area shape="rect" coords="372,112,536,142" href="http://www.linkedin.com/profile/view?id=72358478&authType=name&authToken=iCeY" target="_blank" alt="Follow us on LinkedIn"><area shape="rect" coords="373,145,537,176" href="http://www.facebook.com/pages/Connetik-Interactive/61015682241" target="_blank" alt="Follow us on Facebook"><area shape="rect" coords="373,178,535,207" href="http://twitter.com/connetik" target="_blank" alt="Follow us on Twitter"></map>';
			}
			
		
			
		}
	
	 }
	



