function checkAndShow()
{
if(document.getElementById('miniShoppingCart').innerHTML == "")  showMiniShoppingCart() 
if(document.getElementById('userInfo').innerHTML == "")  showMiniLogin() 
}
//***************************************************  fly to Shopping Cart
var flyingSpeed = 10;
var url_addProductToBasket = 'addProduct.php';
var url_removeProductFromBasket = 'removeProduct.php';
var txt_totalPrice = 'Total: ';


var shopping_cart_div = false;
var flyingDiv = false;
var currentProductDiv = false;

var shopping_cart_x = false;
var shopping_cart_y = false;

var slide_xFactor = false;
var slide_yFactor = false;

var diffX = false;
var diffY = false;

var currentXPos = false;
var currentYPos = false;

var ajaxObjects = new Array();


function shoppingCart_getTopPos(inputObj)
{		
  var returnValue = inputObj.offsetTop;
  while((inputObj = inputObj.offsetParent) != null){
  	if(inputObj.tagName!='HTML')returnValue += inputObj.offsetTop;
  }
  return returnValue;
}

function shoppingCart_getLeftPos(inputObj)
{
  var returnValue = inputObj.offsetLeft;
  while((inputObj = inputObj.offsetParent) != null){
  	if(inputObj.tagName!='HTML')returnValue += inputObj.offsetLeft;
  }
  return returnValue;
}


function checkForm(){
	var status = 0;
	if(document.userSignUp.custnamee.value == "")
	{
		alert("Full Name must be enter!")	
		return document.userSignUp.custnamee.focus()
	}	
	else if(document.userSignUp.custadd1.value == "")
	{
		alert("Street Address must be enter!")
		document.userSignUp.custadd1.focus()
	}		
	else if(document.userSignUp.custcity.value == "")
	{
		alert("City must be enter!")
		document.userSignUp.custcity.focus()
	}		
	else if(document.userSignUp.custstate.value == "")
	{
		alert("State must be enter!")
		document.userSignUp.custstate.focus()
	}		
	else if(document.userSignUp.custzipcode.value == "")
	{
		alert("Zipcode must be enter!")
		document.userSignUp.custzipcode.focus()
	}		
	else if(document.userSignUp.custphone.value == "")
	{
		alert("Phone Number must be enter!")
		document.userSignUp.custphone.focus()
	}	
	else if(document.userSignUp.custemail.value == "")
	{
		alert("Email must be enter!")
		document.userSignUp.custemail.focus()
	}			
	else if(document.userSignUp.custpassword.value == "")
	{
		alert("Please enter a password!")
		document.userSignUp.custpassword.focus()
	}	
	else if(document.userSignUp.custpassword2.value == "")
	{
		alert("Please confirm your password!")
		document.userSignUp.custpassword2.focus()
	}	
	else if(document.userSignUp.custpassword.value != document.userSignUp.custpassword2.value)
	{
		alert("Password doesn't match! Please enter again.")
		document.userSignUp.custpassword.value =""
		document.userSignUp.custpassword2.value =""
		document.userSignUp.custpassword.focus()
	}
	else userSubmit();
}
function searchNum()
{
	document.getElementById("moreInfo").innerHTML = '';
	itemNum = encodeURI(document.getElementById('searchNumber').value);
	if((itemNum.length == 7) || (itemNum.length == 10))
	 {
		 printID(itemNum);
		SetTitle(itemNum);
	}
}

//**************************************************************************************************

function showAlert()
{
	if(!alertDiv){
		alertDiv = document.createElement('DIV');
		alertDiv.style.position = 'absolute';
		document.body.appendChild(alertDiv);
	}
	message = '<font color=red size=5 face=arial>You are not using Windows Internet Explorer.<br>Please use Windows Internet Explorer to see Burmese Font.</font>'
	alertDiv.id='alertDiv';
	document.getElementById(alertDiv).innerHTML = message;
	alertDiv.innerHTML = message;
	alertDiv.style.left =  '200px';
	alertDiv.style.top =  '200px';
	//alertDiv.appendChild(shoppingContentCopy);
	alertDiv.style.display='block';
	alertDiv.style.width =  '400px';
	alertDiv.style.height = '400px';


}	

function addToBasket(productId)
{
	if(!shopping_cart_div)shopping_cart_div = document.getElementById('miniShoppingCart');
	if(!flyingDiv){
		flyingDiv = document.createElement('DIV');
		flyingDiv.style.position = 'absolute';
		document.body.appendChild(flyingDiv);
	}
	
	shopping_cart_x = shoppingCart_getLeftPos(shopping_cart_div);
	shopping_cart_y = shoppingCart_getTopPos(shopping_cart_div);

	currentProductDiv = document.getElementById(productId);
	currentXPos = shoppingCart_getLeftPos(currentProductDiv);
	currentYPos = shoppingCart_getTopPos(currentProductDiv);
	
	diffX = shopping_cart_x - currentXPos;
	diffY = shopping_cart_y - currentYPos;
	

	var shoppingContentCopy = currentProductDiv.cloneNode(true);
	//document.getElementById(productId).innerHTML = '';
	shoppingContentCopy.id='';
	flyingDiv.innerHTML = '';
	flyingDiv.style.left = currentXPos + 'px';
	flyingDiv.style.top = currentYPos + 'px';
	flyingDiv.appendChild(shoppingContentCopy);
	flyingDiv.style.display='block';
	flyingDiv.style.width = currentProductDiv.offsetWidth + 'px';
	flyToBasket(productId);
	
}


