function ResizeParentIFrame(){
///<summary>Resizes the iFrame on the foreign offers page to the size of embedded external page to hide scrollbars.</summary>
    
    //Due to domain error need to return
    return;
    var parentIFrame = parent.document.getElementById('foreignOffers');
    if(parentIFrame != null && parentIFrame != 'undefined')
    {
        parentIFrame.style.height = this.document.body.scrollHeight + 'px';
    }
}

function ImagePopUp(imageSource, imageWidth, imageHeight, title){
///<summary>Opens a popup window with an image inside in it.</summary>
///<param name="imageSource">Image source</param>
///<param name="imageWidth">Width of the image in pixels</param>
///<param name="imageHeight">Height of the image in pixels</param>
///<param name="title">Title of the popup window</param>
    
    msgWindow = window.open("","ImagePopUpWindow", 'resizable=no,left=0,top=0,width=' + imageWidth + ',height=' + imageHeight);    
    msgWindow.document.writeln("<HTML>");
	msgWindow.document.writeln("<HEAD><TITLE>" + title + "</TITLE></HEAD>");
	msgWindow.document.writeln("<BODY TOPMARGIN='0' LEFTMARGIN='0' marginwidth='0' marginheight='0'>");
	msgWindow.document.writeln("<a href='javascript:void(0);' onclick='window.close();'><IMG SRC='" + imageSource + "' BORDER='0' WIDTH='" + imageWidth + "' HEIGHT='" + imageHeight + "' alt='" + title + "' title='" + title + "'></a>");
	msgWindow.document.writeln("</BODY>");
	msgWindow.document.writeln("</HTML>");
}

function OpenPopupInformation(contentId,titleId){
///<summary>Opens a popup window.</summary>
///<param name="contentId">popup content resource id</param>
///<param name="titleId">popup title resource id</param>
    
    if(window.showModalDialog != null && window.showModalDialog != 'undefined')
    {
        window.showModalDialog("/Popups/PopUpInformation.aspx?content=" + contentId + "&title=" + titleId, "", "dialogHeight:500px;dialogWidth:600px;resizable:no;scroll:yes;status:no;");
    }
    else
    {
        window.open("/Popups/PopUpInformation.aspx?content=" + contentId + "&title=" + titleId, "myWindow", "menubar=no,resizable=no,scrollbars=yes,toolbar=no,height=500,width=600");
    }
}

function OpenPopup(path){
///<summary>Opens a popup window.</summary>
///<param name="path">popup content path</param>
    
    if(window.showModalDialog != null && window.showModalDialog != 'undefined')
    {
        window.showModalDialog(path, "", "dialogHeight:570px;dialogWidth:530px;resizable:no;scroll:no;status:no;");
    }
    else
    {
        window.open(path, "myWindow", "menubar=no,resizable=no,scrollbars=no,toolbar=no,height=570,width=530");
    }
}

