function windowWidth() 
{if(navigator.appName == "Netscape"){return window.innerWidth;}return document.body.offsetWidth;}

function resizeimg(){o=document.getElementById("i");	
if(o.width >=(windowWidth() * 0.6)) 
{var ratio=o.height/o.width;
o.width = windowWidth() * 0.6;
o.height = o.width*ratio;
document.getElementById("wrn").style.display='block';}}

function getwidth(){return windowWidth() * 0.6;}


function xml() {var req;if(window.XMLHttpRequest){req = new XMLHttpRequest();
}else if(window.ActiveXObject) {req = new ActiveXObject("Microsoft.XMLHTTP");} else {
alert('Problem creating the XMLHttpRequest object');}
return req;}
var http = xml();
function rate(id,rate) {
document.getElementById("bar").innerHTML = 'Contacting Server..';
http.open('get', '/photo-rate-inc.php?id='+id+'&rate='+rate);
http.onreadystatechange = hndl;http.send(null);}
function hndl() {
if(http.readyState == 4 && http.status == 200){
var response = http.responseText;
if(response) {document.getElementById("bar").innerHTML = response;}}}
