

var b=false;
var bD = false;

function mOvr(src, clrOver)
     {
//     if(!src.contains(event.fromElement))
     {src.style.cursor="hand";
     src.bgColor = clrOver;
     }
     }
 function mOut(src, clrIn)
 {
//	if(!src.contains(event.toElement))
	{
	src.style.cursor="default" ;
	src.bgColor=clrIn; 
	}
 }

function WriteSth()
{
document.write("<table width=\"200\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\" class=\"ctbmenu\">");

document.write("<tr><td class=\"ctd1\" onmouseout=\"mOut(this,'#F3F5F7');\" onmouseover=\"mOvr(this,'#D2DAE3');\"><a href=\"http://www.qweas.com/os/freeware/\" class=\"g2\">Freeware</a></td></tr>");
document.write("<tr><td class=\"ctd1\" onmouseout=\"mOut(this,'#F3F5F7');\" onmouseover=\"mOvr(this,'#D2DAE3');\"><a href=\"http://www.qweas.com/about/popular.html\" class=\"g2\">Top Downloads</a></td></tr>");
document.write("<tr><td class=\"ctd1\" onmouseout=\"mOut(this,'#F3F5F7');\" onmouseover=\"mOvr(this,'#D2DAE3');\"><a href=\"http://www.qweas.com/about/editorpicks.html\" class=\"g2\">Editors Picks</a></td></tr>");
document.write("<tr><td class=\"ctd1\" onmouseout=\"mOut(this,'#F3F5F7');\" onmouseover=\"mOvr(this,'#D2DAE3');\"><a href=\"http://www.qweas.com/about/sitemap.html\" class=\"g2\">Qweas Sitemap</a></td></tr>");
document.write("<tr><td class=\"ctd1\" onmouseout=\"mOut(this,'#F3F5F7');\" onmouseover=\"mOvr(this,'#D2DAE3');\"><a href=\"http://www.qweas.com/developer/award.htm\" class=\"g2\">Get Award Images</a></td></tr>");
document.write("<tr><td class=\"ctd1\" onmouseout=\"mOut(this,'#F3F5F7');\" onmouseover=\"mOvr(this,'#D2DAE3');\"><a href=\"http://go.qweas.com/\" class=\"g2\">Make Long URL Short...</a></td></tr>");
document.write("<tr><td class=\"ctd1\" onmouseout=\"mOut(this,'#F3F5F7');\" onmouseover=\"mOvr(this,'#D2DAE3');\"><a href=\"http://www.qweas.com/about/about.html\" class=\"g2\">More about Qweas...</a></td></tr>");
document.write("<tr><td  onmouseout=\"mOut(this,'#F3F5F7');\" onmouseover=\"mOvr(this,'#D2DAE3');\"><a href=\"http://www.qweas.com/about/contact.html\" class=\"g2\">Contact Us</a></td></tr>");

document.write("</table>");

}


function SetFocus(n)
{
	if(n==0)
	{
	document.getElementById("tdSoftware").className="cFocusSoftware";
	document.getElementById("tdDiscount").className="cNormalDiscount";
	document.getElementById("tdCompany").className="cNormalCompany";
	document.getElementById("divDiscount").style.display="none";
	document.getElementById("divCompany").style.display="none";
	document.getElementById("divSoftware").style.display="";
	}

	if(n==1)
	{
	document.getElementById("tdSoftware").className="cNormalSoftware";
	document.getElementById("tdDiscount").className="cFocusDiscount";
	document.getElementById("tdCompany").className="cNormalCompany";
	document.getElementById("divCompany").style.display="none";
	document.getElementById("divSoftware").style.display="none";
	document.getElementById("divDiscount").style.display="";
	}

	if(n==2)
	{
	document.getElementById("tdSoftware").className="cNormalSoftware";
	document.getElementById("tdDiscount").className="cNormalDiscount";
	document.getElementById("tdCompany").className="cFocusCompany";
	document.getElementById("divSoftware").style.display="none";
	document.getElementById("divDiscount").style.display="none";
	document.getElementById("divCompany").style.display="";
	}

}

function showMenu()
{
	document.getElementById("divAbout").style.display="";	
	b=true;
}

