function prodimg(url,width,height) {
	if (url!='') {
		if (width==-1) {
			width=400;height=400;
		}
		width=width+0;height=height+0;
		productview=window.open("","","tolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width="+width+",height="+height+",screenX=5,screenY=5,top=5,left=5"); productview.document.open(); productview.document.write('<HTML><head></head><body bgcolor='+'"'+'#ffffff'+'"'+' leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0><tr><td align=center valign=center><a href="#" onClick="window.close();" ><img src='+'"'+url+'" border=0></a></td></tr></table></body></html>'); 
		productview.document.close();
	}
}

function popup(url,width,Height,name) {
	w = window.open(url,name,"tolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizeable=0,width="+width+",height="+Height+",screenX=5,screenY=5,top=5,left=5"); 
	w.focus();
}

function popupnoscroll(url,width,height) {
	w = window.open(url,"","tolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizeable=0,width="+width+",height="+height+",screenX=5,screenY=5,top=5,left=5"); 
	w.focus();
}

function popuptext(text,width,height) {
	if (width==-1) {
		width=400;height=400;
	}
	width=width+0;height=height+0;
	productview=window.open("","","tolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width="+width+",height="+height+",screenX=300,screenY=300,top=300,left=300"); productview.document.open(); productview.document.write('<HTML><head></head><body bgcolor='+'"'+'#ffffff'+'"'+' leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0><tr><td align=center valign=center><div style="font-family: verdana; font-size: 11px; text-align: center;">'+text+'</div></td></tr></table></body></html>'); 
	productview.document.close();
}

function profileView(URL) {
	w = window.open(URL,'_blank',"tolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizeable=1,width=790,height=520,screenX=0,screenY=0,top=0,left=0"); 
	w.focus();
}

function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
 }

function newMessage(URL) {
	w = window.open(URL,'_blank',"tolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizeable=1,width=490,height=450,screenX=0,screenY=0,top=0,left=0"); 
	w.focus();
}

function strpos(str, ch) {
	tmp = str;
//	var tmp = "HI ALL"
	tmp = String(tmp);	
	ch = String(ch);
//	alert(str);
//	alert(ch);
	var res = -1;
	for (var i = 0; i < tmp.length; i++) {
//		alert(tmp.substring(i, i+ch.length-1) + " - " + ch + (tmp.substring(i, i+ch.length-1)==ch));
		if (ch == tmp.substring(i, i+ch.length))
			res = i;
	}
//	alert(res);
	return res;
	return -1;
}
