
var l=location.toString();
var u="";
var cs="";
var n=l.indexOf("?");
if(n>0)	u=l.substr(n+1).replace("#","");

function send()
{
	var r=cs;
	if(arguments.length>0)
	{
		r+="send5757.aspx?mid="+arguments[0];
		if(arguments.length>1)
		{
			r+="&mtype="+arguments[1]
		}
			
	
		var width=450,height=290;
		var left = (screen.width-width)/2;
		var top  = (screen.height-height)/2 
	
		window.open(r+"&"+u,'',"top="+ top +",left="+left+",toolbar=0,status=1,resizable=0,width="+ width +",height="+ height);
	}
	else
	{	
		window.open(r+"?"+u)
	}
}

function sendIVR()
{
	var r=cs;
	if(arguments.length>0)
	{
		r+="sendIVR3.aspx?mid="+arguments[0];
		if(arguments.length>1)
		{
			r+="&mtype="+arguments[1]
		}
			
	
		var width=525,height=305;
		var left = (screen.width-width)/2;
		var top  = (screen.height-height)/2 
	
		window.open(r+"&"+u,'',"top="+ top +",left="+left+",toolbar=0,status=1,resizable=0,width="+ width +",height="+ height);
	}
	else
	{	
		window.open(r+"?"+u)
	}
}

function redirect(url)
{		
	var temp = fixurl(url)
	
	document.location= temp;
}

function getSessionID()
{

}



function fixurl(url)
{
	var index = url.indexOf("?")
	var query = ""
	var ret = url
	var page =url;
	
	
	if(index > 0)
	{
		query = url.substr(index+1).replace("#","")		
	}
	
	if(index > 0)
	{
		page = url.substr(0,index);
	}
	
	if(query == "" && u !="")
	{
		ret = page +  "?" + u
	}
	

	if(query != "" && u !="")
	{
		ret = url + "&" + u
	}	
	return ret;
	
	
}

