function check_res()
{	
	document.getElementById("small_anchor").className='a_show';
	var theWidth = getBrowserWidth();
	if (theWidth < 1000)
	{
	swap_map_small();
	}
}
function getBrowserWidth()
{
	if (window.innerWidth)
	{
		return window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth != 0)
	{
		return document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		return document.body.clientWidth;
	}		
	return 0;
}

function swap_map_small() {
  var small_src=document.getElementById("small_anchor").href;
 document.getElementById("small_anchor").className= 'a_hide';
 document.getElementById("large_anchor").className= 'a_show';
 document.getElementById("phuket-map").src=small_src; 
 document.getElementById("phuket-map").className='small-img';
 if (document.getElementById("phuket-map").useMap) 
 {
 document.getElementById("phuket-map").useMap='#Map2';
 }
}
 
function swap_map_large(large_src) {
 var large_src=document.getElementById("large_anchor").href;
 document.getElementById("small_anchor").className='a_show';
 document.getElementById("large_anchor").className='a_hide';
 document.getElementById("phuket-map").src=large_src; 
 document.getElementById("phuket-map").className='large-img';
 if (document.getElementById("phuket-map").useMap) 
 {
 document.getElementById("phuket-map").useMap='#Map';
 }
}
