<!---

function closewindow(){

window.opener.location.reload();
window.close();
	
}

function popUp($url,w,h) {
   mywindow = window.open ($url,"mywindow","location=0,status=0,scrollbars=1,toolbar=0,menubar=0,titlebar=0,width=" + w + ",height=" + h + "");
  mywindow.moveTo(300,200);
 }
 
 function http(field){
 field.value=field.value.replace('http://','');
 } function http(field){
 field.value=field.value.replace('http://','');
 }
 
 function nav(state,id){
	strsrc = element(id).src;
	
	if(state == "on"){
	element(id).src = strsrc.replace('off','on');	
	} else {
	element(id).src = strsrc.replace('on','off');	
	}
	 
	 
 }
 
 /*/
function popUp($url,w,h) {
	var rand = Math.random();
   mywindow = window.open($url,rand,"location=0,status=0,scrollbars=1,toolbar=0,menubar=0,titlebar=0,width=" + w + ",height=" + h + "");
  mywindow.moveTo(300,200);
 }/*/
 function element(id){
	 return document.getElementById(id);
 }
 
 
 function pdf(type,id){
	
element('niframe').src='dl2.php?type='+type+'&id='+id;


}
 
function CheckContact(theform){

var error = "";
/*//*/
error += dropdown(theform.title,"Please choose your Title");
error += isBlank(theform.name.value,"Please enter your Name");
error += isBlank(theform.surname.value,"Please enter your Surname");
error += checkEmail(theform.email.value,"Please enter a valid Email Address");
error += isEmptyNum(theform.tel.value,"Please enter a valid Phone Number");
error += isBlank(theform.comments.value,"Please enter your comments or questions");

if(error != ""){ alert(error); return false; }  // else { return true; }
}

function CheckContact2(theform){

var error = "";
/*//*/
error += isBlank(theform.name.value,"Please enter your Full Name.");
error += isBlank(theform.company.value,"Please enter your Company Name.");
error += isEmptyNum(theform.tel.value,"Please enter a valid Phone Number.");
error += checkEmail(theform.email.value,"Please enter a valid Email Address.");
error += isBlank(theform.services_required.value,"Please list the Services you require.");
error += isBlank(theform.project_description.value,"Please describe your Project Requirements.");

if(error != ""){ alert(error); return false; }  // else { return true; }
}

function CheckApp(theform){

var error = "";
/*//*/
error += isBlank(theform.company.value,"Please enter your Company Name.");
error += dropdown(theform.title,"Please choose your Title.");
error += isBlank(theform.name.value,"Please enter your Name.");
error += isBlank(theform.surname.value,"Please enter your Surname.");
error += isBlank(theform.position.value,"Please enter your Position in the company.");
error += isEmptyNum(theform.tel.value,"Please enter a valid Phone Number");
error += checkEmail(theform.email.value,"Please enter a valid Email Address");
error += dropdown(theform.cat,"Please select you Nearest Region.");
error += isBlank(theform.country.value,"Please enter your Country.");
error += isBlank(theform.username.value,"Please enter a Username.");
error += isBlank(theform.password.value,"Please enter a Password.");
error += fieldmatch(theform.password.value,theform.password2.value,"Your passwords do no Match.");

if(error != ""){ alert(error); return false; }  // else { return true; }
}


function over(src,state){
	if(state == "on"){
	document.getElementById(src).src='images/salamanav-over_'+src+'.jpg';	
	}
	if(state == "off"){
	document.getElementById(src).src='images/salamanav_'+src+'.jpg';	
	} 
}
/*/ 
/*/
function ismaxlength(obj){

var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""

if (obj.getAttribute && obj.value.length>mlength)

obj.value=obj.value.substring(0,mlength)

}

 function http(field){
 field.value=field.value.replace('http://','');
 } function http(field){
 field.value=field.value.replace('http://','');
 }
 
 ////////////////
 
 

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
 
function isBlank(str,msg){
	var error = "";
	str = trim(str)
	if(str.length == 0){ error = msg +'\n'; }
	return error;
	}


function fieldmatch(str1,str2,msg){
	var error = "";
	if(str1 != str2){
	error = msg +'\n';
	}
	return error;

}



function checkEmail (strng,msg) {
var error="";
	if (isBlank(strng)) { error = msg + "\n"; }
	
		var emailFilter=/^.+@.+\..{2,7}$/;
		if (!(emailFilter.test(strng))) { error = msg + "\n"; }
		else {
		   var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
			 if (strng.match(illegalChars)) { error = msg + "\n"; }
		}
	return error;    
}