function flyToBasket(productId)
{
	var maxDiff = Math.max(Math.abs(diffX),Math.abs(diffY));
	var moveX = (diffX / maxDiff) * flyingSpeed;;
	var moveY = (diffY / maxDiff) * flyingSpeed;	
	
	currentXPos = currentXPos + moveX;
	currentYPos = currentYPos + moveY;
	
	flyingDiv.style.left = Math.round(currentXPos) + 'px';
	flyingDiv.style.top = Math.round(currentYPos) + 'px';	
	
	if(moveX>0 && currentXPos > shopping_cart_x){
		flyingDiv.style.display='none';		
	}
	if(moveX<0 && currentXPos < shopping_cart_x){
		flyingDiv.style.display='none';		
	}
		
	if(flyingDiv.style.display=='block')setTimeout('flyToBasket("' + productId + '")',10); 
	else {
		if(productId.substr(0,1) == "M") productId = productId.substr(1);
		addToCart(productId)
	}
}

//********************************************** fly to basket end ************************************************************


function showUserAddress()
{
	document.getElementById('userAddressShowHide').innerHTML = '<a href="#" onclick="hideUserAddress()" class=zu>လိပ္စာပိတ္ရန္</a>'
	showMiniUserAddress()
}
function hideUserAddress()
{
	document.getElementById('userAddressShowHide').innerHTML = '<a href="#" onclick="showUserAddress()" class=zu>လိပ္စာၾကည့္ရန္</a>'
	document.getElementById('userAddress').innerHTML = ''
}

function hideRightContents()
{
	document.getElementById('userInfo').innerHTML = ''
	document.getElementById('miniShoppingCart').innerHTML = ''
}
function showRightContents()
{
	showMiniLogin()
	showMiniShoppingCart()

}
function hideOrderList()
{
	document.getElementById('orderShowHide').innerHTML = '<a href="#" onclick="showOrderList()" class=zu>အမွာစာရင္းမ်ား ၾကည့္ရန္</a>'
	document.getElementById('userOrderList').innerHTML = ''
}
//******************************************* Update Mini User Address *******************************************************
var xmlHttpUpdateMiniUserAddress

