﻿function printer(dir,param)
{
  window.open(dir + "_printer.php?" + param, "printer", "scrollbars=yes,resizable=no,width=577,height=400");
}
function sendmail(dir,param)
{
  window.open(dir + "_sendmail.php?" + param, "sendmail", "scrollbars=yes,resizable=no,width=577,height=400");
}
function content(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "content", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function logout(dir,template){
  	window.location = "logout.php?dir=" + dir + "&amp;template=" + template;
}
function whatis(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "whatis", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function administrator(frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php", "administrator", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function proposal(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "proposal", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function article(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "article", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function clipping(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "clipping", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function enlargpicture(template, picture) {
  window.open(template + "?picture=" + picture, "enlargpicture", "width=200,height=130,top=0,left=320"); 
}
function gallery(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "gallery", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function selectmenu() {
document.location = document.form_selectmenu.category_name.options[document.form_selectmenu.category_name.selectedIndex].value
}
function news(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "news", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function contactus(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "contactus", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function declaration(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "declaration", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function schedule(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "schedule", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function law(dir,template,frame){
  	window.open("system/administrator/frameset.php?" + frame + ".php?dir=" + dir + "&amp;template=" + template, "law", "scrollbars=yes,dependent=true,resizable=no,width=700,height=400");
}
function enlarg(picture){
  	window.open("enlarg.php?picture=" + picture, "enlarg", "scrollbars=no,dependent=true,resizable=no,width=50,height=50,left=0,top=0");
}
function ShowCep()
	{
	open('http://www.correios.com.br/servicos/cep/cep_default.cfm','ShowCep','location=no,resize=no, width=730,height=400,left=18,top=18,maximized=0,scrollbars=1');
	}
function indicate(){
  	window.open("", "indicate", "left=100,top=100,scrollbars=no,resizable=no,width=577,height=400");
}
function quickvote(){
  	window.open("", "quickvote", "left=100,top=100,scrollbars=no,resizable=no,width=300,height=200");
}		
function select_drop(sel_name, abbr_name)
	{
	if(abbr_name!=''){
		if(sel_name.length > 0){
			var maxIndex = sel_name.length;
				for(var i=0; i<maxIndex; i++){
					if(abbr_name== sel_name.options[i].value){
						sel_name.selectedIndex = i;
						break;
					}
				}
			}
		}
	return true;    
	}
function redim()
{
 
var largura=opener.screen.width;
var altura=opener.screen.height;
 
    if (navigator.appName == 'Netscape') {
         adjWidth = document.images[0].width+20;
         adjHeight = document.images[0].height;
    }
     else {
 
         adjWidth = document.images[0].width+11;
         adjHeight = document.images[0].height+50;
     }
 
  if(adjHeight>altura-20)
  {
  adjHeight=altura-50;
  }
  
 self.moveTo(0,0);
    self.resizeTo(adjWidth, adjHeight);
 
     return
}
