function pop(url,title,width,height){
  window.open(url,'','width='+width+'px,height='+height+'px,resizable=1,scrollbars=0');
}
function utypes(){
   if(document.getElementById('ut')!=null){	
	  return '&ut='+document.getElementById('ut').value;
   }else{
   	  return '';
   }		
}	

function test(){
  alert('hello');	
}	

function options_output(obj,img_obj){
       	  if(obj.style.display=='none'){
       	     obj.style.display='';
       	     img_obj.src='templates/default/images/open1.gif';
       	  }else{ 
       	     obj.style.display='none';
       	     img_obj.src='templates/default/images/open.gif';
       	  }        	  
}

function categories_options(){
       	  if(document.getElementById('cat_options').style.display=='none'){
       	     document.getElementById('cat_options').style.display='';
       	     document.getElementById('cat_options_open').src='templates/default/images/open1.gif';
       	  }else{ 
       	     document.getElementById('cat_options').style.display='none';
       	     document.getElementById('cat_options_open').src='templates/default/images/open.gif';
       	  }        	  
}
function fc_options(){
       	  if(document.getElementById('fc_options').style.display=='none'){
       	     document.getElementById('fc_options').style.display='';
       	     document.getElementById('fc_options_open').src='templates/default/images/open1.gif';
       	  }else{ 
       	     document.getElementById('fc_options').style.display='none';
       	     document.getElementById('fc_options_open').src='templates/default/images/open.gif';
       	  }        	  
}

function js_abc_output(str, url){

	 str=str.toUpperCase();
     var i=0;
     var out="";
     for(i=0;i<str.length;i++){
      if(str.slice(i,i+1)==' '){continue;}         
      	out=out+'<a href="'+url+'&lcode='+i+utypes()+'"  class=hyperlink>'+str.slice(i,i+1)+'</a> ';	     
      if(i==25){out=out+'<br>';}
     } 
     out=out+'<font class=text_small>|&nbsp;</font><a href="'+url+'&lcode=all" class=hyperlink><font color=black>ΒΡΕ</font></a>';
return out;

}	

function object_edit_submitter(get_data){
	document.getElementById('object_action').value='object_edit';
	document.getElementById('object_options_action').value=get_data;
	document.getElementById('object_form').submit();
}		
function object_offer_type_f(value){
	if(value==0){
	   document.getElementById('object_offer_selling').disabled=true;	
	}else{
	   document.getElementById('object_offer_selling').disabled=false;	
	}		
}	

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
function SetChecked(form_name,chkName) {
  dml=document.forms[form_name];
  len = dml.elements.length;

  var i=0;
  for( i=0 ; i<len ; i++) {
    if(dml.elements[i].type!="checkbox"){continue;};
    if (dml.elements[i].checked==true) { 
      dml.elements[i].checked=false;
    }else{
      dml.elements[i].checked=true;
    }
  }
}

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = false;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
function popImage(imageURL,imageTitle,defaultWidth,defaultHeight){
   var optNN='scrollbars=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
   var optIE='scrollbars=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;

	
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="yes" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="yes" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}



