function showPopUpWinCartel(MyRecordID, MyTableName){
	destX = event.clientX +  document.body.scrollLeft - 250;
	destY = event.clientY +  document.body.scrollTop - 180;
	destY = event.clientY +  document.body.scrollTop -100;
	hidePopUpWin();
	with(document.all){
		eval("PopUpWinObj.style.top = destY;");
		eval("PopUpWinObj.style.left = destX;");
		eval("PopUpWinObj.style.display = '';");
	}
	with(document.frames("PopUpWinObj")){
		TableName = MyTableName
		RecordID = MyRecordID
		InitValues();
		 
	}
	document.frames("PopUpWinObj").location.href='../Global/SendAddByMailCartel.asp?ID=' + RecordID + '&TableName=' + TableName
	//document.frames("PopUpWinObj").parentRef = eval("document.all.PopUpWinObj");
	
}	

function showPopUpWin1Cartel(MyRecordID, MyTableName){
	destX = event.clientX +  document.body.scrollLeft - 250;
	destY = event.clientY +  document.body.scrollTop - 180;
	destY = event.clientY +  document.body.scrollTop -100;
	hidePopUpWin();
	with(document.all){
		eval("PopUpWinObj1.style.top = destY;");
		eval("PopUpWinObj1.style.left = destX;");
		eval("PopUpWinObj1.style.display = '';");
	}
	with(document.frames("PopUpWinObj1")){
		TableName = MyTableName
		RecordID = MyRecordID
		InitValues();
		 
	}
	document.frames("PopUpWinObj1").location.href='../Global/SendMessageByMailCartel.asp?ID=' + RecordID + '&TableName=' + TableName
	//document.frames("PopUpWinObj1").parentRef = eval("document.all.PopUpWinObj1");
	
}	


function showPopUpWin(MyRecordID, MyTableName){
	destX = event.clientX +  document.body.scrollLeft - 250;
	destY = event.clientY +  document.body.scrollTop - 180;
	destY = event.clientY +  document.body.scrollTop -100;
	hidePopUpWin();
	with(document.all){
		eval("PopUpWinObj.style.top = destY;");
		eval("PopUpWinObj.style.left = destX;");
		eval("PopUpWinObj.style.display = '';");
	}
	with(document.frames("PopUpWinObj")){
		TableName = MyTableName
		RecordID = MyRecordID
		InitValues();
		 
	}
	//document.frames("PopUpWinObj").location.href='../Global/SendAddByMail.asp?ID=' + RecordID + '&TableName=' + TableName
	document.frames("PopUpWinObj").parentRef = eval("document.all.PopUpWinObj");
	
}	


	

function hidePopUpWin(){
	document.all.PopUpWinObj.style.display="none";
}








function showPopUpWinCV(MyRecordID, MyTableName){


//hidePopUpWinCV()
if (window.innerWidth || window.innerHeight){ 
docwidth = window.innerWidth; 
docheight = window.innerHeight; 
} 
//IE Mozilla 
if (document.body.clientWidth || document.body.clientHeight){ 
docwidth = document.body.clientWidth; 
docheight = document.body.clientHeight; 
} 

//alert('docwidth   = ' + docwidth)
//alert('docheight   = ' + docheight)

ElelementWidth = document.getElementById('PopUpWinCVObj').style.width
ElelementWidth  = ElelementWidth.replace('px','')

//alert('ElelementWidth   = ' + ElelementWidth  )


ElelementHeight = document.getElementById('PopUpWinCVObj').style.height
ElelementHeight = ElelementHeight .replace('px','')

//alert('ElelementHeight    = ' +ElelementHeight   )



destX = parseInt((docwidth-ElelementWidth) /2)
if(destX<0){destX=0;}
//alert('destX     = ' +destX    )


destX = parseInt((docwidth-ElelementWidth) /2)
if(destX<0){destX=0;}






if (document.body.scrollTop) {MyScrollTop =document.body.scrollTop}
if (window.pageYOffset) {MyScrollTop = window.pageYOffset}



//alert('MyScrollTop = ' + MyScrollTop )
	document.getElementById('PopUpWinCVObj').src='/Global/SendCVByMail.asp?RecordID=' + MyRecordID;

	document.getElementById('PopUpWinCVObj').style.top = parseInt(MyScrollTop + 150) + 'px';
	document.getElementById('PopUpWinCVObj').style.left = destX + 'px';
	document.getElementById('PopUpWinCVObj').style.display = 'block';



return;


/*

	destX = event.clientX +  top.document.body.scrollLeft - 250;
	destY = event.clientY +  top.document.body.scrollTop - 180;
	destY = event.clientY +  top.document.body.scrollTop -100;
	hidePopUpWinCV();
	with(top.document.all){
		eval("PopUpWinCVObj.style.top = destY;");
		eval("PopUpWinCVObj.style.left = destX;");
		eval("PopUpWinCVObj.style.display = '';");
	}
	with(top.document.frames("PopUpWinCVObj")){
		TableName = MyTableName
		RecordID = MyRecordID
		InitValues();
		 
	}
	top.document.frames("PopUpWinCVObj").parentRef = eval("top.document.all.PopUpWinCVObj");


*/	
}	


	

function hidePopUpWinCV(){
top.document.getElementById('PopUpWinCVObj').style.display='none';
	//top.document.all.PopUpWinCVObj.style.display="none";
}










function showPopUpWin1(MyRecordID, MyTableName){
	destX = event.clientX +  document.body.scrollLeft - 250;
	destY = event.clientY +  document.body.scrollTop - 180;
	destY = event.clientY +  document.body.scrollTop -100;
	hidePopUpWin();
	with(document.all){
		eval("PopUpWinObj1.style.top = destY;");
		eval("PopUpWinObj1.style.left = destX;");
		eval("PopUpWinObj1.style.display = '';");
	}
	with(document.frames("PopUpWinObj1")){
		TableName = MyTableName
		RecordID = MyRecordID
		InitValues();
		 
	}
	//document.frames("PopUpWinObj1").location.href='../Global/SendMessageByMail.asp?ID=' + RecordID + '&TableName=' + TableName
	document.frames("PopUpWinObj1").parentRef = eval("document.all.PopUpWinObj1");
	
}	


	

function hidePopUpWin1(){
	document.all.PopUpWinObj1.style.display="none";
}

function getXmlHttp() {
    var newXmlHttp;
    // code for Mozilla, etc.
    if (window.XMLHttpRequest) {
        newXmlHttp = new XMLHttpRequest();
    }
    
    // code for IE
    else if (window.ActiveXObject) {
        newXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    
    if (newXmlHttp != null) 
        return newXmlHttp;
    else 
        return false;
}