/*********************************************
Imageweb | Tecnologia para Negócios
Todos os Direitos Reservados
versão:  06.2007
*********************************************/

if (window.self.name == "frmsite")// || window.self.name == "frmconteudo" ){ // and _site == true;	
{
	openZoom();
}else if(window.self.name == "frmconteudo")
{
	
}else{	
	site = location.protocol + "//" +location.hostname; // ->arquivo: location.search;
	//window.top.location.replace(location.hostname);
	window.top.location = site;
}

function openZoom()
{
	var divimageweb = top.document.createElement('div');
		divimageweb.id = 'imageassinatura';
		divimageweb.style.height = '100%';
		divimageweb.style.width = '100%';
		divimageweb.style.top = '0';
		divimageweb.style.left = '-10000';
		divimageweb.style.position = 'absolute';
		
		top.document.body.appendChild(divimageweb);
	
	var divMSN = top.document.createElement('div');
		divMSN.id = 'divMSN';
		top.document.body.appendChild(divMSN);
		
		divMSN.innerHTML = "<iframe src='http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee=f23f89588771aafd@apps.messenger.live.com&mkt=pt-br' width='290' height='300' style='border: solid 0px black; width: 290px; height: 300px; margin-top: -47px;' frameborder='0'></iframe>";

		
	var divcarregando = top.document.createElement('div');
		divcarregando.id = 'divcarregando';
		divimageweb.style.padding = '5';
		divcarregando.innerHTML='carregando...';
		top.document.body.appendChild(divcarregando);

	var divsombra = top.document.createElement('div');
		divsombra.id = 'divsombra';
		//divsombra.className = 'sombra';
		divsombra.style.height = '100%';
		divsombra.style.width = '100%';
		top.document.body.appendChild(divsombra);
		
		divimageweb.onclick = function() 
		{
		   // return false;
		}	
		

		var so = new Flash('layout/swf/image.assinatura.swf', 'swfassinatura', '100%', '100%', '7', '#ffffff');
		so.addParameter('wmode', 'transparent');
		so.write('imageassinatura');
		return false;
}

function closeZoom(obj) {
		//document.body.removeChild(document.getElementById('zoom'));
		//obj.style.left = '-10000';
		
		site = top.document.getElementById("frmsite");
		site.fecharDIV();
}


// <FUNCOES AUXILIARES>

function setValue()
{
    window.globalvar = "test";
}

function getValue()
{
    alert(window.globalvar); // "test" (assuming setValue has run)
}

function disableRightClick(e)
{
  <!-- Begin
if (navigator.appName == 'Microsoft Internet Explorer'){
function NOclickIE(e) {
if (event.button == 2 || event.button == 3) {
imageassinatura();
return false;
}
return true;
}
document.onmousedown=NOclickIE;
document.onmouseup=NOclickIE;
window.onmousedown=NOclickIE;
window.onmouseup=NOclickIE;
}
else {
function NOclickNN(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
imageassinatura();
return false;
}}}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=NOclickNN; }
document.oncontextmenu=new Function("imageassinatura();return false")
}
//  End -->

-->
}

function imageassinatura() 
{
		top.document.getElementById('imageassinatura').style.left=0;
}

function fecharAssinatura() 
{
		top.document.getElementById('imageassinatura').style.left=-10000;
}


function selecao()
{
	return(false);
}


window.onload = function() 
{ 
    disableRightClick(); 
}; 
disableRightClick(); 