function isEmptyNum(strng,msg) {
var error = "";
	if (isBlank(strng)) { error = msg + "\n"; } else {
		   var illegalChars= /[\@\<\>\,\;\:\\\"\[\]]/
			 if (strng.match(illegalChars)) { error = msg + "\n"; }
		}
	return error;	  
}
function valNum(strng,msg) {
var error = "";
	if(strng.length != 0){
		   var illegalChars= /[\@\<\>\,\;\:\\\"\[\]]/
			 if (strng.match(illegalChars)) { error = msg + "\n"; }
	}
	return error;	  
}


function radio(radiobut,strng){
var error = "";
var radio_choice = false;
for (i = 0; i < radiobut.length; i++){
if (radiobut[i].checked)
radio_choice = true; 
}
if (!radio_choice){ error = ""+strng+"\n"; }
return error; }

function dropdown(menu,strng){
var error = "";
 if ( menu.selectedIndex == 0 )
    {
        error = strng+" \n";
        valid = false;
    }
	return error; }
	


function toggleLayer(whichLayer){
if (document.getElementById) {
	// this is the way the standards work
	var style2 = document.getElementById(whichLayer).style;
	style2.display = style2.display? "":"block";
}
else if (document.all){
	// this is the way old msie versions work
	var style2 = document.all[whichLayer].style;
	style2.display = style2.display? "":"block";
} else if (document.layers) {
	// this is the way nn4 works
	var style2 = document.layers[whichLayer].style;
	style2.display = style2.display? "":"block"; }
}

function dropother(menu,layer){
 if ( menu.selectedIndex == 1 ){
 	toggleLayer(layer); } else { 	
	if(document.getElementById(layer).style.display == "block"){
 	toggleLayer(layer); } }

}
function strMatch(f1,f2,msg){
var error = "";
 if (f1 != f2){
	 error = msg+"\n";
	 }

}


function h1(){
	
	if (!document.getElementsByTagName){ return; }
	var h1a = document.getElementsByTagName('h1');
		for (var i=0; i<h1a.length; i++){
		var h1 = h1a[i];
		var text = h1.innerHTML; 
		text = text.toUpperCase();
		//alert(text);
		var embedb = '<object date="images/oasus.swf" type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="324" height="36">';
		embedb += '<param name="movie" value="images/oasus.swf" /><param name="quality" value="high" />';
		embedb += '<param name="wmode" value="transparent" /><param name="FlashVars" value="headvar='+ text +'" />';
		embedb += '<embed src="images/oasus.swf" width="324" height="36" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" flashvars="headvar='+ text +'"></embed></object> ';
		h1.innerHTML = embedb; 
		} 
		}
		
function flashnav(){
	//if (!document.getElementsByClassName){
		i = 0;
		var navsa = new Array();
		a = document.getElementsByTagName("li"); 
			for (i=0;i<a.length;i++){ //element = a[i++]) {
				if (a[i].className == "navitem") {
				 
				//	navsa.push(i);
					//var h1 = a[i];//  
					var title = a[i].getAttribute('title');  
					var url = a[i].getAttribute('value');
					var text = title+"|"+url; 
					 text = escape(text);
					var embeda = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="123" height="29"><param name="movie" value="navs.swf?var=123" /><param name="quality" value="high" />';
					embeda += '<param name="FlashVars" value="headvar='+ text +'" /><param name="wmode" value="transparent" />';
					embeda += '<embed src="navs.swf?var=123" width="123" height="29" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="headvar='+text+'"></embed></object>';
					a[i].innerHTML = embeda;
								
				}
			}
 
			var h1a = document.getElementsByTagName('h1');
				for (var i=0; i<h1a.length; i++){
				 
				var h1 = h1a[i];
				var text = h1.innerHTML; 
				  text = escape(text);
				//alert(text);
				var embedb = '<object  type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="282" height="31">';
				embedb += '<param name="movie" value="images/oasus.swf" /><param name="quality" value="high" />';
				embedb += '<param name="wmode" value="transparent" /><param name="FlashVars" value="headvar='+ text +'" />';
				embedb += '<embed src="images/oasus.swf" width="282" height="31" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" flashvars="headvar='+ text +'"></embed></object> ';
				h1.innerHTML = embedb; 
				h1.style.visibility = 'visible';
				} 
			var h1a = document.getElementsByTagName('h2');
				for (var i=0; i<h1a.length; i++){
					 
				var h1 = h1a[i];
				var text = h1.innerHTML; 
				 text = escape(text);
				//alert(text);
				var embedb = '<object " type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="600" height="30">';
				embedb += '<param name="movie" value="images/oasus2.swf" /><param name="quality" value="high" />';
				embedb += '<param name="wmode" value="transparent" /><param name="FlashVars" value="headvar='+ text +'" />';
				embedb += '<embed src="images/oasus2.swf" width="600" height="30" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" flashvars="headvar='+ text +'"></embed></object> ';
				h1.innerHTML = embedb; 
				h1.style.visibility = 'visible';
				} 
	
	/*/} else { 
	var navsa = document.getElementsByClassName('navitem');
//	
	} 
		for (var i=0; i<navsa.length; i++){
		var h1 = navsa[i]; alert(h1);
		var title = h1.getAttribute('title');  
		var url = h1.getAttribute('value');
		var text = title+"|"+url; 
		var embeda = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="123" height="29"><param name="movie" value="navs.swf?var=123" /><param name="quality" value="high" />';
		embeda += ' <param name="FlashVars" value="headvar='+ text +'" /><param name="wmode" value="transparent" />';
		embeda += ' <embed src="navs.swf?var=123" width="123" height="29" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="headvar='+text+'"></embed></object>';
		h1.innerHTML = embeda;
	}/*/
}
		
/*//*/

-->
