<!---

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(id,state){
	strsrc = element(id).src;
	
	if(state == "over"){
	element(id).src = strsrc.replace('Off','Over');	  
	} else {
	element(id).src = strsrc.replace('Over','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 Full Name");
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,3}$/;
		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";
	 }

}


// Link Building Pro ver 1.0
// Copyright Latent Motion, at seox.org

function init(){

// Options:
var useMetaKeyword = true; // Otherwise, page title
var minLength = 40; // Min selection chars
var useMetaAuthor = true; // Otherwise use domain
var addLinks = true; // Otherwise, just cite at end
var skip = new Array("home","link","click here"); // Don't link these (lowercase!)
	
function D(b,a,c){if(b.addEventListener)b.addEventListener(a,c,false);
else b.attachEvent&&b.attachEvent("on"+a,c)}
function o(b,a){
	if(typeof b=="undefined"||b==null||!RegExp)return false;

	a=new RegExp("(^|\\s)"+a+"(\\s|$)");
if(typeof b=="string")return a.test(b);
else if(typeof b=="object"&&b.className)return a.test(b.className);
return false}function E(b,a){var c=false,j;
for(j=b.parentNode;
j!=undefined;
){if(b.parentNode==e.body)break;
else if(b.parentNode==a){c=true;
break}j=j.parentNode}return c}
function F(b){return b.replace(/^\s*/,"")}function G(b){return b.replace(/\s*$/,"")}function H(b){return G(F(b))}var I=new Array("home","link","click here"),e=document,x=window,t=e.getElementsByTagName("body")[0],p=e.getElementsByName("author"),i=e.getElementsByName("keywords"),q=x.location.toString(),u=e.title.toString(),d;
if(!Array.indexOf)Array.prototype.indexOf=function(b,a){var c=-1;
for(a=a|0;
a<this.length||a==-1;
a++)if(this[a]==b)c=a;
return c};
if(i.length>0&&useMetaKeyword){i=e.getElementsByName("keywords")[0].getAttribute("content").split(",");

u=Math.floor(Math.random()*i.length);
i=i[u].replace(/^\s*|\s*$/,"")}else i=u;
p=(p.length>0&&useMetaAuthor)?p[0].getAttribute("content"):e.domain;
var y="<p id='credit'><br/>Read more about <a href='"+q+"'>"+i+"</a> by <a href='http://"+e.domain+"' />"+p+"</a></p>";
if(/MSIE/g.test(navigator.userAgent))var v="msie";
else if(/Safari/g.test(navigator.userAgent))v="safChrome";
q=e.createElement("span");
q.setAttribute("id","sasText");
t.appendChild(q);
d=e.getElementById("sasText");
posType=document.all&&!window.opera&&!window.XMLHttpRequest?
"absolute":"fixed";
d.style.position=posType;
d.style.top="0px";
d.style.left="-9999px";
D(t,"copy",function(){d.innerHTML=y;
if(v=="msie"){for(var b=e.selection.createRange(),a=b.parentElement();
a.nodeName!="BODY"&&!o(a,"lbExclude");
)a=a.parentNode;
if(o(a,"lbExclude"))return true;
a=e.body.createTextRange();
a.moveToElementText(d);
var c=b.duplicate();
c=c.htmlText;
if(c.length>minLength){d.id="tempSasText";
d.innerHTML=c+y;
(c=e.getElementById("sasText"))&&c.parentNode.removeChild(c);
d.id="sasText";
a.select()}}else{b=
x.getSelection();
for(a=b.anchorNode;
a.nodeName!="BODY"&&!o(a,"lbExclude");
)a=a.parentNode;
if(o(a,"lbExclude"))return false;
if(b==""&&v=="safChrome"){d.innerHTML=t.innerHTML;
	a=document.createRange();
	b.removeAllRanges();
	a.selectNodeContents(d);
b.addRange(a)
	}else if(b.toString().length>minLength){
		var j=e.getElementById("credit");
		a=b.getRangeAt(0);
		c=a.cloneContents();
		d.id="tempSasText";
		d.insertBefore(c,j);
		(c=e.getElementById("sasText"))&&c.parentNode.removeChild(c);
		d.id="sasText";
		b.removeAllRanges();
		a.selectNode(d);
		
		b.addRange(a)}
	}
var w=[];
a=d.getElementsByTagName("a");
for(b=0;
b<a.length;
b++)w.push(a[b].href);
if(addLinks){a=e.getElementsByTagName("a");
for(b=0;
b<a.length;
b++){var r=a[b].href;
if(w.indexOf(r)==-1)if(E(a[b],d)==false){var f=H(a[b].innerHTML).toLowerCase();
if(skip.indexOf(f)==-1)if((new RegExp(e.domain,"g")).test(r)){var z=[];
function n(g,k,l){for(var A=g.childNodes.length;
A-- >0;
){var h=g.childNodes[A];
if(h.nodeType===1)h.tagName.toLowerCase()!=="a"&&n(h,k,l);
else if(h.nodeType===3)for(var m=h.data.length;
1;
){m=
h.data.lastIndexOf(k,m);
if(m===-1||z.indexOf(k.toLowerCase())!==-1)break;
var B=/\w/;
if(h.nodeValue.charAt(m-1).match(B)||h.nodeValue.charAt(m+f.length).match(B))break;
l.call(window,h,m)}}}function s(g,k){g.splitText(k+f.length);
var l=e.createElement("a");
l.href=r;
l.appendChild(g.splitText(k));
g.parentNode.insertBefore(l,g.nextSibling);
z.push(f.toLowerCase());
w.push(r)}n(d,f,s);
f=f.charAt(0).toUpperCase()+f.slice(1);
n(d,f,s);
f=f.toUpperCase();
n(d,f,s);
f=f.replace(/\w\S*/g,function(g){return g.charAt(0).toUpperCase()+
g.substr(1).toLowerCase()});
n(d,f,s)}}}}})}window.onload=init;





/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

scrollStep=5

timerLeft=""
timerRight=""

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}




function changeBGs(){
var bgs = ["WIV_005","WIV_011","WIV_012","WIV_018","wis_123"];

bgs.sort(function() {return 0.5 - Math.random()});

	var width = getWidth('body');	

	for(i=0; i <=  bgs.length; i++){
	//timeadd = i*3000;
	bg = bgs[i];
	nextim = bgs[i+1];
		if(nextim == null){
			i = 0;
		}
		if(width < 1025){
			bg += '-1024';
		}
		bg += '.jpg';
		//element('body').style.backgroundImage = 'url(images/'+bg+')';
		setTimeout('element(\'body\').style.backgroundImage = \'url(images/'+bg+')\'',i*30000);


	}
	
}


/*//*/

-->