function hideMenu()
{
	if(b==false)return;
	var t=setTimeout("hideMenu2()",200);
}

function hideMenu2()
{
	if(bD==true)return;
	document.getElementById("divAbout").style.display="none";	
	b=false;
}

function JudeOutDiv(e)
{
	var l = document.getElementById("divAbout").offsetLeft;
	var t = document.getElementById("divAbout").offsetTop;
	var w = document.getElementById("divAbout").offsetWidth;
	var h = document.getElementById("divAbout").offsetHeight;


	if(e.clientX<=l || e.clientX>=l+w || e.clientY>=t+h || e.clientY<=t)bD=false;
	else bD=true;
	if(bD==false && b==true)hideMenu2();
}


function Sponsor(szMain)
{
	document.write("<font color=\"#A0A0A0\" size=\"2\"><b>Sponsor Links</b></font><font size=1 face=verdana> <br /><br />");
	var a="<a href=\"http://www.qweas.com/downloads/audio/music-composers/overview-dj-mixer-pro-for-mac.html\" class=\"g2\">DJ Mixer Pro for Mac</a><font style='font: 4pt arial'><br /><br /></font>";
	var b="<a href=\"http://www.qweas.com/downloads/audio/music-composers/overview-dj-mixer-professional-for-windows.html\" class=\"g2\">DJ Mixer Pro for Windows</a><font style='font: 4pt arial'><br /><br /></font>";
	var c="<a href=\"http://www.qweas.com/download/audio_mp3/audio_converters/applemacsoft_drm_converter_for_mac.htm\" class=\"g2\">DRM Converter for Mac</a><font style='font: 4pt arial'><br /><br /></font>";
	
		document.write(a);
		document.write(b);
		document.write(c);
}

function TopAd(szMain)
{
	document.write("<a href=\"http://www.applexsoft.com/recovery-by-os.html\" target=_blank><img src=/common/js/frec.jpg border=0></a>");
}

function TopAdX(szMain)
{
	document.write("<font face=Arial Size=2>Contact us at <a href=mailto:adqweas@yahoo.com>adqweas@yahoo.com</a><br>to advertise your product here!</font>");
}

function CountDownload(){
	var params = 'action=downloadcount&f_UID='+document.getElementById('f_UID').value;
	new Ajax.Request('/admin/ajax.asp', {method:'POST', parameters:params, onSuccess:function(transport){
		//var json = transport.responseText.evalJSON(true);
		//if( json.msg == '' )
		//	alert("ok");
		//else
		//	alert(json.msg);
	}});
}



function ChangeIcon(event)
{
var left = 0;
var obj = document.getElementById('yourratestar');
while(obj.offsetParent){
	left += obj.offsetLeft;
	obj = obj.offsetParent;
}
left = event.clientX - document.body.clientLeft - left;
if(left > 28 * 4){
	document.getElementById('yourratestar').src = "/common/css/mid/editor-5star.png";
	document.getElementById('User_Rating').value = 5;
}
else if(left > 28 * 3){
	document.getElementById('yourratestar').src = "/common/css/mid/editor-4star.png";
	document.getElementById('User_Rating').value = 4;
}
else if(left > 28 * 2){
	document.getElementById('yourratestar').src = "/common/css/mid/editor-3star.png";
	document.getElementById('User_Rating').value = 3;
}
else if(left > 28 * 1){
	document.getElementById('yourratestar').src = "/common/css/mid/editor-2star.png";
	document.getElementById('User_Rating').value = 2;
}
else if(left > 2){
	document.getElementById('yourratestar').src = "/common/css/mid/editor-1star.png";
	document.getElementById('User_Rating').value = 1;
}
else{
	document.getElementById('yourratestar').src = "/common/css/mid/editor-0star.png";
	document.getElementById('User_Rating').value = 0;
}
} 

function SubmitRating(){
	var params = 'action=ratingsubmit&f_UID='+document.getElementById('f_UID').value+'&rating='+document.getElementById('User_Rating').value;
	new Ajax.Request('/admin/ajax.asp', {method:'POST', parameters:params, onSuccess:function(transport){
		var json = transport.responseText.evalJSON(true);
		if( json.msg == '' )
			alert("Thank you for rating this software!");
		else
			alert(json.msg);
	}});
}


