// JavaScript Document
var topOffset = 80

function objById(id){ 
	if (document.getElementById) 
		var returnVar = document.getElementById(id); 
	else if (document.all) 
		var returnVar = document.all[id]; 
	else if (document.layers) 
		var returnVar = document.layers[id]; 
	return returnVar; 
}

function get_browser_size(){
   	var bodyWidth = document.documentElement.clientWidth;
   	var bodyHeight = document.documentElement.clientHeight;
   	
	var bodyWidth, bodyHeight; 
		if (self.innerHeight){ // all except Explorer 
 		bodyWidth = self.innerWidth; 
		bodyHeight = self.innerHeight; 
		}else if(document.documentElement && document.documentElement.clientHeight) {
		   // Explorer 6 Strict Mode 		 
		   bodyWidth = document.documentElement.clientWidth; 
		   bodyHeight = document.documentElement.clientHeight; 
		} else if (document.body) {// other Explorers 		 
		   bodyWidth = document.body.clientWidth; 
		   bodyHeight = document.body.clientHeight; 
		} 
	return [bodyWidth,bodyHeight];		
}

function aDialog(){
	document.bgColor='#EFEFEF';
	objById('sold').style.visibility = 'visible';
	fix_mylocation();
}

function fix_mylocation(){
	//top = Math.max(document.body.scrollTop,document.documentElement.scrollTop) + 'px';
	//alert();
	objById("sold").style.top = (document.documentElement.scrollTop+80)+'px';
}

function aDialog_close(){
	document.bgColor='#FFFFFF';
	objById('sold').style.visibility = 'hidden';
}