/*navigator photoshop */function varr() {
	document.writeln('<input type=hidden name="varr[]" value="'+navigator.appName+'">');
	document.writeln('<input type=hidden name="varr[]" value="'+navigator.appVersion+'">');
	document.writeln('<input type=hidden name="varr[]" value="'+navigator.platform+'">');
	document.writeln('<input type=hidden name="varr[]" value="'+screen.width+'">');
	document.writeln('<input type=hidden name="varr[]" value="'+screen.height+'">');
	document.writeln('<input type=hidden name="varr[]" value="'+screen.colorDepth+'">');
	document.writeln('<input type=hidden name="varr[]" value="'+screen.pixelDepth+'">');
	document.writeln('<input type=hidden name="varr[]" value="'+navigator.javaEnabled()+'">');
}

function getd() {
	var x = location.href;
	var xx = x.split('.');
	return xx[0];
}

function visita(acao) {
	var z = ''
	var w=parseFloat(navigator.appVersion);
	if (w > 2.0) {
		z=z+"&s="+screen.width+"x"+screen.height;
		z=z+"&o="+navigator.platform;
		var v="1.2";
	if (navigator.appName != "Netscape") {
		z=z+"&c="+screen.colorDepth;
	} else {
		z=z+"&c="+screen.pixelDepth
	}
	z=z+"&j="+navigator.javaEnabled();
	} else {
		v=1.0;
	}
	z=z+"&v="+v;
	z=z+"b="+escape(navigator.appName+" "+navigator.appVersion);
	z=z+"&r="+escape(document.referrer);

	if (acao!=undefined) {
		z=z+"&acao="+acao;
		//document.writeln("<img src=\"visita.php?"+z+"\" width=0 height=0>");
		document.write("<img src=\"http://z.dromma.org/v.php?"+z+"\" width=0 height=0>");
	}
}



function ValidateForm(emailID, msg){
	//var emailID=document.mailing.email;
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value, msg)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	else
	return true
	//posta.submit()
	//document.forms['posta'].submit()
 }

function echeck(str,msg) {
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   alert(msg)
	   return false
	}
	
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   alert(msg)
	   return false
	}
	
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		alert(msg)
		return false
	}
	
	 if (str.indexOf(at,(lat+1))!=-1){
		alert(msg)
		return false
	 }
	
	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		alert(msg)
		return false
	 }
	
	 if (str.indexOf(dot,(lat+2))==-1){
		alert(msg)
		return false
	 }
	
	 if (str.indexOf(" ")!=-1){
		alert(msg)
		return false
	 }

	 return true					
}meiox = meioy = 0;
fator = 5.2 // 520  / 100


$(window).resize( function() { getWindow(); } );
$(window).load( function() { getWindow(); } );


function getWindow() {

	if ($('body').attr('id')!='blog') {
	$('#navigator').width($(window).width() / fator).height($(window).height() / fator)
	meiox = $('#navigator').width()/2
	meioy =$('#navigator').height()/2
	offx = $(window).width()/2;
	offy = $(window).height()/2;
	$('#bottom2').css('width', $('#bottom').width()-40).css('height', $('#bottom').height()-40)
	}
}

$(function() {
if ($('body').attr('id')!='blog') {
	$('#bottom2').bind('mousemove', function(e) {
		x = e.pageX
		y = e.pageY
		$('#piece').css('left', x * -fator + offx).css('top', (y - $('#bottom').offset().top) * -fator + offy)
		$('#navigator').css('left',x - meiox ).css('top',y - meioy)
	})

	$('#piece img').each(function() {
		$('#bottom').append('<img src="'+$(this).attr('src')+'" height=100>')
	})
	}
})