 function Check_Text(obj)
{
	if( document.forms[0].elements["Header:mySearchText"].value == "Keywords")
	{
		document.forms[0].elements["Header:mySearchText"].value = "" ; 
	}
}

function Check_Cat(obj)
{
	if ((document.forms[0].elements["Header:mySearchCat"].value == 0))
	{
		alert("Select search category from the list.");
	
	
	document.forms[0].elements["Header:mySearchCat"].focus();
	
	}
 }

  
/*
change image on mousehover
*/

function switchit(obj,img){
	if (document.images)
	{
	obj.src=img
	}
}


/*
	function for Play Ringtone
*/

function PlayRingTone(playtunefile)
{
	//alert(playtunefile);
	window.open("playtune.aspx?PlayFile="+playtunefile,"Mywindows","top=100,left=100,width=476,height=322, toolbar=0,menubar=0,scrollbars=0,resizebale=0,location=0,statusbar=0");
}
		
function PlayRingTone1(playtunefile)
{
	//alert(playtunefile);
	window.open("modules/playtune.aspx?PlayFile="+playtunefile,"Mywindows","top=100,left=100,width=476,height=322, toolbar=0,menubar=0,scrollbars=0,resizebale=0,location=0,statusbar=0");
}

function nsBrowFix(){
if(pageWidth!=innerWidth || pageHeight!=innerHeight){
location.reload()
}
}

if(document.layers) {
pageWidth=innerWidth
pageHeight=innerHeight
window.onresize=nsBrowFix
}

var n = navigator;
var d = document;
var agent = n.userAgent.toLowerCase();
var name = n.appName.toLowerCase();
var opera = agent.indexOf("opera") != -1;
var speed = 40;
var tid;

//Browser sniff hash obj
var sniff = {
bw: {
ie:agent.indexOf("msie") != -1 && !opera,
ie4:agent.indexOf("msie 4.") != -1 && !opera,
ie5:agent.indexOf("msie 5.") != -1 && !opera,
ie6:agent.indexOf("msie 6.") != -1 && !opera,
ns:name.indexOf("netscape") != -1 && agent.indexOf("gecko") == -1,
ns6:agent.indexOf("netscape6") != -1
},
os: {
win:n.userAgent.indexOf("Win") != -1,
mac:n.userAgent.indexOf("Mac") != -1
}
};

var distance = (sniff.os.mac && sniff.bw.ns6 || sniff.os.win && sniff.bw.ie4)?5:(sniff.os.mac && sniff.bw.ns)?6:4;

function createScrollerObj(lyr1, lyr2) {
this.container = {
obj:(sniff.bw.ns)?d[lyr1]:sniff.bw.ie?d.all[lyr1]:d.getElementById(lyr1),
css:(sniff.bw.ns)?d[lyr1]:sniff.bw.ie?d.all[lyr1].style:d.getElementById(lyr1).style,
height:(sniff.bw.ns)?d[lyr1].clip.height:sniff.bw.ie?d.all[lyr1].offsetHeight:d.getElementById(lyr1).offsetHeight
};
this.content = {
obj:(sniff.bw.ns)?d[lyr1].document[lyr2]:sniff.bw.ie?d.all[lyr2]:d.getElementById(lyr2),
css:(sniff.bw.ns)?d[lyr1].document[lyr2]:sniff.bw.ie?d.all[lyr2].style:d.getElementById(lyr2).style,
height:(sniff.bw.ns)?d[lyr1].document[lyr2].clip.height:sniff.bw.ie?d.all[lyr2].offsetHeight:d.getElementById(lyr2).offsetHeight,
move:moveLyr,
top:0
};
this.prop = {
dif:this.container.height - this.content.height
};
return this;
}

//move something
function moveLyr(x, y) {
this.css.left = x;
this.css.top = y;
}

function scrollDown(num) {
var obj = (eval("scroller" + num));
if (obj.container.height < (obj.content.height + obj.content.top)) {
obj.content.move(0, (parseInt(obj.content.top) - distance));
if (parseInt(obj.content.top) >= parseInt(obj.prop.dif)) {
tid = setTimeout("scrollDown('" + num + "')", speed);
}
obj.content.top = parseInt(obj.content.top) - distance;
} else {
stopScroll();
}
}

function scrollUp(num) {
var obj = (eval("scroller" + num));
if(parseInt(obj.content.top) != 0) {
obj.content.move(0, (parseInt(obj.content.top) + distance));
obj.content.top = parseInt(obj.content.top) +distance;
tid = setTimeout("scrollUp('" + num + "')", speed);
}
}

function stopScroll() {
clearTimeout(tid);
b = false
}

function createObj() {

scroller1 = new createScrollerObj('divContainer', 'divContent');
}


function stopScroll() {
clearTimeout(tid);
b = false
}