function updateMiniUserAddress()
{ 
xmlHttpUpdateMiniUserAddress=GetXmlHttpObject1()
if (xmlHttpUpdateMiniUserAddress==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var add1 = encodeURI(document.getElementById('miniAdd1').value);
var add2 = encodeURI(document.getElementById('miniAdd2').value);
var city = encodeURI(document.getElementById('miniCity').value);
var state = encodeURI(document.getElementById('miniState').value);
var zipcode = encodeURI(document.getElementById('miniZipcode').value);
var phone = encodeURI(document.getElementById('miniPhone').value);

document.getElementById('userAddress').innerHTML = '<center><font size=4 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'

var url="updateMiniUserAddress.php?add1="+add1+"&add2="+add2+"&city="+city+"&state="+state+"&zipcode="+zipcode+"&phone="+phone
url=url+"&sid="+Math.random()
xmlHttpUpdateMiniUserAddress.onreadystatechange=stateChangedUpdateMiniUserAddress 
xmlHttpUpdateMiniUserAddress.open("GET",url,true)
xmlHttpUpdateMiniUserAddress.send(null)
}

function stateChangedUpdateMiniUserAddress() 
{ 
if (xmlHttpUpdateMiniUserAddress.readyState==4 || xmlHttpUpdateMiniUserAddress.readyState=="complete")
 { 
 document.getElementById("userAddress").innerHTML=xmlHttpUpdateMiniUserAddress.responseText 
 } 
}
function GetXmlHttpObject1()
{
var xmlHttpUpdateMiniUserAddress=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpUpdateMiniUserAddress=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpUpdateMiniUserAddress=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpUpdateMiniUserAddress=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpUpdateMiniUserAddress;
}
//**************************************************************************************************


//******************************************* Edit Mini User Address *******************************************************
var xmlHttpEditMiniUserAddress

function editMiniUserAddress()
{ 
xmlHttpEditMiniUserAddress=GetXmlHttpObject1()
if (xmlHttpEditMiniUserAddress==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('userAddress').innerHTML = '<center><font size=4 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'

var url="editMiniUserAddress.php"
url=url+"?sid="+Math.random()
xmlHttpEditMiniUserAddress.onreadystatechange=stateChangedEditMiniUserAddress 
xmlHttpEditMiniUserAddress.open("GET",url,true)
xmlHttpEditMiniUserAddress.send(null)
}

function stateChangedEditMiniUserAddress() 
{ 
if (xmlHttpEditMiniUserAddress.readyState==4 || xmlHttpEditMiniUserAddress.readyState=="complete")
 { 
 document.getElementById("userAddress").innerHTML=xmlHttpEditMiniUserAddress.responseText 
 } 
}
function GetXmlHttpObject1()
{
var xmlHttpEditMiniUserAddress=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpEditMiniUserAddress=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpEditMiniUserAddress=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpEditMiniUserAddress=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpEditMiniUserAddress;
}
//**************************************************************************************************

//******************************************* Show Mini User Address *******************************************************
var xmlHttpShowMiniUserAddress

function showMiniUserAddress()
{ 
xmlHttpShowMiniUserAddress=GetXmlHttpObject1()
if (xmlHttpShowMiniUserAddress==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('userAddress').innerHTML = '<center><font size=4 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'

var url="showMiniUserAddress.php"
url=url+"?sid="+Math.random()
xmlHttpShowMiniUserAddress.onreadystatechange=stateChangedShowMiniUserAddress 
xmlHttpShowMiniUserAddress.open("GET",url,true)
xmlHttpShowMiniUserAddress.send(null)
}

function stateChangedShowMiniUserAddress() 
{ 
if (xmlHttpShowMiniUserAddress.readyState==4 || xmlHttpShowMiniUserAddress.readyState=="complete")
 { 
 document.getElementById("userAddress").innerHTML=xmlHttpShowMiniUserAddress.responseText 
 } 
}
function GetXmlHttpObject1()
{
var xmlHttpShowMiniUserAddress=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpShowMiniUserAddress=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpShowMiniUserAddress=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpShowMiniUserAddress=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpShowMiniUserAddress;
}
//**************************************************************************************************

//******************************************* Print ID *******************************************************
var xmlHttpPrintID

function printID(id)
{ 
xmlHttpPrintID=GetXmlHttpObject1()
if (xmlHttpPrintID==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('moreInfo').innerHTML = '<center><font size=6 face=zawgyi1>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'
pagetitle = id.toUpperCase()+' Minthamee Video Store'
var url="printid.php?id="+id
url=url+"&sid="+Math.random()
xmlHttpPrintID.onreadystatechange=stateChangedPrintID 
xmlHttpPrintID.open("GET",url,true)
xmlHttpPrintID.send(null)
}

function stateChangedPrintID() 
{ 
if (xmlHttpPrintID.readyState==4 || xmlHttpPrintID.readyState=="complete")
 { 
 document.getElementById("moreInfo").innerHTML=xmlHttpPrintID.responseText 

 } 
}
function GetXmlHttpObject1()
{
var xmlHttpPrintID=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpPrintID=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpPrintID=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpPrintID=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpPrintID;
}
//**************************************************************************************************
//******************************************* Set Title *******************************************************
var xmlHttpSetTitle

function SetTitle(id)
{ 
xmlHttpSetTitle=GetXmlHttpObject1()
if (xmlHttpSetTitle==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="settitle.php?id="+id
url=url+"&sid="+Math.random()
xmlHttpSetTitle.onreadystatechange=stateChangedSetTitle 
xmlHttpSetTitle.open("GET",url,true)
xmlHttpSetTitle.send(null)
}

function stateChangedSetTitle() 
{ 
if (xmlHttpSetTitle.readyState==4 || xmlHttpSetTitle.readyState=="complete")
 { 
document.title =((xmlHttpSetTitle.responseText ).substr(0))

 } 
}
function GetXmlHttpObject1()
{
var xmlHttpSetTitle=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpSetTitle=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpSetTitle=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpSetTitle=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpSetTitle;
}
//**************************************************************************************************

//******************************************* Search By Author *******************************************************


var xmlHttpSearchByAuthor

function searchByAuthor(pageNumber)
{ 
xmlHttpSearchByAuthor=GetXmlHttpObject1()
if (xmlHttpSearchByAuthor==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var aid = encodeURI(document.getElementById('aid').value);
document.getElementById('moreInfo').innerHTML = '';
document.getElementById('mainContents').innerHTML = '<center><font size=7 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></center>'

var url="searchbyauthor.php?pageNumber="+pageNumber+"&aid="+aid
url=url+"&sid="+Math.random()
xmlHttpSearchByAuthor.onreadystatechange=stateChangedSearchByAuthor 
xmlHttpSearchByAuthor.open("GET",url,true)
xmlHttpSearchByAuthor.send(null)
}

function stateChangedSearchByAuthor() 
{ 
if (xmlHttpSearchByAuthor.readyState==4 || xmlHttpSearchByAuthor.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpSearchByAuthor.responseText 
 } 
}
function GetXmlHttpObject1()
{
var xmlHttpSearchByAuthor=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpSearchByAuthor=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpSearchByAuthor=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpSearchByAuthor=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpSearchByAuthor;
}


//******************************************* Show Order List *******************************************************

//******************************************* Search By Author *******************************************************


var xmlHttpShowSearch

function showSearch()
{ 
xmlHttpShowSearch=GetXmlHttpObject1()
if (xmlHttpShowSearch==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var url="showSearch.php"
url=url+"?sid="+Math.random()
xmlHttpShowSearch.onreadystatechange=stateChangedShowSearch 
xmlHttpShowSearch.open("GET",url,true)
xmlHttpShowSearch.send(null)
}

function stateChangedShowSearch() 
{ 
if (xmlHttpShowSearch.readyState==4 || xmlHttpShowSearch.readyState=="complete")
 { 
 document.getElementById("searchContent").innerHTML=xmlHttpShowSearch.responseText 
 } 
}
function GetXmlHttpObject1()
{
var xmlHttpShowSearch=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpShowSearch=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpShowSearch=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpShowSearch=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpShowSearch;
}


//******************************************* Show Order List *******************************************************

//******************************************* View Order Detail *******************************************************


var xmlHttpViewOrderDetail

function viewOrderDetail(orderNumber)
{ 
xmlHttpViewOrderDetail=GetXmlHttpObject1()
if (xmlHttpViewOrderDetail==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var url="orderdetail.php?orderNumber="+orderNumber
url=url+"&sid="+Math.random()
xmlHttpViewOrderDetail.onreadystatechange=stateChangedViewOrderDetail 
xmlHttpViewOrderDetail.open("GET",url,true)
xmlHttpViewOrderDetail.send(null)
}

function stateChangedViewOrderDetail() 
{ 
if (xmlHttpViewOrderDetail.readyState==4 || xmlHttpViewOrderDetail.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpViewOrderDetail.responseText 
 document.getElementById("moreInfo").innerHTML = ''
 } 
}
function GetXmlHttpObject1()
{
var xmlHttpViewOrderDetail=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpViewOrderDetail=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpViewOrderDetail=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpViewOrderDetail=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpViewOrderDetail;
}


//******************************************* Show Order List *******************************************************


var xmlHttpShowOrderList

function showOrderList()
{ 
xmlHttpShowOrderList=GetXmlHttpObject1()
if (xmlHttpShowOrderList==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('orderShowHide').innerHTML = '<a href="#" onclick="hideOrderList()" class=zu>အမွာစာရင္းမ်ား ပိတ္ရန္</a>'
document.getElementById('userOrderList').innerHTML = '<center><font size=4 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'

var url="showorderlist.php"
url=url+"?sid="+Math.random()
xmlHttpShowOrderList.onreadystatechange=stateChangedShowOrderList 
xmlHttpShowOrderList.open("GET",url,true)
xmlHttpShowOrderList.send(null)
}

function stateChangedShowOrderList() 
{ 
if (xmlHttpShowOrderList.readyState==4 || xmlHttpShowOrderList.readyState=="complete")
 { 
 document.getElementById("userOrderList").innerHTML=xmlHttpShowOrderList.responseText 
 } 
}
function GetXmlHttpObject1()
{
var xmlHttpUpdateCountry=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpShowOrderList=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpShowOrderList=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpShowOrderList=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpShowOrderList;
}


//******************************************* Update Country *******************************************************


var xmlHttpUpdateCountry

function updateCountry()
{ 
xmlHttpUpdateCountry=GetXmlHttpObject1()
if (xmlHttpUpdateCountry==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var countryid = encodeURI(document.getElementById('countryid').value);
document.getElementById('updateCountry').innerHTML = '<center><font size=4 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'

var url="updateusercountry.php?countryid="+countryid
url=url+"&sid="+Math.random()
xmlHttpUpdateCountry.onreadystatechange=stateChangedUpdateCountry 
xmlHttpUpdateCountry.open("GET",url,true)
xmlHttpUpdateCountry.send(null)
}

function stateChangedUpdateCountry() 
{ 
if (xmlHttpUpdateCountry.readyState==4 || xmlHttpUpdateCountry.readyState=="complete")
 { 
 document.getElementById("updateCountry").innerHTML=xmlHttpUpdateCountry.responseText 
 } 
}

function GetXmlHttpObject1()
{
var xmlHttpUpdateCountry=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpUpdateCountry=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpUpdateCountry=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpUpdateCountry=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpUpdateCountry;
}

//*********************************************** Update Country


//******************************************* new user submit *******************************************************


var xmlHttpUserSubmit

function userSubmit()
{ 
xmlHttpUserSubmit=GetXmlHttpObject1()
if (xmlHttpUserSubmit==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var nb = encodeURI(document.getElementById('custnameb').value);
var ne = encodeURI(document.getElementById('custnamee').value);
var a1 = encodeURI(document.getElementById('custadd1').value);
var a2 = encodeURI(document.getElementById('custadd2').value);
var c = encodeURI(document.getElementById('custcity').value);
var co = encodeURI(document.getElementById('countryid').value);
var s = encodeURI(document.getElementById('custstate').value);
var z = encodeURI(document.getElementById('custzipcode').value);
var p = encodeURI(document.getElementById('custphone').value);
var e = encodeURI(document.getElementById('custemail').value);
var pa = encodeURI(document.getElementById('custpassword').value);
document.getElementById('mainContents').innerHTML = '<center><font size=7 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></center>'

var url="submit.php?nb="+nb+"&ne="+ne+"&a1="+a1
url=url+"&a2="+a2+"&c="+c+"&s="+s+"&z="+z+"&p="+p+"&e="+e
url = url+"&pa="+pa+"&co="+co
url=url+"&sid="+Math.random()
xmlHttpUserSubmit.onreadystatechange=stateChangedUserSubmit 
xmlHttpUserSubmit.open("GET",url,true)
xmlHttpUserSubmit.send(null)
}

function stateChangedUserSubmit() 
{ 
if (xmlHttpUserSubmit.readyState==4 || xmlHttpUserSubmit.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpUserSubmit.responseText 
 } 
}

function GetXmlHttpObject1()
{
var xmlHttpUserSubmit=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpUserSubmit=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpUserSubmit=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpUserSubmit=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpUserSubmit;
}

//*********************************************** new user submit

function addCustInfo()
{
	addNewCust()
	showRightContents()
	loadMain('71')
}


//******************************************* Add New Cust *******************************************************
var xmlHttpANC

function addNewCust()
{ 
xmlHttpANC=GetXmlHttpObject1()
if (xmlHttpANC==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('mainContents').innerHTML = '<center><font size=7 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔  <br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></center>'
var url="addNewCust.php"
url=url+"?sid="+Math.random()
xmlHttpANC.onreadystatechange=stateChangedANC 
xmlHttpANC.open("GET",url,true)
xmlHttpANC.send(null)
}

function stateChangedANC() 
{ 
if (xmlHttpANC.readyState==4 || xmlHttpANC.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpANC.responseText 
 } 
}

function GetXmlHttpObject1()
{
var xmlHttpANC=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpANC=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpANC=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpANC=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpANC;
}

//*********************************************** Add New Cust


//******************************************* Load Signup page *******************************************************
var xmlHttpLoadSignup

function loadSignup()
{ 
xmlHttpLoadSignup=GetXmlHttpObject1()
if (xmlHttpLoadSignup==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('mainContents').innerHTML = '<center><font size=7 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔<br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></center>'
var url="signup.php"
url=url+"?sid="+Math.random()
xmlHttpLoadSignup.onreadystatechange=stateChangedLoadSignup 
xmlHttpLoadSignup.open("GET",url,true)
xmlHttpLoadSignup.send(null)
}

function stateChangedLoadSignup() 
{ 
if (xmlHttpLoadSignup.readyState==4 || xmlHttpLoadSignup.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpLoadSignup.responseText 
 } 
}

function GetXmlHttpObject1()
{
var xmlHttpLoadSignup=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpLoadSignup=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpLoadSignup=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpLoadSignup=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpLoadSignup;
}

//*********************************************** Load Signup page end


//******************************************* Load main pageSection *******************************************************
var xmlHttpLoadMain

function loadMain(page)
{ 
xmlHttpLoadMain=GetXmlHttpObject1()
if (xmlHttpLoadMain==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('moreInfo').innerHTML = '';
document.getElementById('mainContents').innerHTML = '<center><font size=7 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></center>'
type = page.substr(0,1);
pageNumber = page.substr(1);
var url="loadMainPage.php?page="+pageNumber+"&type="+type
url=url+"&sid="+Math.random()
xmlHttpLoadMain.onreadystatechange=stateChanged1 
xmlHttpLoadMain.open("GET",url,true)
xmlHttpLoadMain.send(null)
}

function stateChanged1() 
{ 
if (xmlHttpLoadMain.readyState==4 || xmlHttpLoadMain.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpLoadMain.responseText 
if(type == "2") document.title = "Myanmar Music CD Audio CD ျမန္မာသီခ်င္းစီဒီမ်ား"
if(type == "1") document.title = "Myanmar Karaoke VCD DVD ျမန္မာကာလာအိုေက ဗီြစီဒီ ႏွင့္ ဒီဗီြဒီမ်ား"
if(type == "5") document.title = "Dhama DVD ျမန္မာ ဗုဒၶတရားေခြမ်ား"
if(type == "3") document.title = "Myanmar VCD Movie ျမန္မာဇတ္လမ္းဗီြစီဒီမ်ား"
if(type == "6") document.title = "Myanmar Ah Nyeit  အၿငိမ့္သဘင္ပြဲမ်ား"
if(type == "7") document.title = "Myanmar DVD Movie ျမန္မာဇတ္လမ္း ဒီဗီြဒီမ်ား"
if(type == "8") document.title = "Myanmar Boxing ျမန္မာရိုးရာလက္ေ၀ွ႔"
 } 
}

function GetXmlHttpObject1()
{
var xmlHttpLoadMain=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpLoadMain=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpLoadMain=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpLoadMain=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpLoadMain;
}

//*********************************************** Load Main End





//******************************************* Show Mini Shopping Cart
var xmlHttpSMSC

function showMiniShoppingCart()
{ 
xmlHttpSMSC=GetXmlHttpObjectSMSC()
if (xmlHttpSMSC==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="showMiniShoppingCart.php"
url=url+"?sid="+Math.random()
xmlHttpSMSC.onreadystatechange=stateChangedSMSC 
xmlHttpSMSC.open("GET",url,true)
xmlHttpSMSC.send(null)
}

function stateChangedSMSC() 
{ 
if (xmlHttpSMSC.readyState==4 || xmlHttpSMSC.readyState=="complete")
 { 
 document.getElementById("miniShoppingCart").innerHTML=xmlHttpSMSC.responseText 
 } 
}

function GetXmlHttpObjectSMSC()
{
var xmlHttpSMSC=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpSMSC=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpSMSC=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpSMSC=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpSMSC;
}


//******************************************************show mini shopping cart end *******************


//******************************** Add Item to Shopping Card *******************************************
var xmlHttpAddToCart

function addToCart(itemNumber)
{ 
xmlHttpAddToCart=GetXmlHttpObjectAddToCart()
if (xmlHttpAddToCart==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('miniShoppingCart').innerHTML = '<center><font size=6 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'

var url="addToCart.php?itemNumber="+itemNumber
url=url+"&sid="+Math.random()
xmlHttpAddToCart.onreadystatechange=stateChangedAddToCart 
xmlHttpAddToCart.open("GET",url,true)
xmlHttpAddToCart.send(null)
}

function stateChangedAddToCart() 
{ 
if (xmlHttpAddToCart.readyState==4 || xmlHttpAddToCart.readyState=="complete")
 { 
 document.getElementById("miniShoppingCart").innerHTML=xmlHttpAddToCart.responseText 
 } 
}

function GetXmlHttpObjectAddToCart()
{
var xmlHttpAddToCart=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpAddToCart=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpAddToCart=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpAddToCart=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpAddToCart;
}
//******************************************* Add Item to Shopping End *******************************************



//******************************** Check Out*******************************************
var xmlHttpCheckOut

function checkOut()
{ 
xmlHttpCheckOut=GetXmlHttpObjectCheckOut()
if (xmlHttpCheckOut==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('moreInfo').innerHTML = ''
document.getElementById('mainContents').innerHTML = '<center><font size=7 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></center>'


var url="checkout.php"
url=url+"?sid="+Math.random()
xmlHttpCheckOut.onreadystatechange=stateChangedCheckOut 
xmlHttpCheckOut.open("GET",url,true)
xmlHttpCheckOut.send(null)
}

function stateChangedCheckOut() 
{ 
if (xmlHttpCheckOut.readyState==4 || xmlHttpCheckOut.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpCheckOut.responseText 
 } 
}

function GetXmlHttpObjectCheckOut()
{
var xmlHttpCheckOut=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpCheckOut=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpCheckOut=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpCheckOut=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpCheckOut;
}
//******************************************* Check Out End *******************************************

//******************************** login Process*******************************************
var xmlHttpLoginProcess

function loginProcess()
{ 
xmlHttpLoginProcess=GetXmlHttpObjectLoginProcess()
if (xmlHttpLoginProcess==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var custemail = encodeURI(document.getElementById('custemail').value);
var custpassword = encodeURI(document.getElementById('custpassword').value);
var url="loginprocess.php?custemail="+custemail+"&custpassword="+custpassword
url=url+"&sid="+Math.random()
xmlHttpLoginProcess.onreadystatechange=stateChangedLoginProcess 
xmlHttpLoginProcess.open("GET",url,true)
xmlHttpLoginProcess.send(null)
}

function stateChangedLoginProcess() 
{ 
if (xmlHttpLoginProcess.readyState==4 || xmlHttpLoginProcess.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpLoginProcess.responseText 
 } 
}

function GetXmlHttpObjectLoginProcess()
{
var xmlHttpLoginProcess=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpLoginProcess=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpLoginProcess=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpLoginProcess=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpLoginProcess;
}
//******************************************* Check Out End *******************************************

//******************************** Order Process*******************************************
var xmlHttpOrderProcess

function orderProcess()
{ 
xmlHttpOrderProcess=GetXmlHttpObjectOrderProcess()
if (xmlHttpOrderProcess==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('mainContents').innerHTML = '<center><font size=7 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></center>'

var url="orderprocess.php"
url=url+"?sid="+Math.random()
xmlHttpOrderProcess.onreadystatechange=stateChangedOrderProcess 
xmlHttpOrderProcess.open("GET",url,true)
xmlHttpOrderProcess.send(null)
}

function stateChangedOrderProcess() 
{ 
if (xmlHttpOrderProcess.readyState==4 || xmlHttpOrderProcess.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpOrderProcess.responseText 
 } 
}

function GetXmlHttpObjectOrderProcess()
{
var xmlHttpOrderProcess=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpOrderProcess=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpOrderProcess=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpOrderProcess=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpOrderProcess;
}
//******************************************* Order Process *******************************************
//******************************** Mini Login*******************************************
var xmlHttpShowMiniLogin

function showMiniLogin()
{ 
xmlHttpShowMiniLogin=GetXmlHttpObjectShowMiniLogin()
if (xmlHttpShowMiniLogin==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var url="miniLogin.php"
url=url+"?sid="+Math.random()
xmlHttpShowMiniLogin.onreadystatechange=stateChangedShowMiniLogin 
xmlHttpShowMiniLogin.open("GET",url,true)
xmlHttpShowMiniLogin.send(null)
}

function stateChangedShowMiniLogin() 
{ 
if (xmlHttpShowMiniLogin.readyState==4 || xmlHttpShowMiniLogin.readyState=="complete")
 { 
 document.getElementById("userInfo").innerHTML=xmlHttpShowMiniLogin.responseText 
 } 
}

function GetXmlHttpObjectShowMiniLogin()
{
var xmlHttpShowMiniLogin=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpShowMiniLogin=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpShowMiniLogin=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpShowMiniLogin=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpShowMiniLogin;
}
//******************************************* Mini Login *******************************************
//******************************** View Sitemap*******************************************
var xmlHttpviewSitemap

function viewSitemap()
{ 
xmlHttpviewSitemap=GetXmlHttpObjectviewSitemap()
if (xmlHttpviewSitemap==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }


var url="minthameesitemap.php"
url=url+"?sid="+Math.random()
xmlHttpviewSitemap.onreadystatechange=stateChangedviewSitemap 
xmlHttpviewSitemap.open("GET",url,true)
xmlHttpviewSitemap.send(null)
}

function stateChangedviewSitemap() 
{ 
if (xmlHttpviewSitemap.readyState==4 || xmlHttpviewSitemap.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpviewSitemap.responseText 
 } 
}

function GetXmlHttpObjectviewSitemap()
{
var xmlHttpviewSitemap=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpviewSitemap=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpviewSitemap=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpviewSitemap=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpviewSitemap;
}
//******************************************* View Site Map*******************************************
//******************************** Mini Login process*******************************************
var xmlHttpShowMiniLoginProcess

function showMiniLoginProcess()
{ 
xmlHttpShowMiniLoginProcess=GetXmlHttpObjectShowMiniLoginProcess()
if (xmlHttpShowMiniLoginProcess==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var custemail = encodeURI(document.getElementById('custemail').value);
var custpassword = encodeURI(document.getElementById('custpassword').value);

document.getElementById('userInfo').innerHTML = '<center><font size=5 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'


var url="miniLoginProcess.php?custemail="+custemail+"&custpassword="+custpassword
url=url+"&sid="+Math.random()
xmlHttpShowMiniLoginProcess.onreadystatechange=stateChangedShowMiniLoginProcess 
xmlHttpShowMiniLoginProcess.open("GET",url,true)
xmlHttpShowMiniLoginProcess.send(null)
}

function stateChangedShowMiniLoginProcess() 
{ 
if (xmlHttpShowMiniLoginProcess.readyState==4 || xmlHttpShowMiniLoginProcess.readyState=="complete")
 { 
 document.getElementById("userInfo").innerHTML=xmlHttpShowMiniLoginProcess.responseText 
 } 
}

function GetXmlHttpObjectShowMiniLoginProcess()
{
var xmlHttpShowMiniLoginProcess=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpShowMiniLoginProcess=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpShowMiniLoginProcess=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpShowMiniLoginProcess=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpShowMiniLoginProcess;
}
//******************************************* Mini Login Process*******************************************

//******************************** Log Out*******************************************
var xmlHttpLogOut

function logOut()
{ 
xmlHttpLogOut=GetXmlHttpObjectLogOut()
if (xmlHttpLogOut==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('userInfo').innerHTML = '<center><font size=5 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'

var url="logout.php"
url=url+"?sid="+Math.random()
xmlHttpLogOut.onreadystatechange=stateChangedLogOut 
xmlHttpLogOut.open("GET",url,true)
xmlHttpLogOut.send(null)
}

function stateChangedLogOut() 
{ 
if (xmlHttpLogOut.readyState==4 || xmlHttpLogOut.readyState=="complete")
 { 
 	document.getElementById("userInfo").innerHTML=xmlHttpLogOut.responseText 
	showRightContents()
	loadMain('71')
 } 
}

function GetXmlHttpObjectLogOut()
{
var xmlHttpLogOut=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpLogOut=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpLogOut=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpLogOut=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpLogOut;
}
//******************************************* mini logout Process*******************************************


//************************************************* Display Main Shopping Cart **********************************

var xmlHttpShowMainShoppingCart

function showMainShoppingCart()
{ 
xmlHttpShowMainShoppingCart=GetXmlHttpObjectShowMainShoppingCart()
if (xmlHttpShowMainShoppingCart==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('moreInfo').innerHTML = '';
document.getElementById('mainContents').innerHTML = '<center><font size=7 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></font></center>'
var url="showMainShoppingCart.php"
url=url+"?sid="+Math.random()
xmlHttpShowMainShoppingCart.onreadystatechange=stateChangedShowMainShoppingCart
xmlHttpShowMainShoppingCart.open("GET",url,true)
xmlHttpShowMainShoppingCart.send(null)
}

function stateChangedShowMainShoppingCart() 
{ 
if (xmlHttpShowMainShoppingCart.readyState==4 || xmlHttpShowMainShoppingCart.readyState=="complete")
 { 
 document.getElementById("mainContents").innerHTML=xmlHttpShowMainShoppingCart.responseText 
 } 
}

function GetXmlHttpObjectShowMainShoppingCart()
{
var xmlHttpShowMainShoppingCart=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpShowMainShoppingCart=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpShowMainShoppingCart=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpShowMainShoppingCart=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpShowMainShoppingCart;
}



//****************************************************Display Main Shopping Cart *******************************


//************************************************* edit addressreview 2 **********************************

var xmlHttpEditReview2UserAddress

function editReview2UserAddress()
{ 
xmlHttpEditReview2UserAddress=GetXmlHttpObjectEditReview2UserAddress()
if (xmlHttpEditReview2UserAddress==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('review2useraddress').innerHTML = '<center><font size=7 face=zawgyi1><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔<br><br></font></center>'
document.getElementById('confirmButton').style.display= 'none'
var url="editReview2UserAddress.php"
url=url+"?sid="+Math.random()
xmlHttpEditReview2UserAddress.onreadystatechange=stateChangedEditReview2UserAddress
xmlHttpEditReview2UserAddress.open("GET",url,true)
xmlHttpEditReview2UserAddress.send(null)
}

function stateChangedEditReview2UserAddress() 
{ 
if (xmlHttpEditReview2UserAddress.readyState==4 || xmlHttpEditReview2UserAddress.readyState=="complete")
 { 
 document.getElementById("review2useraddress").innerHTML=xmlHttpEditReview2UserAddress.responseText 
 } 
}

function GetXmlHttpObjectEditReview2UserAddress()
{
var xmlHttpEditReview2UserAddress=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpEditReview2UserAddress=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpEditReview2UserAddress=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpEditReview2UserAddress=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpEditReview2UserAddress;
}
//****************************************************edit address review 2 *******************************


//******************************************* Update Review2 User Address *******************************************************
var xmlHttpUpdateReview2UserAddress

function updateReview2UserAddress()
{ 
xmlHttpUpdateReview2UserAddress=GetXmlHttpObject1()
if (xmlHttpUpdateReview2UserAddress==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var add1 = encodeURI(document.getElementById('review2Add1').value);
var add2 = encodeURI(document.getElementById('review2Add2').value);
var city = encodeURI(document.getElementById('review2City').value);
var state = encodeURI(document.getElementById('review2State').value);
var zipcode = encodeURI(document.getElementById('review2Zipcode').value);
var phone = encodeURI(document.getElementById('review2Phone').value);

document.getElementById('review2useraddress').innerHTML = '<center><font size=4 face=zawgyi1><br><br><br>ခဏေစာင့္ပါ ႔ ႔ ႔ ႔ ႔</font></center>'
document.getElementById('confirmButton').style.display= 'inline'

var url="updateReview2UserAddress.php?add1="+add1+"&add2="+add2+"&city="+city+"&state="+state+"&zipcode="+zipcode+"&phone="+phone
url=url+"&sid="+Math.random()
xmlHttpUpdateReview2UserAddress.onreadystatechange=stateChangedUpdateReview2UserAddress 
xmlHttpUpdateReview2UserAddress.open("GET",url,true)
xmlHttpUpdateReview2UserAddress.send(null)
}

function stateChangedUpdateReview2UserAddress() 
{ 
if (xmlHttpUpdateReview2UserAddress.readyState==4 || xmlHttpUpdateReview2UserAddress.readyState=="complete")
 { 
 document.getElementById("review2useraddress").innerHTML=xmlHttpUpdateReview2UserAddress.responseText 
 } 
}
function GetXmlHttpObject1()
{
var xmlHttpUpdateReview2UserAddress=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpUpdateReview2UserAddress=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpUpdateReview2UserAddress=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpUpdateReview2UserAddress=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpUpdateReview2UserAddress;
}
//*************************************** update review2 user address***********************************************************




//Drop Down/ Overlapping Content: http://www.dynamicdrive.com
//**Updated: Dec 19th, 07': Added ability to dynamically populate a Drop Down content using an external file (Ajax feature)
//**Updated: Feb 29th, 08':
				//1) Added ability to reveal drop down content via "click" of anchor link (instead of default "mouseover")
				//2) Added ability to disable drop down content from auto hiding when mouse rolls out of it
				//3) Added hidediv(id) public function to directly hide drop down div dynamically

var dropdowncontent={
	disableanchorlink: true, //when user clicks on anchor link, should link itself be disabled (always true if "revealbehavior" above set to "click")
 hidedivmouseout: [true, 200], //Set hiding behavior within Drop Down DIV itself: [hide_div_onmouseover?, miliseconds_before_hiding]
	ajaxloadingmsg: "Loading content. Please wait...", //HTML to show while ajax page is being feched, if applicable
	ajaxbustcache: true, //Bust cache when fetching Ajax pages?

	getposOffset:function(what, offsettype){
		return (what.offsetParent)? what[offsettype]+this.getposOffset(what.offsetParent, offsettype) : what[offsettype]
	},

	isContained:function(m, e){
		var e=window.event || e
		var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
		while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
		if (c==m)
			return true
		else
			return false
	},

	show:function(anchorobj, subobj, e){
		if (!this.isContained(anchorobj, e)){
			var e=window.event || e
			if (e.type=="click" && subobj.style.visibility=="visible"){
				subobj.style.visibility="hidden"
				return
			}
			var horizontaloffset=(subobj.dropposition[0]=="left")? -(subobj.offsetWidth-anchorobj.offsetWidth) : 0 //calculate user added horizontal offset
			var verticaloffset=(subobj.dropposition[1]=="top")? -subobj.offsetHeight : anchorobj.offsetHeight //calculate user added vertical offset
			subobj.style.left=this.getposOffset(anchorobj, "offsetLeft") + horizontaloffset + "px"
			subobj.style.top=this.getposOffset(anchorobj, "offsetTop")+verticaloffset+"px"
			subobj.style.clip=(subobj.dropposition[1]=="top")? "rect(auto auto auto 0)" : "rect(0 auto 0 0)" //hide drop down box initially via clipping
			subobj.style.visibility="visible"
			subobj.startTime=new Date().getTime()
			subobj.contentheight=parseInt(subobj.offsetHeight)
			if (typeof window["hidetimer_"+subobj.id]!="undefined") //clear timer that hides drop down box?
				clearTimeout(window["hidetimer_"+subobj.id])
			this.slideengine(subobj, (subobj.dropposition[1]=="top")? "up" : "down")
		}
	},

	curveincrement:function(percent){
		return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input
	},

	slideengine:function(obj, direction){
		var elapsed=new Date().getTime()-obj.startTime //get time animation has run
		if (elapsed<obj.glidetime){ //if time run is less than specified length
			var distancepercent=(direction=="down")? this.curveincrement(elapsed/obj.glidetime) : 1-this.curveincrement(elapsed/obj.glidetime)
			var currentclip=(distancepercent*obj.contentheight)+"px"
			obj.style.clip=(direction=="down")? "rect(0 auto "+currentclip+" 0)" : "rect("+currentclip+" auto auto 0)"
			window["glidetimer_"+obj.id]=setTimeout(function(){dropdowncontent.slideengine(obj, direction)}, 10)
		}
		else{ //if animation finished
			obj.style.clip="rect(0 auto auto 0)"
		}
	},

	hide:function(activeobj, subobj, e){
		if (!dropdowncontent.isContained(activeobj, e)){
			window["hidetimer_"+subobj.id]=setTimeout(function(){
				subobj.style.visibility="hidden"
				subobj.style.left=subobj.style.top=0
				clearTimeout(window["glidetimer_"+subobj.id])
			}, dropdowncontent.hidedivmouseout[1])
		}
	},

	hidediv:function(subobjid){
		document.getElementById(subobjid).style.visibility="hidden"
	},

	ajaxconnect:function(pageurl, divId){
		var page_request = false
		var bustcacheparameter=""
		if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
			page_request = new XMLHttpRequest()
		else if (window.ActiveXObject){ // if IE6 or below
			try {
			page_request = new ActiveXObject("Msxml2.XMLHTTP")
			} 
			catch (e){
				try{
				page_request = new ActiveXObject("Microsoft.XMLHTTP")
				}
				catch (e){}
			}
		}
		else
			return false
		document.getElementById(divId).innerHTML=this.ajaxloadingmsg //Display "fetching page message"
		page_request.onreadystatechange=function(){dropdowncontent.loadpage(page_request, divId)}
		if (this.ajaxbustcache) //if bust caching of external page
			bustcacheparameter=(pageurl.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
		page_request.open('GET', pageurl+bustcacheparameter, true)
		page_request.send(null)
	},

	loadpage:function(page_request, divId){
		if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
			document.getElementById(divId).innerHTML=page_request.responseText
		}
	},

 init:function(anchorid, pos, glidetime, revealbehavior){
		var anchorobj=document.getElementById(anchorid)
		var subobj=document.getElementById(anchorobj.getAttribute("rel"))
		var subobjsource=anchorobj.getAttribute("rev")
		if (subobjsource!=null && subobjsource!="")
			this.ajaxconnect(subobjsource, anchorobj.getAttribute("rel"))
		subobj.dropposition=pos.split("-")
		subobj.glidetime=glidetime || 1000
		subobj.style.left=subobj.style.top=0
		if (typeof revealbehavior=="undefined" || revealbehavior=="mouseover"){
			anchorobj.onmouseover=function(e){dropdowncontent.show(this, subobj, e)}
			anchorobj.onmouseout=function(e){dropdowncontent.hide(subobj, subobj, e)}
			if (this.disableanchorlink) anchorobj.onclick=function(){return false}
		}
		else
			anchorobj.onclick=function(e){dropdowncontent.show(this, subobj, e); return false}
		if (this.hidedivmouseout[0]==true) //hide drop down DIV when mouse rolls out of it?
			subobj.onmouseout=function(e){dropdowncontent.hide(this, subobj, e)}
	}
}
