
function showRatingDiv (template_id)
{

document.getElementById('rate_div_'+template_id).style.visibility = 'visible';	
	
}

function closeRatingDiv(template_id)
{
document.getElementById('rate_div_'+template_id).style.visibility = 'hidden';
}

function showBuyDiv (template_id)
{
document.getElementById('buy_div_'+template_id).style.visibility = 'visible';	
}

function closeBuyDiv(template_id)
{
document.getElementById('buy_div_'+template_id).style.visibility = 'hidden';
}


function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=320,height=150,left = 480,top = 392');");
}

function sendRatings(template_id)
{

var coolness = document.getElementById('coolness_'+template_id).value;
var practicality = document.getElementById('practicality_'+template_id).value;
var loading_speed = document.getElementById('loading_speed_'+template_id).value;
var navigation = document.getElementById('navigation_'+template_id).value;
var content_presentation = document.getElementById('content_presentation_'+template_id).value;

var url = 'http://www.template-download.net/browser/sender.php';  
var pars = 'get=sendRating&template_id='+template_id+'&coolness='+coolness+'&practicality='+practicality+'&loading_speed='+loading_speed+'&navigation='+navigation+'&content_presentation='+content_presentation;
var dest = url+'?'+pars;
popUp(dest);
closeRatingDiv(template_id);	
}

